PC Review


Reply
Thread Tools Rate Thread

How to call a web service using NT Authentication from Web Service

 
 
John Lee
Guest
Posts: n/a
 
      29th Dec 2004
Hi,

I have two web services and they are setup as "Integrated Windows
Authentication" only and they are both assigned to application pool with
Domain Account.

I can use ws.Credentials = System.Net.CredentialCache.DefaultCredentials;
(ws is a web service proxy request instance) to call the web service BUT
this method does not work if I want to call another web service from one web
service.

I guess the DefaultCredentials does not have anything because there is no
logon involved? So How could I call another web service from one web service
using NTLM?

Thanks a lot!
John


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      29th Dec 2004
Hi John,

Thanks for your posting. Regarding on this post, I've also found your
another thread in this group
"How to call a web service using NT Authentication"
which is focus on calling webservice from winform client and I've posted
my reply there. And I've also mentioned the asp.net client scenario there
also.

Also, based on my local test when use the

PROXY.Credentials = System.Net.CredentialCache.DefaultCredentials;

the DefaultCredentials will represent the asp.net's process identity (if
not using the impersonate) and it works well. Not sure what's the problem
on your side, are you still recieving 401 access denied?

In addition, I've also mentioned how to programly create a NTLM
networkCredential and pass it to the webservice client proxy, here is the
code snippet:
===================
MyService.MyService ms = new MyService.MyService();

System.Net.NetworkCredential nc = new
System.Net.NetworkCredential("username","password","domainame");
System.Net.CredentialCache cc = new System.Net.CredentialCache();
cc.Add(new Uri(ms.Url),"NTLM",nc);
ms.Credentials = cc;

ms.Execute("dfdsfds");
=====================

If there is any other questions, please feel free to post here or in that
thread. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a Web service by using a client certificate for authentication in an ASP.NET Web application Colin Microsoft ASP .NET 1 14th Jul 2007 07:44 AM
'web service call failed: 500' using ajax hovermenu and web service Not Me Microsoft ASP .NET 1 5th Jun 2007 04:09 PM
Schedule the call of a Web Service method: task scheduler or Windows Service? BLUE Microsoft C# .NET 3 3rd Jun 2007 09:22 PM
How to call a web service using NT Authentication John Lee Microsoft C# .NET 2 29th Dec 2004 02:17 AM
Service Control Manager The Remote Procedure Call (RPC) service terminated unexp Arlan R Spratte Windows XP Help 1 12th Dec 2003 04:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:11 PM.