473,769 Members | 6,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "Administra tor" account in my ASP.NET code.

Now, when I check the value of "WindowsIdentit y.GetCurrent(). Name" BEFORE
the identity switch it reports the identity as that of the anonymous
"MACHINE\IUSR_m achine" account. When I check the same value right AFTER the
switch it reports "MACHINE\Admini strator". 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 827

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

Similar topics

0
3009
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 a week. Then suddenly the monitored network server starts to behave crazily. It sends to my Sync Server dozens of replicated file change events. Say one file was changed two days ago, but the monitored server still keeps sending me many many...
0
328
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 if the required libraries are registered when first starting my app. As I couldn't find an easy way to do this, I thought I might just get the Identities of each of the ActiveX type assembly references using reflection and look them up in...
1
1278
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 in the web.config file. The IUSR and ASPNET identities have read and execute permissions for the virtual directory's folder path. Here's the weird part, if I hit F5 (refresh) it prompts to retry posting back the form. I accept and it works...
1
1323
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 alternative Loadfrom option to load the assembly. Cany anyone explain to me what this "identity" issue is, how it relates to creating multiple DLL's in c#, and how does it differ in the use of loadfile and loadfrom
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9994
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.