views:

32

answers:

2

I'm getting this error (see title) while trying to parse an XML file in my ASP.NET MVC application. I'm in the early stages of development and I'm just trying to get this working with Visual Studio 2010's built-in DEV server.

I have tried every combination of the following and still no luck:

  • Granting FULL access to the NETWORK SERVICE account to my entire solution
  • Granting FULL access to the IUSER, IIS_IUSRS accounts to my entire solution
  • Adding trust level="Full" to my web.config
  • Adding identity impersonate="true" to my web.config
  • Granting FULL access to the NETWORK SERVICE account to my entire C: drive
  • Running VS as administrator
  • Logging in as administrator
  • Disabling Windows 7 User Account Control (UAC)
  • Smashing head against wall

I fear it's something to do with Window 7 security but I'm not sure. Anyone else experiencing this?

Please note that I do not have an ASPNET account name on my computer. I don't think Windows 7 and the latest version of ASP.NET use that account any more.


EDIT: I am able to upload files with my app using Server.MapPath which makes me wonder if this is a code issue. However the error is pretty clear when it says "access to path MyProject.Web is denied" and that I should allow the ASP.NET account access to it.


EDIT #2: This was caused by an incorrect path. Nothing to do with Windows 7 or granting access to the ASP.NET accounts

A: 

Have you tried turning off windows security altogether? Also try running your account as the administrator. (You'll know if you are running as admin if you don't get the warning to open something with the yes or no prompt).

BioXhazard
I've tried running VS as an administrator, but that didn't work. I haven't tried logging into my machine with my admin account or disabling windows security... I will give that a go.
Derek Hunziker
Darn, that didn't seem to work for me. I disabled UAC entirely and logged in as administrator
Derek Hunziker
False alarm. This was caused by an incorrect path to my XML file. This marks the last time I take a yellow screen of death literally. Thanks for your help, though!
Derek Hunziker
A: 

This was caused by an incorrect path. Nothing to do with Windows 7 or granting access to the ASP.NET accounts

Derek Hunziker