Setting up ASP.Net 2 Stuff…
Posted 30 June 2006, 15:25 | by Ben Duguid | Perma-link
Couple of notes to self mostly:
I had a couple of problems with an ASP.Net 2.0 site on Windows XP Pro, namely I first received errors like:
Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80070005 Access is denied.
As you'll probably have found out, you need to ensure that the local user ASPNET has access to the GAC, and for that you need the command line tool cacls:
cacls c:\windows\assembly /E /T /G ASPNET:R
/E - Edit the ACL instead of replacing it
/T - Change files in this directory and all sub-directories
/G user:perm - Grant the user a permision.
The recommendation I'd seen used /P instead of /G, I found that /G was more reliable.
On top of that, I then had to ensure that both the user ASPNET and the user IUSR_MachineName had read access to the website's files - so run the cacls command with those directories, and you should be away (you need to do it for IUSR_ as that's the account that non .Net pages are called under - .css, .js, .html, etc).
The other problem I had was with ATLAS (ajax to non-softies):
I was setting up some admin pages that shared a master page, and wanted the pages to asynchronously call the server every now and then to keep the session alive during prolonged edits. I initially tryed to add a public method on the page decorated with a [WebMethod] attribute, but to no avail, the PageMethods JavaScript class wasn't being generated. Turns out if you want to call an ATLAS server side method from a master page, you need to call it through a webservice. Enjoy...
Filed under: ASP.NET, Fixes