473,394 Members | 1,813 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,394 software developers and data experts.

Weird ASP.NET identities problem. Help.

I'm trying to figure out a simple problem but I'm stumped. I have an
application that needs to access a .dll that (for security reasons) only
grants permissions to the Administrators group. Since the application pool's
identity is the default "Network Service", I was thinking I'll just
impersonate the "Administrator" account in my ASP.NET code.

Now, when I check the value of "WindowsIdentity.GetCurrent().Name" BEFORE
the identity switch it reports the identity as that of the anonymous
"MACHINE\IUSR_machine" account. When I check the same value right AFTER the
switch it reports "MACHINE\Administrator". So the identity switch seems to
be successful.

However, when I try to access the .dll right after that, I get the "Can't
create ActiveX object" error. That's because when I check access to the .dll
with FileMon it reports that it's still trying to access the .dll as the
"Network Service" user!

What am I missing? Why is it using the identoty of the application pool, and
NOT the impersonated identity for access to the .dll?

Thanks for any help!


Nov 18 '05 #1
0 811

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

Similar topics

0
by: cxw0106 | last post by:
Hello, I have some weird problem with the FileSystemWatcher. I have developed an application that monitors a network directory for file changes of a certain file type. The program runs well for...
0
by: Nathan Baulch | last post by:
I have a windows app that has a few Interop assemblies. If I run it on a machine that doesn't have the required COM libraries, I get nasty COMExceptions. What I would like to do is check to see...
1
by: Mythran | last post by:
I keep getting the exception, "Cannot open database requested in login 'dbblah'. Login fails. Login failed for 'domain\user'". I have ASPNET setup as the user in IIS, identity impersonate is true...
1
by: Peted | last post by:
Bellow is a snippet from the ms website about using loadfile on assemblies that have the same identities. I beleive this "identity" issue may be the cause of a problem i have using the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.