Bart Callaerts

You're damned if you do and you're damned if you don't

Create a Service Account for an ASP.NET 2.0 Application

Last week we were trying to get an newly created webapplication to work under IIS with more privileges than the Network Service. So I created an new user on the server and added it to the Administrators group. Thought this should work cause an admin can do anything on a server. Setting this account as the identity for the application pool our application was running in, did not bring any joy. The result was a "Service Unavailable" page. After looking in the eventviewer, I figured out that the Administrator account was not working as a service account.

After a little googling, I found an MSDN article that explained how to create a service account. Follow these steps to do the job:

1. Create the account on the server it has to work on.
2. Open a command window and browse to c:/WIndows/Microsoft.Net/Framwork/v2.0.xxxxx
3. Type the following command : aspnet_regiis -ga DomainName\UserName
4. This command grants the application all kinds off ASP.net rights to run as a service. The account is now a membe of the IIS_WPG group.

Now you can use this account to act as a service account. Granting it more privileges gives it endless posibilities.

Here's the link to the article :

http://msdn2.microsoft.com/en-us/library/ms998297.aspx

Cheers !!

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: