469,336 Members | 5,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

AuthHeaderValue with Webservice

I want to authorise a user of a web service by using the AuthHeaderValue for
some reason I keep getting a null reference exception when I try to run the
following code: It seems to work fine on a .NET Framework application, but
just not on the .NET CF version.

Can anyone suggest anything that might be wrong with the code? (I could
post the app and webservice, but i was hoping that you might have noticed
something from the supplied code).

Many thanks.

WebServices service = new WebServices();

Webservices.AuthHeader Credentials = new Webservices.AuthHeader();

Credentials.UserName = "user";

Credentials.Password = "P@ssword";

service.AuthHeaderValue = Credentials;

loggedin = service.login();

Nov 17 '05 #1
1 3720
Hi Davie,

Thanks for your posting.
Regarding on this post, I've also found your another duplicated one in the
microsoft.public.dotnet.languages.csharp

newsgroup. I've posted my response there. If you feel it convenient that we
continue to discuss in that thread, please feel free to post there.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: "Davie" <Da***@newsgroup.nospam>
| Subject: AuthHeaderValue with Webservice
| Date: Mon, 26 Sep 2005 17:32:56 +0100
| Lines: 27
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <u8**************@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: client-82-13-29-18.brhm.adsl.virgin.net 82.13.29.18
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.languages.csharp:124809
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I want to authorise a user of a web service by using the AuthHeaderValue
for
| some reason I keep getting a null reference exception when I try to run
the
| following code: It seems to work fine on a .NET Framework application,
but
| just not on the .NET CF version.
|
| Can anyone suggest anything that might be wrong with the code? (I could
| post the app and webservice, but i was hoping that you might have noticed
| something from the supplied code).
|
| Many thanks.
|
|
|
| WebServices service = new WebServices();
|
| Webservices.AuthHeader Credentials = new Webservices.AuthHeader();
|
| Credentials.UserName = "user";
|
| Credentials.Password = "P@ssword";
|
| service.AuthHeaderValue = Credentials;
|
| loggedin = service.login();
|
|
|
|

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Davie | last post: by
1 post views Thread by Nalaka | last post: by
1 post views Thread by Davie | last post: by
5 posts views Thread by AliR | last post: by
2 posts views Thread by Jannicke | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.