I have a Asp.Net MVC application that runs on a shared host under IIS7. The application uses Forms Authentication with the default MembershipProvider. I have following code on one of my pages.
@Environment.UserDomainName - @Environment.UserName
When I visit the site as a anonymous user it shows: WSWB12 – IUSR_139
While if I’m logged in: WORKGROUP – WSWB12$
The problem is that only the IUSR account has write access to my folders. So when a user is logged in it cannot upload any files.
Can I do something about this?
– I would very much prefer to stay with integrated mode.
– Doing impersonation would be ok to me. But it seems like my host has looked that section in machine.config
– Is there any settings my host could do on the virtual directory to make it always use IUSR?
Greatful for any help you can provide.
With Forms Authentication, you should useto access the Username…
You should check the Application Pool Identity. You can set that to a user of your choosing, that might have the correct privileges.