Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Call to webservice doesn't pass in credentials

 
Thread Tools Search this Thread
Old 11-18-2005, 03:19 PM   #1
Default Call to webservice doesn't pass in credentials


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, the call to the web service isn't
using those credentials. Looking at the IIS logs for the webservice,
it isn't passing in any credentials, so is returning a 401. The
web.config for the webservice has allow all users. And I can call the
webservice successfully from my development machine. It is just when I
run the web application on the QA box that it fails.

Is there anything I might be missing?

Thanks,
Carole



elora_c@yahoo.com
  Reply With Quote
Old 11-18-2005, 04:14 PM   #2
Ram P. Dash
 
Posts: n/a
Default Re: Call to webservice doesn't pass in credentials
Hi Carole,

Does your web.config of the web service contain the following line?
<authentication mode="Windows" />

Pass in a valid credential to your client proxy by doing this:

myWebService.Credentials = new System.Net.NetworkCredential("myUserName",
"myPassword", "myDomain");

and capture the credential at your service side by doing this (you already
have impersonation = true in web.config):

System.Security.Principal.WindowsIdentity.GetCurre nt().Name

or

System.Threading.Thread.CurrentPrincipal.Identity. Name

What do you see? Is it same as "myUserName"?

Thanks,
Ram

<> wrote in message
news: oups.com...
> 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, the call to the web service isn't
> using those credentials. Looking at the IIS logs for the webservice,
> it isn't passing in any credentials, so is returning a 401. The
> web.config for the webservice has allow all users. And I can call the
> webservice successfully from my development machine. It is just when I
> run the web application on the QA box that it fails.
>
> Is there anything I might be missing?
>
> Thanks,
> Carole
>





Ram P. Dash
  Reply With Quote
Old 11-18-2005, 05:31 PM   #3
Bruce Barker
 
Posts: n/a
Default Re: Call to webservice doesn't pass in credentials
standard nt security does not allow creditials forwarding (1 hop rule).
unless the website is hit from a local browser (like on your local dev box),
asp.net will not have login token it can use to access another server.

you will need to switch to Kerberos and turn on credentials forwarding.

http://support.microsoft.com/default...b;en-us;810572

-- bruce (sqlwork.com)


<> wrote in message
news: oups.com...
> 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, the call to the web service isn't
> using those credentials. Looking at the IIS logs for the webservice,
> it isn't passing in any credentials, so is returning a 401. The
> web.config for the webservice has allow all users. And I can call the
> webservice successfully from my development machine. It is just when I
> run the web application on the QA box that it fails.
>
> Is there anything I might be missing?
>
> Thanks,
> Carole
>





Bruce Barker
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Manager 6 CDR CSV file level_3rd General Help Related Topics 0 06-12-2008 09:16 AM
Cisco Call Manager 6 CSV Format level_3rd General Help Related Topics 0 06-12-2008 09:14 AM
TRADING FEMALE CELEB INTERVIEWS ON DVD stu DVD Video 1 05-26-2008 09:39 AM
Call WebService over https via proxy... koraykazgan Software 0 08-16-2007 04:20 PM
Free VIP Exhibits Pass for NAB 2006 jsolis@studentfilmmakers.com DVD Video 0 01-25-2006 11:07 PM




SEO by vBSEO 3.3.2 ©2009, 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