小弟我在使用微软组件的时候遇到了以下这个问题.就是我使用了微软的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&amp;month=$2&amp;day=$3</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/(\d{4})/(\d{2})/Default\.html</LookFor>
        <SendTo>~/ShowBlogContent1.aspx?year=$1&amp;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&amp;Place=$2</SendTo>
      </RewriterRule>-->      <RewriterRule>
        <LookFor>~/([\w|\W]+)/([\w|\W]+)/more\.html</LookFor>
        <SendTo>~/result.aspx?Make=$1&amp;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>
麻烦大家了

解决方案 »

  1.   

    form的action的问题You can fix it easilyhttp://www.cnblogs.com/jzywh/archive/2007/12/20/urlrewriteaction.html
      

  2.   

    这个帖子好面熟,我回复过的啊,csdn的数据回档呢么?你的Rules重复了<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>   </RewriterConfig> 
      

  3.   


    <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> 
      

  4.   

    </Rules> 
    重复了,URL重写和AJAX是不会出现冲突的,我也用过