473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 3892
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just...
6
by: Davie | last post by:
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...
1
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS)...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
1
by: Davie | last post by:
I am experiencing a problem with AuthHeaderValue. I have implemented web services which use authentication through AuthHeaderValue. This works perfectly for any Windows application but it fails...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
2
by: Jannicke | last post by:
Hi. I have a project that contains a webservice. To test my webservice I have another class in the same project. In the project I have added a webreference to my webservice. In my class file i call...
6
by: John | last post by:
I'm trying to call a Webservice (Non-.NET) That requires the insertion of security credentials into the SOAP header. Up until know I've been creating Dynamic proxy classes to call web services and...
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.