473,785 Members | 2,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass through credentials to web service

Hey all -

I'm in a bit of a bind concerning web services and integrated
authentication. I'll give you a little background as to what I'm trying
to do ...

I have a client application that calls a web service. The web service
uses integrated windows authentication (with identity impersonation =
true in Web.Config) with anonymous authentication turned off in IIS.
Calling the web service works as expected - users that can get to it
get to it, users that don't get a 401 Access Denied. I want this web
service to also make a call to a database sitting on a remote SQL
Server using the same credentials that were passed through to the web
service (for example, Domain\UserA access web service, web service
calls Sql Server with login of Domain\UserA. UserB access web service,
web service calls SQL Server with login of Domain\UserB, etc.)

The problem arises when I try to access the SQL box; I always get the
following error:

Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.

I've seen numerous posts about this online, but none really with a
definitive answer as to what I should do. If I use Basic Authentication
in IIS with everything else unchecked, the web service works (except it
always asks for a login/password, thus throwing a 401 code when the
client app tries calling it). I figure there has to be a way to get
these credentials to be passed through in a secure manner, I just
haven't found it.

Does anyone have any ideas?

Thanks!
Clint

Nov 19 '05 #1
3 8417
Did you set WebClientProtoc ol.Credentials in client side?
Nov 19 '05 #2
It is the double-hop' limitation of NTLM authentication. The client's
credentials can make one hop from the client machine to the
application server, the server cannot then use those credentials to
make a second network hop without some additional config work.

See: http://blogs.msdn.com/nunos/archive/.../12/88468.aspx

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 20 Dec 2004 12:36:04 -0800, "cm******@onlin e.nospam"
<cj*******@gmai l.com> wrote:
Hey all -

I'm in a bit of a bind concerning web services and integrated
authentication . I'll give you a little background as to what I'm trying
to do ...

I have a client application that calls a web service. The web service
uses integrated windows authentication (with identity impersonation =
true in Web.Config) with anonymous authentication turned off in IIS.
Calling the web service works as expected - users that can get to it
get to it, users that don't get a 401 Access Denied. I want this web
service to also make a call to a database sitting on a remote SQL
Server using the same credentials that were passed through to the web
service (for example, Domain\UserA access web service, web service
calls Sql Server with login of Domain\UserA. UserB access web service,
web service calls SQL Server with login of Domain\UserB, etc.)

The problem arises when I try to access the SQL box; I always get the
following error:

Login failed for user '(null)'. Reason: Not associated with a trusted
SQL Server connection.

I've seen numerous posts about this online, but none really with a
definitive answer as to what I should do. If I use Basic Authentication
in IIS with everything else unchecked, the web service works (except it
always asks for a login/password, thus throwing a 401 code when the
client app tries calling it). I figure there has to be a way to get
these credentials to be passed through in a secure manner, I just
haven't found it.

Does anyone have any ideas?

Thanks!
Clint


Nov 19 '05 #3
Shoot - I was afraid that was the case. I had figured that there'd be a
generally easy way to do this, but I guess not.
Anyway, thanks for your reply!
Clint

Nov 19 '05 #4

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

Similar topics

1
1558
by: Tom | last post by:
Hi, I am currently on a project where one site needs to send the user credentials to another site, through web services. Scenario: * "User 1" will authenticate to "Site A" using NTLM ("Site A" provides front-end presentation of data) * "Site A" will request confidential information about "User 1" to "Site B"
2
4101
by: elora_c | last post by:
I'm making a call to a webservice from my ASP.NET page. The web application has anonymous access turned off and Integrated Windows auth turned on. The web.config has <identity impersonate=true>. I set the credentials of the web service proxy to the DefaultCredentials. Right before I make the call, I print out the WindowsIdentity, and it is showing the right identity. So I know the web application is authenticating properly. However,...
4
3327
by: James | last post by:
I succesfully pass username , domain and password via this function (taken from MSDN) Private Declare Auto Function LogonUser Lib "advapi32.dll" (ByVal lpszUsername As , _ ByVal lpszDomain As , ByVal lpszPassword As , _ ByVal dwLogonType As Integer, ByVal dwLogonProvider As Integer, _
1
10145
by: webserviceUser189 | last post by:
Hi, I'm trying to authenticate the user based on the credentials that I get from the client app, but I'm getting empty string as user name. Can somebody tell me if I'm doing anything wrong here. Thanks in advance! Here is what I'm doing: In the windows app, I've set the current security principal as windowsprincipal
0
1300
by: Eagle | last post by:
Hi all. I want to known if it is possible to pass the Credentials (user and pass basicly) from one user I has validated in my intranet to another aplication (for example to an object who can accept credentials objects, like a Proxy object). Take care, the user isnt the same than the windows user, it is one validated (with windows validation from Active Directory) in the intranet.
1
2117
by: beachboy | last post by:
how can pass the login (security info) to secondary application? ASP.NET 1.1 user login to application 1(app1.myapp.com) with their username and password, then they have a link to application 2 (app2.myapp.com) and I want to pass the authentication of application 2 with backend process. Also, security issue is first priority. Thanks in advanced.
5
4135
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service I'm routing messages to uses WSHttpBinding, SSL with UserName/Password client credentials. Using guidance from the Technology samples I can create a router that forwards messages without security credentils but not with them. Can anybody point me...
1
3418
scubak1w1
by: scubak1w1 | last post by:
Hello, Can I pass https:// credentials in a URL string? I am not familar with this side of setting up servers, URL strings, etc... Yep, seems counterintuitive - but it is server-server... You can kind of ignore these details if you are not familar with this - I am using TileCache, part of OpenLayers, and want to get some data off a WMS Server that I have set up using MapServer, locally... The TileCache configuration lines would be...
3
13032
by: Techmighty | last post by:
Hello All, I want to invoke the .Net Based webservice from a java client code using axis api. As we pass the credentials in .Net "uin.Credentials = new NetworkCredential("administrator", "Tech1234", "WORKGROUP");" I have to pass them in java code. I have tried with
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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,...
1
10091
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
9950
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...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
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
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
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.