I am creating an installer for an ASP.Net website using WiX. How do you set the ASP.Net version in IIS using WiX?
相关问题
- How does the setup bootstrapper detect if prerequi
- Carriage Return (ASCII chr 13) is missing from tex
- How to store image outside of the website's ro
- Wix: How can I set, at runtime, the text to be dis
- 'System.Threading.ThreadAbortException' in
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
- Add to htmlAttributes for custom ActionLink helper
I found a different way by using the WiX WebApplicationExtension. You can check out the full solution here and here.
I like Wix so far, but man does it takes a lot of digging to find what you are looking for.
First find the correct .NET version folder. Use DirectorySearch/FileSearch to perform search.
Use the above path to call aspnet_regiis.exe and set the version for the webapp from a custom action.
aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1
Here is what worked for me after wrestling with it:
[WEBSITEID] and [VIRTUALDIR] are properties you have to define yourself. [VIRTUALDIR] is only necessary if you are setting the ASP.NET version for an application rather than an entire website.
The sequencing of the custom action is critical. Executing it before InstallFinalize will cause it to fail because the web application isn't available until after that.
Thanks to Chris Burrows for a proper example of finding the aspnet_regiis executable (Google "Using WIX to Secure a Connection String").
jb
This is a bit simpler. I don’t know if this works on updating an existing AppPool, but works for creating an APP Pool and setting the .NET version.
My answer is basically the same as others seen here; I just wanted to offer people another example.
Given the number of file extensions that ASP.NET handles, and that the list changes in each version, I think the most reliable solution is to run
aspnet_regiis
at the end of the installation. This does mean though, that I don't have any support for rollback or uninstallation. I you're creating a new application in IIS, it doesn't really matter because it will be deleted by Wix. If you're modifying an existing application, perhaps you could find out from the registry what version of ASP.NET is configured, and run that version'saspnet_regiis
to undo your changes.The following uses Wix 3.5.
Don't forget to enable ASP 2.0 on the server
Here is the sof-question