Questions tagged «.net-4.0»

1
自动启动ASP.NET应用程序是否需要serviceAutoStartProvider属性?
我一直在阅读Scott Guthrie在“自动启动ASP.NET应用程序”上的帖子,其中提供了有关如何设置ASP.NET 4.0应用程序以自动启动的示例。 <applicationPools> <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" /> </applicationPools> <!--...--> <sites> <site name="MySite" id="1"> <application path="/" serviceAutoStartEnabled="true" serviceAutoStartProvider="PreWarmMyCache" /> </site> </sites> <!--...--> <serviceAutoStartProviders> <add name="PreWarmMyCache" type="PreWarmCache, MyAssembly" /> </serviceAutoStartProviders> 从他的帖子中不清楚的是,以下配置是否将自动启动ASP.NET应用程序: <applicationPools> <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" /> </applicationPools> <!--...--> <sites> <site name="MySite" id="1"> <application path="/" serviceAutoStartEnabled="true" /> </site> </sites> 此处的区别在于,没有指定要启动的类。理想情况下,将仅加载应用程序。有关网站申请的文档暗示该serviceAutoStartEnabled属性需要一个serviceAutoStartProvider属性才能工作。但是,如果没有提供附加属性,则没有任何指示。 …

3
IIS7中缺少Asp.net 4.0处理程序映射
我有两个运行asp.net 4.0应用程序的Windows 2008 R2服务器。出现问题的服务器实际上可以很好地加载asp.net页面,但是如果有任何ajax调用,它们将无法工作。我注意到与其他服务器一样,该服务器的IIS中没有.net 4.0特定的处理程序映射。 实际上,它缺少所有.net 4.0映射(.axd,.soap,.cshtm,.ashx甚至是.aspx)。我试过运行“ aspnet_regiis -ir”,但这没有帮助。我应该重新安装.net 4.0框架吗?手动添加所有这些缺少的映射?还有其他事情吗? 我不想做的是在web.config中添加大量处理程序,在运行的服务器上不需要它们,因此在损坏的服务器上不需要。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.