473,507 Members | 6,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application Security Context

This is probably a newbie type of question, but how / where can you specify
the security context in which server side code runs? I need to do some
active directory lookups and such that the current user might not have
access to. Is there a way to do this like there is for a windows service?
Thanks.

Jerry
Nov 18 '05 #1
2 1046
1. You can specify the request to run under a specific user using the Web.Config

<identity impersonate="true"
userName="domain1\user1"
password="password1"/>

2. You can dynamically impersonate into a different user at run-time, access the
active directory, and revert back to the original user.
Use the "Impersonate()" method in the
"System.Security.Principal.WindowsIdentity" class.

3. You can create a component that access the active directory. Run this
component in COM+ under a specify user. You can then have the ASP.NET page
call this component.

Tommy,

"Jerry Camel" <rl*****@msn.com> wrote in message news:<e3**************@TK2MSFTNGP09.phx.gbl>...
This is probably a newbie type of question, but how / where can you specify
the security context in which server side code runs? I need to do some
active directory lookups and such that the current user might not have
access to. Is there a way to do this like there is for a windows service?
Thanks.

Jerry

Nov 18 '05 #2
Great. Thanks. Exactly what I needed.

"Tommy" <We**********@Hotmail.com> wrote in message
news:a8**************************@posting.google.c om...
1. You can specify the request to run under a specific user using the Web.Config
<identity impersonate="true"
userName="domain1\user1"
password="password1"/>

2. You can dynamically impersonate into a different user at run-time, access the active directory, and revert back to the original user.
Use the "Impersonate()" method in the
"System.Security.Principal.WindowsIdentity" class.

3. You can create a component that access the active directory. Run this
component in COM+ under a specify user. You can then have the ASP.NET page call this component.

Tommy,

"Jerry Camel" <rl*****@msn.com> wrote in message

news:<e3**************@TK2MSFTNGP09.phx.gbl>...
This is probably a newbie type of question, but how / where can you specify the security context in which server side code runs? I need to do some
active directory lookups and such that the current user might not have
access to. Is there a way to do this like there is for a windows service? Thanks.

Jerry

Nov 18 '05 #3

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

Similar topics

2
2720
by: Uchiha Jax | last post by:
Hi, Recently had an issue with the Audio object from Microsoft.DirectX.AudioVideoPlayback. None of the events were firing from the object during tests (NUnit or Console). Knowing I had it...
5
310
by: Martin Robins | last post by:
I have never dabbled with ASP.NET until now so be warned! I have created a web application with the single default form: WebForm1.aspx and when I try to display it I get this error. My...
0
2817
by: M | last post by:
I installed the Visual Basic .NET Resource Kit. When I click 'Visual Basic .NET Resource Kit' the page at 'http://localhost/VB.NETResourceKit/Welcome.aspx' show: Server Error in...
2
1552
by: Randy Yates | last post by:
Forgive me if this is a basic and trivial (i.e., stupid) question. I haven't been using postgres very long, and I'm not an experienced database system developer. I noticed that there is a very...
7
3012
by: Alice Wong | last post by:
I am setting up my Web ASP.net application to connect to Sql server using windows authentication. I set up IIS to have integrated windows authenication and sql to allow Windows authentication....
2
1556
by: g3000 | last post by:
I used VS .Net 2003 to run a c# web app. but when I run it I get the below Security Exception Description: The application attempted to perform an operation not allowed by the security...
6
4536
by: eswanson | last post by:
on a different server. I am currently getting an access denied when I attempt to do the following in my asp.net page: strFilePath = ConfigurationManager.AppSettings; strFileName =...
0
1743
by: Bishoy George | last post by:
Hi, I have a asp.net 2.0 web application. I want to implement the asynchronous model through http handler in web.config ...
11
1960
by: Jay | last post by:
Hey There, I have a system tray application that is running, and it needs to communicate with a Windows Service that I wrote. My problem is that if a user switches to another desktop, I need the...
5
20069
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process...
0
7220
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
7105
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
7371
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...
1
7023
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
7479
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...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.