Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Basic Authentication, WebService (http://www.velocityreviews.com/forums/t781288-basic-authentication-webservice.html)

oliver.wulff@zurich.ch 07-11-2003 06:02 AM

Basic Authentication, WebService
 
I did the following to add http basic authentication for calling a
webservice:

chz11086.HelloAuthTestService service = new
chz11086.HelloAuthTestService();
service.Credentials = new System.Net.NetworkCredential("oliver",
"oli");


service.Url="http://chz11086:10001/xmlbus/HelloAuthTest/HelloAuthTestService/HelloAuthTestPort/";
String retValue = service.hello("Oli from .NET");

But it fails. I've added an interceptor which dumps the whole soap request
and http headers. I'm missing the http header Authorization: BASIC: ......

What am I doing wrong?
Can I add an http header manually?

oliver.wulff@zurich.ch 07-12-2003 06:44 PM

Antwort: Re: Basic Authentication, WebService
 
Hi
my webservice is not running in IIS. To check if the authorization http
header has been added, the message is sent to a tcp monitor which
delegates the request to my webservice. Unfortunately, this header hasn't
been added by my .NET client. I've done the following:
String url = "http://chz11086:10001/xmlbus/berechtigung/Berechtigung_1_0Service/Berechtigung_1_0Porthttp://localhost:53205/xmlbus/berechtigung/Berechtigung_1_0Service/Berechtigung_1_0Port/";
chz110861.Berechtigung_1_0Service service = new
chz110861.Berechtigung_1_0Service();

service.PreAuthenticate = true;
NetworkCredential myCred = new NetworkCredential("cha3629","oli");

CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri(service.Url), "Basic", myCred);
service.Credentials = myCache;

service.Url = url;
service.ping();
MessageBox.Show("Succeeded");

oliver.wulff@zurich.ch 07-16-2003 08:13 PM

Antwort: Re: Basic Authentication, WebService
 
No further ideas?
I've found similar requests in other newsgroups about this issue but there
was no reply. They used the same code as I do.
Is there a bug?


All times are GMT. The time now is 06:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57