C# ASP .net application run as current logged in account (admin)

Hi guys i wrote a small application which changes directory and registry on remote computers.  When i set it to run with admin account in IIS it works perfectly.  However i don't want to use one admin account.  I want to have the current logged in user who has rights access the application via IE and make the changes . Right now they all get "access denied" even though  they are all domain admins.


Im sure I'm not defining something correctly. Any help would be appreciated
this is a Windows 7 enviroment



Thanks
kentrg11Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

guru_samiCommented:
Set impersonation="true" in the web.config.
0
kentrg11Author Commented:
do i need <authentication mode="windows">
0
guru_samiCommented:
Yes, impersonation will work with windows authentication (actually a windows user account)
0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

kentrg11Author Commented:
The application executes fine from the server http://myapp.aspx where the code is uploaded/ aka IIS server.
The trouble is im getting "access denied" when im logged into another PC with the SAME LOGIN.  (admin login)

Its probably a silly IIS setting im missing

btw my web.config is

<configuration>
	<system.web>
	.......
		<identity impersonate="true"/>
		<authentication mode="Windows"/>
		<authorization>
			<deny users="?"/>
		</authorization>
	</system.web>
</configuration>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kentrg11Author Commented:
Mods can we move this to IIS category please.
0
kentrg11Author Commented:
resolved
0
kentrg11Author Commented:
figured it out
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.