473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HttpWorkerRequest, passing the anonymous user to ASP.Net

I implement my own HTTP server and pass ASP.Net requests via HttpWorkerRequest.

When I authenticate a client, I pass the correct windows token inside of
GetUserToken(), and within my pages/webservices HttpContext.Current.User
matches the token I authenticated.

However, when I perform an anonymous request I get a token for the anonymous
user ("NT AUTHORITY\ANONYMOUS LOGON", S-1-5-7) and return that in GetUserToken.
When asp.net gets it, HttpContext.Current.User is a zero-token Identity
with name="", which is unusable. HttpContext.Request.LogonUserIdentity however
does contain the correct windows identity for NTAUTH\ANONYMOUSUSER.

I do not want to impersonate, I just need HttpContext.User to contain the
correct, actual windows identity of "ANONYMOUS LOGON". What could I be doing
wrong?

Any help greatly appreciated.
-Eric Pearson
May 18 '06 #1
1 1612
Nevermind, found the problem. I wasn't returning that identity's name from
GetServerVariable("LOGON_USER")...

once I returned the correct name there, HttpContext.User was set correctly.

I implement my own HTTP server and pass ASP.Net requests via
HttpWorkerRequest.

When I authenticate a client, I pass the correct windows token inside
of GetUserToken(), and within my pages/webservices
HttpContext.Current.User matches the token I authenticated.

However, when I perform an anonymous request I get a token for the
anonymous
user ("NT AUTHORITY\ANONYMOUS LOGON", S-1-5-7) and return that in
GetUserToken.
When asp.net gets it, HttpContext.Current.User is a zero-token
Identity
with name="", which is unusable.
HttpContext.Request.LogonUserIdentity however
does contain the correct windows identity for NTAUTH\ANONYMOUSUSER.

I do not want to impersonate, I just need HttpContext.User to contain
the correct, actual windows identity of "ANONYMOUS LOGON". What could
I be doing wrong?

Any help greatly appreciated.
-Eric Pearson

May 18 '06 #2

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

Similar topics

2
by: Kevin Hoskins | last post by:
Is there anyway to force authentication of the Anonymous user? Here is the situation: I have an ASP.NET page which calls an assembly which requires a certain level of permissions. The page is...
5
by: Patrick.O.Ige | last post by:
Whats the best way to pass Data with hidden fields in asp.net. I want to capture a LOGON_USER(from an intranet using Windows Authentication)and then send the data to a table in the Database. Any...
6
by: Anonymous | last post by:
Hello, I am loading a usercontrol with the LoadControl method and need to pass some data to the property of that control. How can I do that? THanks
8
by: Bryan G | last post by:
Hi, I'm working on a VB project which involves using C library functions which take struct pointers as args, and I keep running into this error when trying to pass either an IntPtr or a Structure...
7
by: DareDevil | last post by:
I have written a method that should modify the folder path passed to it into one that exists and is selected by the user. It then returns a boolean depending on whether a folder path was selected by...
2
by: Witold Iwaniec via .NET 247 | last post by:
It seems that when you pass an object to a function it is always passed by reference even if it is explicitly declared ByVal. Is it the behavior of VB.Net? Here is sample code from sample Asp.Net...
3
by: GRB | last post by:
My webiste has integrated windows authentication. I need to pass a clients credentials (username, password) to my site without the login pop up. I send the client to an anonymous page, get an...
2
by: Jay Balapa | last post by:
Hello, Win Forms app is able to connect to my webservice passing credentials as follows- myService.Credentials=System.Net.CredentialsCache.DefaultCredentials; Compact Framework does not...
3
by: shapper | last post by:
Hello, On my web site I have a property, Visitor, which is available for Anonymous users: public class Visitor { public CultureInfo Culture { get; set; } public List<GuidPolls { get; set;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.