ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Questions on ASP.Net Installation

I would like to simplify the installation of my web application with the following steps.

New Installation
1. Define the Web Application folder, which will be created as Virtual Directory
2. Configure web.config settings. Example : connection string, application settings
3. Install web application
3. Execute SQL scripts based on the connection string setting
4. Register COM dll

Update/Patch
1. Auto selects the installed virtual directory
2. Prompt user to stop if IIS services is running
3. Retrieve current web.config setting and display for edit
4. Install web application
5. Execute SQL scripts based on the connection string setting
6. Unregister the old COM dll and register the latest COM dll
7. Restart IIS services if it was stopped previously

Are these proposed steps achievable?

Thanks in advance.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,

Indeed Advanced Installer supports all these features. You might want to follow our tutorial on Configuring IIS Web Sites and Virtual Directories.
Also, the COM page contains the necessary options to facilitate the installation of a COM DLL.
In addition to that, our tutorial on Configuring a Database with SQL Scripts should aid you in setting up the installer to execute the needed SQL Scripts.
Anything else that might be needed, that isn't already supported by Advanced Installer can easily be done using our enhanced support for Custom Actions.

Let us know if you encounter any problems.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,

Thanks for your reply. I'm now facing some problems in Step 1 & 2.

1. Define the Web Application folder, which will be created as Virtual Directory
Tried to follow the instruction in Need some help in Virtual Directory
to create user defined folder as virtual directory, but hit an error. You may refer to the last post by me.

2. Configure web.config settings. Example : connection string, application settings
Let user configure App.Config/ Web.Config from Installation The Files and Folders (my web deploy folder) already contain the web.config, do I need to import manually? It would be appreciated if there is a sample as I'm not sure where to start.

Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,
Tried to follow the instruction in Need some help in Virtual Directory
to create user defined folder as virtual directory, but hit an error
What was the value that the property had when you were setting the virtual directory's name? Also, please send your .aip project file to support at advancedinstaller dot com so we can take a look.
Configure web.config settings. Example : connection string, application settings
Let user configure App.Config/ Web.Config from Installation The Files and Folders (my web deploy folder) already contain the web.config, do I need to import manually? It would be appreciated if there is a sample as I'm not sure where to start.
Using the existing web.config and importing it is the recommended option. You can then alter it using the XML editor.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,
What was the value that the property had when you were setting the virtual directory's name? Also, please send your .aip project file to support at advancedinstaller dot com so we can take a look.
By default the property is set to APPDIR, which I didn't change, and my virtual directory name is APPDIR also. If I use the default setting, then the Virtual Directory created after installation will be APPDIR instead of user defined folder name.
p1.png
p1.png (7.08 KiB) Viewed 13575 times
Using the existing web.config and importing it is the recommended option. You can then alter it using the XML editor.
Is my setting correct?
p2.png
p2.png (5.35 KiB) Viewed 13575 times
Should I create a Dialog for this? How do I bind to the web.config value? Any sample would be appreciated.

I have sent my aip project to support's mail, kindly advise.

Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,

Please note that APPDIR without square brackets is just a name, the Virtual Directory will end up being named APPDIR. You should specify a property which holds a name for the virtual directory, and place that property in square brackets.

After studying your project, it seems you have placed APPDIR in square brackets. This means the name of the Virtual Directory will be the value contained in APPDIR, which is a path (ex. "C:\Program Files\SomeProduct" ). That is not a valid name for a folder.

In the attached project, on the Install Parameters page, note the existance of VD_NAME property. This property will be changed by the user from the FolderDlg, and should be used as a virtual directory name on the IIS page.

Regarding the web.config. It appears your setting is correct. Windows Installer will install the web.config (XML Configuration File in your screenshot), after which it will attempt to merge web.config (XML File Windows Installer in your screenshot) with the installed one.

In the attached project, note the web.config file next to the project. The customErrors has mode="off". After being installed, it will have mode="on". This is caused by the web.config Windows Installer XML from the Files and Folders page. Open that in the XML Editor, and note the Update radio button is checked for both system.web and customErrors tags. This ensures that these tags will update the existing ones from the web.config that was imported into the project.

Regards,
Gabriel
Attachments
web.config settings
web.config settings
Untitled.png (17.81 KiB) Viewed 13567 times
Sample.zip
sample project
(2.85 KiB) Downloaded 479 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,

Thanks for the sample, I'm able to create the Virtual Directory based on user defined name by using [VD_NAME].

Regarding to the web.config, I'm not able to update the value in web.config from user input after the installation.
s1.png
s1.png (12.32 KiB) Viewed 13558 times
s2.png
s2.png (4.92 KiB) Viewed 13558 times
Am I missing something? Attached is the modified sample project. Kindly advise.


Thanks.
Attachments
Sample.rar
(3.34 KiB) Downloaded 449 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,

