System.UnauthorizedAccessException

This can happen if you received the ASPX file via an IM file transfer, for example.  Look at the file’s Properties|Security|GroupOrUserNames, and if “Users” isn’t listed there, that means ASP.NET can’t access the file.

I fixed this by copying the file contents into the clipboard, reverting the file, and pasting the contents over the file.  (When you get the file from Perforce, the users list should be correct.)

Print Friendly, PDF & Email