Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to get integrated credentials from anonymous access

Reply
Thread Tools

How to get integrated credentials from anonymous access

 
 
Michael Ames
Guest
Posts: n/a
 
      11-03-2003
I want to allow both anonymous and integrated access to a web service
simultaneously. That is, if the calling user can be authenticated on the
server, I want the calling user's username. If not, I still want them to be
able to access the web service.

The documentation suggests that this is not possible, because if IIS allows
anonymous, it doesn't pass the caller's credentials on to ASP.NET. This
must not be true, however, because I can allow anonymous in IIS, but set
<deny users="?" /> in web.config and get the WindowsIdentity for the caller
that way. So it seems to me that IIS *must* pass those credentials on to
ASP.NET, which then makes the decision to reject the request if it's from an
unrecognized user.

So. Is there a way to "tap in" to that process, so that I can get the
username of a recognized user, but still allow access by unrecognized users?

Thanks!

-Michael Ames


 
Reply With Quote
 
 
 
 
Alexander Stojakovic
Guest
Posts: n/a
 
      11-04-2003
Michael,

try the following few lines of code on a suitable place:

Response.StatusCode = 401;
Response.StatusDescription = "Unauthorized";
Context.ClearError();

best regard



Sascha


 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
IIS, Web Service, Anonymous access and Integrated Win Authenticati Daniel P. ASP .Net Web Services 0 10-20-2006 07:39 PM
"The credentials supplied conflict with an existing set of credentials" -=rjh=- NZ Computing 2 07-15-2006 11:09 PM
Passing credentials to windows integrated authentication =?Utf-8?B?UGF0cmljay5PLklnZQ==?= ASP .Net 3 10-26-2004 10:56 AM
Please help - Passing credentials to windows integrated authentication jadher ASP .Net 1 10-11-2004 02:33 PM



Advertisments