By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.

AuthHeaderValue with Webservice

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.