Cannot change the code-behind file. Access is denied. RRS feed

  • Question

  • I am using the Expression Blend 2.5 June Preview with VS 2008 and the Silverlight 2 beta 2 toolkit. when I try to edit an event handler, instead of opening the code window in VS, it just shows an error dialog

    Cannot change the code-behind file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    I have seen on this forum that a few people had problems with editing event handlers in VS, but none of the cases so far has had the 'access denied' error, so I wonder if this is something that has not been addressed so far. I have already tried to repair the install of VS 2008, and of Expression Blend 2.5, but to no avail.


    Wednesday, June 25, 2008 12:27 AM

All replies

  • I could have guessed it before... the problem goes away when I am logged on as Administrator.

    Does Expression Blend assume that developers always use an Administrator account? It is something that I really, really try to avoid unless I have to administer something, and VS 2008 normally works perfectly well when logging on as a Power User or even User; the only exception being remotely debugging IIS applications, which is bad enough.

    Being Administrator all the time is unsafe. Will this still be necessary in the final version of Blend 2.5?

    Wednesday, June 25, 2008 9:18 AM
  • We will follow up on this - we understand that forcing you to be an Administrator is not a good option, and we have tried hard to stay away from that as much as possible.

    Thursday, June 26, 2008 12:26 AM
  • Hi Unni,

    Thanks a lot for looking into this. Here's another piece of information that may be of help: it is not sufficient if I add my user account to the Administrators group, the error is still there. I have to explicitly choose "Run as Administrator" when opening Blend 2.5, even when the user account already is an Administrator. (Also: This is on Windows Server 2008).


    Thursday, June 26, 2008 8:35 AM