AuthHeaderValue with Webservice

  • Thread starter Thread starter Davie
  • Start date Start date
D

Davie

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();
 
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" <[email protected]>
| 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: <[email protected]>
| 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!TK2MSFTNGP14.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();
|
|
|
|
 
Back
Top