473,698 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Cred entialCache.Def aultCredentials ;
(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 DefaultCredenti als 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 2793
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.Credentia ls = System.Net.Cred entialCache.Def aultCredentials ;

the DefaultCredenti als 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
networkCredenti al and pass it to the webservice client proxy, here is the
code snippet:
=============== ====
MyService.MySer vice ms = new MyService.MySer vice();

System.Net.Netw orkCredential nc = new
System.Net.Netw orkCredential(" username","pass word","domainam e");
System.Net.Cred entialCache cc = new System.Net.Cred entialCache();
cc.Add(new Uri(ms.Url),"NT LM",nc);
ms.Credentials = cc;

ms.Execute("dfd sfds");
=============== ======

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
5548
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 running under the user's security context. Is there a way for WS1 to call another web service, WS2, but to impersonate a totally different user account for the call?
2
13349
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 Network Credential class required Domain, userName and password - that's not a good one because the password should not be hard-coded. - Even I hardcoded it still give me "401 - not authorized error" Do I need to use WSE2.0 to call a WS using NT...
5
2689
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 Administration group (on server side) to have the necessary authorization to start a Windows Service (I don't understand why "Power User" rights are not enough to do the same thing) Although I'm able to start a service using windows 2000 server...
0
3590
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 scenario not involving ISA server, which works as expected: The web service is hosted on a server in the same domain as my workstation with anonymous access denied, and integrated authentication enabled. If I access the web service using the...
3
2277
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 Solomon 6.0, Microsoft Office Basic and Microsoft Office Profesional, Acrobat reader, Adobe Acrobat. Otherwise, is a standard machine setup from Dell.
2
7581
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 way to add it. I've tryed to use ethereal to watch what I'm sending and I can see all the header (Accept-Language,Accept-Encoding,User-Agent,Host,Connection,..) and the SOAP xml message but there is no "Authorization: Basic ......" at all. Could...
3
13796
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 service run in an application pool which runs under a domain user, this domain user has permissions of accessing database and the connection to database is trusted connection. All these work well. The web application will be used in internet (not...
0
2009
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 Authentication. Within the Web Service we look at the current username and check which user Groups it belongs to.
1
2120
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. You can find it here: http://igottools.com/Lists/Posts/Post.aspx?ID=11 Hope it helps you guys making client authentication via webservices to work. Kind regards,
0
8601
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9021
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8860
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3043
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2327
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.