473,398 Members | 2,088 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,398 software developers and data experts.

Authorizing Anonymous User - IIS6/.NET

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 running in a virtual server whose
anonymous user is a network account with the required permissions. This
allows anyone to view the page and see the data. This is working great,
however, due to what is being returned, the page load time is longer than
what I want the user to have to wait for.

I moved the process to a seperate thread in order to return the page to the
user right away. Where the process was working great when run in the same
thread, it fails to work in the 2nd thread. Somehow the single thread is
authenticating the anonymous user to run the process, but when spun to a
different thread which should have the same permissions as the parent, it is
not authorizing.

Any suggestions on how to get the thread to use the credentials of the
parent?

Nov 18 '05 #1
2 2893
when you start a thread in NT, it runs under the context (user) of the
originating process, not thread. this means if you create a thread, it will
be the user that asp.net process is running under. you have two options:

1) change the asp.net machine account to your anonymous account.
2) have the thread login as the anonymous account at startup.

-- bruce (sqlwork.com)

"Kevin Hoskins" <jh******@ichips.no.intel.spam.com.me> wrote in message
news:cl**********@news01.intel.com...
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 running in a virtual server whose
anonymous user is a network account with the required permissions. This
allows anyone to view the page and see the data. This is working great,
however, due to what is being returned, the page load time is longer than
what I want the user to have to wait for.

I moved the process to a seperate thread in order to return the page to the user right away. Where the process was working great when run in the same
thread, it fails to work in the 2nd thread. Somehow the single thread is
authenticating the anonymous user to run the process, but when spun to a
different thread which should have the same permissions as the parent, it is not authorizing.

Any suggestions on how to get the thread to use the credentials of the
parent?

Nov 18 '05 #2
Option #1 requires that the password is in cleartext in the xml - that is
not acceptable here.
Option #2 was the route that I went using the network account as the
anonymous user.

As of about 15 minutes ago, I solved my problem. In hopes that this will
help someone else, here is the solution:

My original code was using the current thread's principal to set the
WindowsPrincipal. By switching this around to get the WindowsPrincipal and
use that to set the thread's principal, the authentication started to work.
Original Code:
_winPrincipal =(WindowsPrincipal) Thread.CurrentPrincipal;
_winIdentity = (WindowsIdentity) _winPrincipal.Identity;

Working Code:
_winIdentity = WindowsIdentity.GetCurrent();
_winPrincipal = new WindowsPrincipal(_winIdentity);

Virtual Directory: Anonymous access only using user account with network
access
Web.config: authentication mode: Windows
impersonation: false
"bruce barker" <no***********@safeco.com> wrote in message
news:eL**************@TK2MSFTNGP15.phx.gbl...
when you start a thread in NT, it runs under the context (user) of the
originating process, not thread. this means if you create a thread, it will be the user that asp.net process is running under. you have two options:

1) change the asp.net machine account to your anonymous account.
2) have the thread login as the anonymous account at startup.

-- bruce (sqlwork.com)

"Kevin Hoskins" <jh******@ichips.no.intel.spam.com.me> wrote in message
news:cl**********@news01.intel.com...
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 running in a virtual server whose
anonymous user is a network account with the required permissions. This
allows anyone to view the page and see the data. This is working great,
however, due to what is being returned, the page load time is longer than what I want the user to have to wait for.

I moved the process to a seperate thread in order to return the page to the
user right away. Where the process was working great when run in the same thread, it fails to work in the 2nd thread. Somehow the single thread is authenticating the anonymous user to run the process, but when spun to a
different thread which should have the same permissions as the parent,

it is
not authorizing.

Any suggestions on how to get the thread to use the credentials of the
parent?


Nov 18 '05 #3

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

Similar topics

2
by: CJM | last post by:
I have a page which streams an Excel spreadsheet to the user. It has worked fine for 12mths or more, but recently I found out that it wasn't working. I suspect the problem lies with IIS, but I'm...
0
by: John Holmes | last post by:
I saw a post in October that related to the problem I'm having and posted something yesterday but never saw it show up, so I'll try again. I read secnet.pdf and gathered from that document that one...
1
by: rolfejr | last post by:
I have what I think is a simple question but I am finding nothing but complicated answers. I have a web site running on IIS6. One directory used to use an alternate account as the anonymous...
2
by: Andrew Wan | last post by:
Okay, this is really weird. We have two Windows 2003 Server SP1 PCs. One hosts IIS6 website, and the other hosts our DCOM service program. Our website is ASP/XSL. An ASP page uses...
2
anukagni
by: anukagni | last post by:
Hi all, I want to use the security levels in ms access.. Iam having 5 main user who are using the database and doing the entries and updation and viewing report ect. i.e. they are all five...
1
by: Erick | last post by:
I'm trying to develop a single security model that has to work for authenticated users and for users coming in from the outside world. I have looked at the Web Site Administration tool for...
1
by: Erick | last post by:
I'm trying to develop a single security model that has to work for authenticated users and for users coming in from the outside world. I have looked at the Web Site Administration tool for...
4
by: arggg | last post by:
I have disabled IWA as I want to handle the authentication my self. I have Allow Anonymous checked with the user IUSR_<MachineName> and unchecked IWA. It then says I do not have access when trying...
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
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: 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
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...
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...
0
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...
0
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,...

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.