尝试在IIS7的默认应用程序池中部署。net 3.5网站,并将框架部分设置为4.0,我得到以下错误。
有一个副本 包含。扩展/脚本/ scriptResourceHandler”部分 定义的。
对这些冒犯的行进行评论也无济于事。你能给我点建议吗?
尝试在IIS7的默认应用程序池中部署。net 3.5网站,并将框架部分设置为4.0,我得到以下错误。
有一个副本 包含。扩展/脚本/ scriptResourceHandler”部分 定义的。
对这些冒犯的行进行评论也无济于事。你能给我点建议吗?
当前回答
我已经解决了它,做以下步骤:
我在IIS中创建了一个新的应用程序组。 打开网站或web应用程序的高级设置 这个问题。 并设置新应用程序的组。
下面是这些步骤的图像:
其他回答
如果像我一样,需要以v4为目标,但只能使用。net 3.5构建,请遵循这里的说明。只需替换在你的网页。配置<configSections>的全部内容:
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
在我的情况下,我想手动添加urlrewrite规则,看不到明显的错误(我错过了<rules>标签):
错误代码:
<rewrite>
<rule name="some rule" stopProcessing="true">
<match url="some-pattenr/(.*)" />
<action type="Redirect" url="/some-ne-pattenr/{R:1}" />
</rule>
</rewrite>
</system.webServer>
</configuration>
正确的代码(带有规则标签):
<rewrite>
<rules>
<rule name="some rule" stopProcessing="true">
<match url="some-pattenr/(.*)" />
<action type="Redirect" url="/some-ne-pattenr/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
在我的例子中,我有两个不同的应用程序共享同一个应用程序池。第一个使用的是。net4.5框架,而新的使用的是2.0。当我把第二个应用程序更改为它自己的应用程序池时,它开始工作很好,没有更改web.config。
显然,其他人也有这个问题。他们在Framework 4.0中重新构建。你能吗?
另外,请参阅确保您的IIS是新鲜的。
我的决心有点愚蠢。
我安装了一个。net 3.5 创建另一个应用程序池并选择。net 3.5(它说2.0.5077 in 下拉菜单) 把我的网站加入了应用程序池 回收旧的和新的水池,工地开始工作。
结果是我没有安装3.5,尽管windows功能的开关说我安装了,并创建了另一个应用程序池来使用。我希望这能帮助到其他人。