We have a web application that will be installed as a virtual directory. It will either default to the Default Web Site or allow the choice of the site to which the vir. dir. will be installed, if more than one sites exist on the server.
Now, what I would like to do is set the ASP.NET version to 2.0 if it defaults to an earlier version (more than one instance of the Framework is installed). I would like to be able to do this programmatically and have it function properly in both IIS 5 & 6.
I guess I would need to find it programmatically, by name maybe, then set the version, but I have no idea how to do it. I could create an .exe and would like to do it with VB.NET, I guess. This could then be fired at the tail end of my installation process.
Now, I have another problem. Once this is all said and done, I have an .xml file that holds some settings that needs to be tweaked. The line contains http://<computername>/MySite/Service/etc, etc, etc. If the Vir Dir is installed to the Default Web Site, it seems to work OK edited as such.
If the user chooses to install to another site on the server, I have to correct the <computername> portion in some way. For example, if the other web site functions on port 81, that edit would look like <computername>:81. This seems to work.
My problem comes in if the sites share the same IP address and Port and are differentiated by a Host Header. How would I deal with this programmatically? What would be the best way to get the correct information I need to make this edit correctly?
For this part of my problem, I would like to fire an .exe that or vbscript that would gather this information and either set properties in my installation package or edit an .ini file that is installed. I could then make my edit of the <computername> area by reading the .ini file.
Any help with creating any executables or scripts would be greatly appreciated!!
I need help badly!!