Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > 401: Unauthorized. Problem calling web service from forms authenti

Reply
Thread Tools

401: Unauthorized. Problem calling web service from forms authenti

 
 
mike
Guest
Posts: n/a
 
      06-03-2009
I have an ASP.NET 3.5 web site which calls a ASP.NET web service
I am required (don't ask) to only allow authenticated users make web service
calls.
As in;

<authorization>
<deny users="?" />
<!--<allow roles="submitter"/>-->
<deny users="*" />
</authorization>

The application does not use Windows authentication but Forms authentication.
I'm getting a 401: Unauthorized error when trying to make web service calls.

the web service Web.config has these settings as well as the above
<authentication mode="Windows"/>
<identity impersonate="true" />

I am setting the Credentials on my web service the following way

CredentialCache cache = new CredentialCache();
cache.Add(new Uri(service.Url), "Basic", new
NetworkCredential(LoggedInUser.Login, LoggedInUser.Password));
service.Credentials = cache;
service.PreAuthenticate = true;

The IIS Directory Securty setting are set to allow Anonymous access and
"Integrated Windows" authentication for the web services.

what am I doing wrong here?

thanks
mike





 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      06-06-2009

"mike" <> wrote in message
news:4D111443-8B6C-4EB6-8C51-...
>
> The application does not use Windows authentication but Forms
> authentication.
> I'm getting a 401: Unauthorized error when trying to make web service
> calls.
>
>


It means whatever the account is that is being presented to the ASP.NET Web
Service site and the site's virtual directory is in valid.

You need to go to the Web server where the Web service is hosted, enable the
NT based O/S's Audit for Login Success/Fail, go to the System Event Log,
and find out what is the user\account being presented at login failure.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4135 (20090606) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Newbie question: how to create users after publish a form authenti =?Utf-8?B?bmljaw==?= ASP .Net 1 06-27-2006 08:26 AM
Calling Web Service that calls other Web Service with Windows Authentication manuelserpabrandao@gmail.com ASP .Net Security 1 06-14-2006 08:55 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
Calling a web service from a web service JC ASP .Net Web Services 1 08-20-2003 06:51 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57