I have modified an existing ASP.NET application and for some reason I cannot publish the app. The IIS guy asked me to overwrite the project directory on the server with my updated files. Now, there seems to be a permissions thing because I cannot run the app on the server. I can however run from my local. The question I am being asked now is if I am using impersonation?
This is the email I actually received
"Currently the app is enabled for anonymous authentication, which means every connection is using the local NETWORK SERVICE account, an account that doesn’t have network privileges.
If it’s working, then there is something in the code making it work, probably impersonating a network account."
Anyway, I am very new to asp development so any help would be appreciated.
ASP.NET
Last Comment
jknj72
8/22/2022 - Mon
Jared_S
IIS is assigning a user to your application - by default it's the NETWORK SERVICE account.
You can change it, but how you change it will depend on what you want to do.
You'll make your changes in the web.config file. There are several "right" answers here, so the best thing to do would probably be to read these and then decide which method fits your needs.
Ok I will read the links you provided. FYI, I dont have anything in my web.config that would assign impersonation.
I wanted to let you know the next correspondence I just got:
Question
>>Is there a 'whatever' account/user group? If it’s a user group, please send me the list of people assigned to it.
'whatever' should have access to the shares specified below.
Answer
>>'whatever' is an account and it already has those permissions to the objects.
Forward to me
>>
Can you please check if the application is using that account to get to the shares? I still believe the application is doing impersonation.
Im not sure what to do from here but I will read on...
jknj72
ASKER
I also wanted to include this. I logged in from my machine, with my username and password, and I got this error when trying to access a file on the network. Keep in mind I can physically go onto the network and open the file? Which leads me to think that I may be I am impersonating?
See image attached
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Jared_S
Did you log in to the site or debug the site from VS on your machine?
The first would cause this error, the second shouldn't. Anyone who logs into the site will be running the site on the server as the NETWORK SERVICE account unless you configure it otherwise.
So technically YOU aren't impersonating but the application is.
If you debug the site in VS on your local machine, it runs under your credentials.
A couple of quick solutions would be to
give the asp.net NETWORK USER limited rights as an active directory user
or you could use impersonation in your application (in web.config) and run the application as an active directory user who has the proper rights.
Either of those two things should get you up and running.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
They actually created a group and only users in that group should be allowed to view the app. If thats the case, how do you think this is set up?
Jared_S
They might have done that with Authenticated Access is IIS or just by hosting from a server that not everyone can access.
You still need to get the app to run as a member of that group - right now it isn't. It runs as the default asp.net machine name.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
sognoct
one thing is not clear ... what kind of operation are you trying to do with the pdf file ? are you copying it from a folder to another folder ? or are you accessing to the pdf file for let user download it ?
You can change it, but how you change it will depend on what you want to do.
You'll make your changes in the web.config file. There are several "right" answers here, so the best thing to do would probably be to read these and then decide which method fits your needs.
http://msdn.microsoft.com/en-us/library/eeyk640h(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/907hb5w9(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/9wff0kyh(v=vs.100).aspx