asp.net-mvc – 如何使用WIX在IIS 6上安装ASP.NET MVC 3应用程序
安装到IIS-6时需要考虑以下事项:
>需要注册ASP.NET 4(可能使用aspnet_regiis.exe) 这是我到目前为止所拥有的: <iis:WebDirProperties Id='WebDirProperties' Script='yes' Read='yes Execute='no' WindowsAuthentication='yes' AnonymousAccess='no' AuthenticationProviders='NTLM,Negotiate' /> <!-- SO has some good posts on selecting the website from a dropdown --> <iis:WebSite Id='SelectedWebSite' Directory='WWWROOT' SiteId='[WEBSITE_ID]' Description='[WEBSITE_DESCRIPTION]'> <iis:WebAddress Id='AllUnassigned' Port='80' IP='*'/> </iis:WebSite> <Component Id="ProjWebApp" Guid="{B4BE9223-7109-4943-AE4E-8F72FA350D02}" Win64="$(var.IsWin64)" NeverOverwrite="yes" Transitive="yes"> <CreateFolder/> <iis:WebAppPool Id="ProjAppPool" Name="[APPPOOLNAME]" Identity="networkService" ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated" /> <iis:WebVirtualDir Id="ProjVDir" DirProperties="WebDirProperties" Alias="[WEBAPPNAME]" Directory="WEBFILESDIR" WebSite="SelectedWebSite"> <iis:WebApplication Id="ProjApp" Name="[WEBAPPNAME]" WebAppPool="ProjAppPool"> <iis:WebApplicationExtension CheckPath="no" Script="yes" Executable="[ASPNETISAPIDLL]" Verbs="GET,HEAD,POST" /> </iis:WebApplication> </iis:WebVirtualDir> </Component> <!-- other apps may start using it once installed so it must be permanent --> <Component Id="EnableASPNet4Extension" Permanent="yes" Guid="{C8CDAB96-5DDC-4B4C-AD7E-CD09B59F7813}"> <iis:WebServiceExtension Id="ASPNet4Extension" Group="ASP.NET v4.0.30319" Allow="yes" File="[ASPNETISAPIDLL]" Description="ASP.NET v4.0.30319" UIDeletable="no" /> </Component> 我有一个自定义操作来注册ASP.NET与IIS: <?if $(var.Platform) = x64 ?> <CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd" Property="AspNetRegIIS_InstallNet40Cmd" Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR64]aspnet_regiis.exe" -ir"/> <?else?> <CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd" Property="AspNetRegIIS_InstallNet40Cmd" Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR]aspnet_regiis.exe" -ir"/> <?endif?> 问题 这几乎可行.此时有两个问题: > IIS扩展不遵守IIS-6上的托管运行时版本,因此应用程序没有设置ASP.NET版本. 鉴于上述缺点,如何在已安装ASP.NET 2的情况下使用WIX将ASP.NET MVC 3应用程序安装到具有适当通配符映射的IIS-6上? 解决方法
事实证明,这对我来说是一个愚蠢的错误.当我没有包含的部分(自定义操作和属性定义)正确时,上述内容足以使ASP.NET v4应用程序正常工作.
在我的情况下,我不小心引用了aspnet_isapi.dll的路径,因此它实际上没有被正确拾取.
这是部分正确的.虽然在设置应用程序池时它不使用托管运行时版本,但只要某些内容正确映射到aspnet_isapi.dll,IIS就会实际获取ASP.NET版本.一旦我修好了路径,一切都正常.
如果需要,您可以使用adsutil.vbs来管理它: C:InetpubAdminScripts>adsutil.vbs enum w3svc/998577302/root/AppName KeyType : (STRING) "IIsWebVirtualDir" ... ScriptMaps : (LIST) (1 Items) "*,C:WINDOWSMicrosoft.NETFramework64v4.0.30319aspnet_isapi.dll,1,GET,POST" 通过在adsutil.vbs中使用set命令,您可以根据需要设置ScriptMaps属性. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc-3 – 如何从RazorViewEngine访问Request对象?
- ASP.Net 4.0 Web场缓存
- asp.net-mvc – 用于支持多种语言的ASP MVC技术
- ASP.NET:如何从通用处理程序获取文件的虚拟路径?
- asp.net – asp mvc http以对象作为参数获取动作
- asp.net – 为WebSite添加配置转换
- ASP.NET Core 菜鸟之路:从Startup.cs说起
- 如何为ASP.NET 5 MVC 6实现NoSQL身份提供程序
- 谈谈你最熟悉的System.DateTime[下篇]
- asp.net-mvc – MVC错误 – 传入字典的模型项目的类型为“S
- ASP.NET C#目标空白无法在LinkBut??ton上运行
- ASP.NET machineKey配置部分默认位置
- asp.net-mvc – ASP.NET MVC – 保持控制器薄(太
- 在Azure中设置ASP.NET 5 Web应用程序的SQL连接字
- asp.net-mvc – 未部署ASP.NET MVC3区域_ViewSta
- 使用Asp.net在jquery中更改事件
- 如何使用ASP.NET获取访问者位置(国家,州和城市)
- asp.net – 缓存http处理程序.ashx输出
- oauth-2.0 – ASP.NET MVC 5中的自定义oAuth客户
- asp.net – “2015年4月20日Google帐户的OpenID2