sigpi007
Posts: 1
Joined: Tue Jul 18, 2006 5:49 pm

ASP.NET site and permissions - install issue

I'm having a problem with user permissions during an ASP.NET application install.

The application is setup inside the Default Web Site in IIS. I assign Full Control (generic_all) to the ASPNET windows user during the install via the permissions tab in AI for the correct folder.

However, once the install of the web site is complete, when I try to access the site it says Web Service Unavailable (or close to it). If I then remove the rights to the ASPNET user (through windows) and restore the rights... the web application works fine.

Help me please. I'd like to use this installer for my company, but I'm not fond of needing to do work arounds, since I won't be the acutal person using these install packages.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
I assign Full Control (generic_all) to the ASPNET windows user during the install via the permissions tab in AI for the correct folder.
You must also create an entry for the "Administrators" group, leaving the "Domain" text field empty in this case.
If I then remove the rights to the ASPNET user (through windows) and restore the rights... the web application works fine.
After the application is installed, the folder in questions should have 3 Access Control Entries (ACEs), granting Full Control to "SYSTEM", "Administrators" and "ASPNET" user names or groups.

What do you mean by "restoring the rights"? What Permissions do you set?

===

In order to determine the cause of this problem, please download the free "fileacl" utility from this URL:
http://www.gbordier.com/gbtools/fileacl.htm

Execute the program twice with the following command line after installing the package and after you set the rights in Windows (the case when the web app works):

Code: Select all

fileacl <folder> /advanced
Please post the program output for both cases or send a screenshot of the console window to support at advancedinstaller dot com.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Re: ASP.NET site and permissions - install issue

Hi,

My advanced installer script currently gives the folder that contains the virtual directory permissions to ASPNET, Administrators and Everyone. This works fine for XP systems.
When I try to install on Vista, the installation fails, claiming that there is no user ASPNET. I understand that in vista it is called NETWORK SERVICE .

How can I tell advanced installer to grant the permissions to ASPNET on XP and to NETWORK SERVICE on Vista?

Thanks,

Lior
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: ASP.NET site and permissions - install issue

Hi Lior,
How can I tell advanced installer to grant the permissions to ASPNET on XP and to NETWORK SERVICE on Vista?
Note that the "Domain" and "Username" fields from the "Permission" dialog are Formatted and thus you can specify a Property in both of them.

For instance, you can create a Property ("VD_USER") in the Install Parameters page and set its value to "ASPNET". In the "Permission" dialog, "Username" field, enter: [VD_USER]

In the Custom Actions page you can create a "Property Set with Formatted" Custom Action (for instance, under "InstallExecuteSequence -> Begin") with the following settings:
- Property Name: VD_USER
- Formatted Text: NETWORK SERVICE
- Execution Condition: VersionNT >= 600

so that the Custom Action will change the value of the Property only on Vista.

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Re: ASP.NET site and permissions - install issue

Great answer .Thanks
liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Re: ASP.NET site and permissions - install issue

Hello,

I have tried to solve it as you suggested.
For the user name it actually worked.

But for the DOMAIN, i was using [%USERDOMAIN] with XP, and NT_AUTHORITY for vista.
The problem is that if the property ([VD_DOMAIN]) is set to [%USERDOMAIN], it doesn't change to the real domain namem but stays [%USERDOMAIN].

It seens that the parsing of the environment variable is done in another stage. Do you think of any way to resolve this?

Thanks,
Lior
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: ASP.NET site and permissions - install issue

Hi,
The problem is that if the property ([VD_DOMAIN]) is set to [%USERDOMAIN], it doesn't change to the real domain namem but stays [%USERDOMAIN].
Note that this may happen if you hardcode the property value in the "Install Parameters" page. To set the VD_DOMAIN property to the expanded value of %USERDOMAIN environment variable you need to use a custom action identically as Ionut suggested in its previous post.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
hgxu2013
Posts: 28
Joined: Wed Dec 11, 2013 1:50 am

Re: ASP.NET site and permissions - install issue

Hi,
I would like to know if i have followed the instructions from this post correctly. I have attached the screenshot of how I did it by setting up a property. Please email if it is.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: ASP.NET site and permissions - install issue

Hello,

I'm afraid you didn't attached any screenshot. Please give us more details about the scenario you are facing with and about what you are trying to achieve.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”