Security issues with SharePoint (Part 1)

I am currently in the process of building new MOSS and WSS servers.  Upon completion of the configuration wizard, I got the following error when I logged on to Central administration:

Examining the Event Viewer yields the following error (warning to be exact):

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/24/2009 1:15:01 PM
Event time (UTC): 6/24/2009 5:15:01 PM
Event ID: c940ce1192b3433e93e9eed22da82c15
Event sequence: 1
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1576543627/Root-47-128903373014688345
Trust level:
Application Virtual Path: /
Application Path: C:\Inetpub\wwwroot\wss\VirtualDirectories\80\
Machine name: xxx

Process information:
Process ID: 4016
Process name: w3wp.exe
Account name: [account]

Exception information:
Exception type: HttpException
Exception message: The current identity ([account]) does not have write access to ‘c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files’.

Request information:
Request URL: [removed]
Request path: /_vti_bin/sitedata.asmx
User host address: [removed]
User:
Is authenticated: False
Authentication Type:
Thread account name: [account]

Thread information:
Thread ID: 8
Thread account name: [account]
Is impersonating: False
Stack trace:    at System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection)
at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)

As you can figure from the message, the error is occurring because ASP .NET can’t access its temporary files folder via the service account being used.

The twist here is that you don’t grant the privileges through Windows Explorer security (I suppose you could, but I haven’t tried).  Instead, you do it through the command prompt.  Switch to the .NET directory (usually C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) and type the following:

aspnet_regiis.exe -ga “[account]”

The .NET framework will grant the appropriate permissions to [account].  You may need to restart IIS afterwards and apply the permissions to any other service accounts SharePoint is using, but afterwards, you should be able access your site.