小弟我在使用微软组件的时候遇到了以下这个问题.就是我使用了微软的ajax组件之后.再使用微软提供的url重写组件发生了冲突(也可能是自己写错)请大家在百忙之中看看
我在Web.config文件中是这样设置的
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
<!--
UrlReWrite
-->
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections> <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.;Initial Catalog=LampsNet;User ID=sa;Password=181855" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="ConnectionString" value="server=.;uid=sa;pwd=181855;database=LampsNet"/>
</appSettings>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d+)\.html</LookFor>
<SendTo>~/default2.aspx?id=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/Master.htm</LookFor>
<SendTo>~/MasterPage.aspx</SendTo>
</RewriterRule>
</Rules> <Rules>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/(\d{2})\.html</LookFor>
<SendTo>~/ShowBlogContent2.aspx?year=$1&month=$2&day=$3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/Default\.html</LookFor>
<SendTo>~/ShowBlogContent1.aspx?year=$1&month=$2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.html</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule> <!-- Rules for products lister -->
<RewriterRule>
<LookFor>~/Products/Baverage.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=1</SendTo>
</RewriterRule> <!--<RewriterRule>
<LookFor>~/([\w|\W]+)/([\w|\W]+)/(.[0-2]*)\.html</LookFor>
<SendTo>~/result.aspx?Make=$1&Place=$2</SendTo>
</RewriterRule>--> <RewriterRule>
<LookFor>~/([\w|\W]+)/([\w|\W]+)/more\.html</LookFor>
<SendTo>~/result.aspx?Make=$1&Place=$2</SendTo>
</RewriterRule> </Rules> </RewriterConfig>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation> <httpHandlers>
<remove verb="*" path="*.asmx"/> <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers> <httpModules> <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web> <system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
--> <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
..................................
</system.webServer>
</configuration>
麻烦大家了
我在Web.config文件中是这样设置的
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
<!--
UrlReWrite
-->
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections> <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=.;Initial Catalog=LampsNet;User ID=sa;Password=181855" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="ConnectionString" value="server=.;uid=sa;pwd=181855;database=LampsNet"/>
</appSettings>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d+)\.html</LookFor>
<SendTo>~/default2.aspx?id=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/Master.htm</LookFor>
<SendTo>~/MasterPage.aspx</SendTo>
</RewriterRule>
</Rules> <Rules>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/(\d{2})\.html</LookFor>
<SendTo>~/ShowBlogContent2.aspx?year=$1&month=$2&day=$3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/Default\.html</LookFor>
<SendTo>~/ShowBlogContent1.aspx?year=$1&month=$2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.html</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule> <!-- Rules for products lister -->
<RewriterRule>
<LookFor>~/Products/Baverage.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=1</SendTo>
</RewriterRule> <!--<RewriterRule>
<LookFor>~/([\w|\W]+)/([\w|\W]+)/(.[0-2]*)\.html</LookFor>
<SendTo>~/result.aspx?Make=$1&Place=$2</SendTo>
</RewriterRule>--> <RewriterRule>
<LookFor>~/([\w|\W]+)/([\w|\W]+)/more\.html</LookFor>
<SendTo>~/result.aspx?Make=$1&Place=$2</SendTo>
</RewriterRule> </Rules> </RewriterConfig>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation> <httpHandlers>
<remove verb="*" path="*.asmx"/> <add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers> <httpModules> <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web> <system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
--> <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
..................................
</system.webServer>
</configuration>
麻烦大家了
解决方案 »
- 大侠们,帮忙看看如何解决?
- 从客户端(FCKeditor1="哇哇哇")中检测到有潜在危险的 Request.Form 值
- 用membership做的登录系统,为什么很快就自动登出了?在本机不会有这个问题
- asp.net 关于js和客户端交互的问题?
- 大家帮帮忙
- 关于下载文件时长文件名的问题.如何修改HttpResponseHeaders的编码??
- 关于timer控件的使用
- 一个关于文件上传的问题,分不够再加!
- 如何在DropDownList中让图片和文字并列显示?
- asp.net jsp 之间如何传值和获取值.在线等~~~~~~~~~~~~~!!!!
- 用gridview显示用户信息。怎么样让密码变成***?
- ASP.NET与IIS的问题
<Rules>
<RewriterRule>
<LookFor>~/(\d+)\.html </LookFor>
<SendTo>~/default2.aspx?id=$1 </SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Master.htm </LookFor>
<SendTo>~/MasterPage.aspx </SendTo>
</RewriterRule>
</Rules> </RewriterConfig>
<RewriterConfig>
<Rules> <!-- Rules 是RewriteRule的集合 一般只有一个 除非对应的config类允许定义多个。-->
<RewriterRule>
<LookFor>~/(\d+)\.html </LookFor>
<SendTo>~/default2.aspx?id=$1 </SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Master.htm </LookFor>
<SendTo>~/MasterPage.aspx </SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
重复了,URL重写和AJAX是不会出现冲突的,我也用过