There are a few things to note:
- for a property to be accessible throughout the entire installer, it needs to be all-uppercase. Therefore mode becomes MODE.
- in the attachement, MODE is initialized with "off" on the Install Parameters
- on the Dialogs page, I changed "mode" to "MODE"
- on the Files and Folders page, I changed the "mode" attribute in the config from mode = "off" to mode = [MODE]. The "mode" attribute in the xml will take the value of the [MODE] Installer Property.

Also note I removed the IIS Virtual Directory and the IIS Launch Condition you had so I could test this on my machine.

Best regards,
Gabriel
Attachments
Sample.zip
(3.12 KiB) Downloaded 492 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,

Thanks for the guidance, it's working. However, I hit the following error when starting the sample project, I have tried to reinstall but no luck.
err1.png
err1.png (24.85 KiB) Viewed 13554 times
The How to browse for SQL Servers on the network? in User Guide stated that
For ComboBox and ListBox controls, the output format will be as follows:

Item text: ServerName (Server's Description) - when using Windows Network Manager API, or ServerName\InstanceName;Clustered:No;Version:9.00.3042.00 - when using ODBC Driver Manager (The item text could be reduced to just the server name, if the remote machine did not provide any additional information.)
Item value: ServerName (always)
Is it possible not to display the Clustered and Version?
sql1.png
sql1.png (51.13 KiB) Viewed 13554 times
Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,
Thanks for the guidance, it's working. However, I hit the following error when starting the sample project, I have tried to reinstall but no luck.
Oops, sorry about that, my mistake. The attached sample exemplified what I said in my previous post. Although it appears you got it to work, let me know if you still want the sample and I will fix it and resend.
Is it possible not to display the Clustered and Version?
Here is an excerpt from the guide you mentioned:
"A flat, comma separated list of SQL Servers (names only) will be dumped into the SqlServerBrowseOutput property. You can use this value if you wish to do any custom processing of the servers list.".
Basically, you can use the SQLServerBrowseOutput property to repopulate the combo-box. Before that, you can create a UI Custom Action to process the contents of this property ( Change the format, eliminate unneeded information etc.).

You might also want to check out our Populating ComboBox and ListBox controls guide for information on how to achieve this.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,
Oops, sorry about that, my mistake. The attached sample exemplified what I said in my previous post. Although it appears you got it to work, let me know if you still want the sample and I will fix it and resend.
Yes, I would like to refer to the sample. Thanks.
You might also want to check out our Populating ComboBox and ListBox controls guide for information on how to achieve this.
I'm not familar with vbscript, may I know where/how should I define the format in function PopulateComboFromFile()?

Code: Select all

IComboData = comboProp & SEP_1 & CStr(orderStart) & SEP_1 & CStr(orderDelta)
A simple example would be appreciated.


Thanks.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Questions on ASP.Net Installation

Hello,

Attached is the fixed sample. I hope you find it of use.
I'm not familar with vbscript, may I know where/how should I define the format in function PopulateComboFromFile()?
I am sorry but I am afraid I do not understand your question. Could you please reformulate it?

Best regards,
Gabriel
Attachments
Sample.zip
(2.88 KiB) Downloaded 511 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,

Sorry for the confusion. I'm refering to the ComboListExample.vbs, ComboBox and ListBox sample in Working with Windows Installer ComboBox and ListBox controls and not sure where to change the format for SqlServerBrowseOutput. Do you mind to provide a simple example?

Thanks.
ysliew
Posts: 14
Joined: Thu Dec 17, 2009 5:09 am

Re: Questions on ASP.Net Installation

Hi Gabriel,

I'm refering to the How to test SQL connection parameters? to add the test SQL connection parameters before proceeding to the select database dialog. It's working and prompt if I keyed in invalid username/password.
p1.png
p1.png (65.07 KiB) Viewed 13529 times
However, if I leave both username and password blank, the connection checking is not working and proceed to the select database dialog. Here is my event settings.
p2.png
p2.png (27.14 KiB) Viewed 13529 times
Attached is my sample project. Kindly advise, thanks.
Attachments
Sample.rar
(4.76 KiB) Downloaded 574 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Questions on ASP.Net Installation

Hi,
I'm refering to the ComboListExample.vbs, ComboBox and ListBox sample in Working with Windows Installer ComboBox and ListBox controls and not sure where to change the format for SqlServerBrowseOutput.
Please note that this sample script is specific to the example which uses it. The script populates a combo with environment variables and it's easy to modify only if you know VBScript. The recommended approach is to use a separate custom action to modify the "SqlServerBrowseOutput" and then use the predefined action to populate the combo (like explained in the tutorial).
if I leave both username and password blank, the connection checking is not working and proceed to the select database dialog.
I'm not sure why you are encountering this behavior. What happens when you try to connect manually (outside the installer) using an empty username and password? Perhaps there is a problem with the SQL Server configuration.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”