473,396 Members | 1,833 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,396 software developers and data experts.

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

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
Nov 16 '05 #1
1 2775
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.)
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: john | last post by:
Is there a way in .Net to call a function or web service under a different security context as the one that the user is logged into? For example, if a user calls web service 1 (WS1), WS1 is now...
2
by: John Lee | last post by:
Hi, I have a web service setup as "Integrated Windows Authentication" only, How can I set the credential to call the web service from Windows application? I tried to create the proxy, and the...
5
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the...
0
by: John Bown | last post by:
This query is similar to some others on this discussion group, but none of them were resolved! Can anybody help: The issue is related to integrated authentication. First I'll describe a simple...
3
by: Robert May | last post by:
Here's the setup: Windows 2003 running .net 1.1 webservice with Integrated Authentication set. Client machine running .net 1.1 on xp pro with latest service packs and updates. User also has...
2
by: Ottavio | last post by:
Hello, I'm having some problems with the authentication during a web service call I know I have to add the "Authorization: Basic xxxxxxxx" in the http header (not soap header) but I can't find a...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: Griff | last post by:
Overview When the first call to our Web Service causes an exception, the Web Service caches that user's credentials for its life time. Details We have a Web Service which uses Windows...
1
by: Colin | last post by:
I created a walkthrough for "How to call a Web service by using a client certificate for authentication in an ASP.NET Web application"using makecert, certutil, WinHttpCertCfg.exe X509Certificate. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.