0

Are there some special gotchas when accessing a project folder using IIS express in visual studio 2010? I am testing a file upload control and I keep getting access denied Asp.net errors.

I have the following users with FULL access to my root project folder:

  1. Authenticated Users
  2. IUSR
  3. System
  4. NETWORK SERVICE
  5. Administrators (I am a member)
  6. Users
  7. IIS_IUSRS (MyComputerName\IIS_IUSRS)

No dice. I can publish my application to my IIS7 (not express) folders and no problem. Is there some trick when working in project folders? Do I need to rebuild my application after changing permission? Restart? I also have windows firewall turned off as well.

Thanks.

Note: Not sure if this is relevant but visual studio is installed on 'C' with (I assume) IIS express running there as well. My project folder is on 'D'. This shouldn't matter but you never know.

Also I tried posting this question at serverfault.com but it's crickets over there.

trevorc
  • 3,023
  • 4
  • 31
  • 49
  • What OS are you using? What folder are you trying to upload to? What account is IIS Express running under? – Oded Aug 28 '11 at 17:36
  • windows 7. A folder called 'files' in my mvc3 web application (do I need to use App_Data?). I believe IIS Express runs under the current windows user which I also added with full control. – trevorc Aug 28 '11 at 17:40
  • Are you using [impersonation](http://msdn.microsoft.com/en-us/library/xh507fc5.aspx)? – Oded Aug 28 '11 at 17:42
  • Also, what is the application pool identity account? Is it in the list above? – Oded Aug 28 '11 at 17:45
  • I have not enabled impersonation. I don't know where to find the setting for the app pool id account. IIS express is a bit of a mystery to me. For my sites that I publish in IIS(not express) my default app pool is Asp.net v4.0 integrated. – trevorc Aug 28 '11 at 17:50
  • Are you running VS as administrator? – Oded Aug 28 '11 at 18:11
  • No. My user name is part of the admin group but I have had problems with windows vista and 7 not recognizing that fact unless I specifically run 'As Administrator'. I will try. – trevorc Aug 28 '11 at 18:18
  • No dice on running 'As Administrator'. I also tried impersonation with my userName and password. Still access denied. – trevorc Aug 28 '11 at 18:22

1 Answers1

4

I figured it out thanks to @Oded on another post he commented on. Although his post was helpful my answer was based on the second answer to that question posted by @Hans Passant. I never had any permission errors, I just forgot to append my file name to the folder destination. His harsh answers was indeed the right medicine.

Community
  • 1
  • 1
trevorc
  • 3,023
  • 4
  • 31
  • 49