开发者

Web.Config httpModules Internal Server Error

I updated my web.config to support URL Rewriting but when I use it on my web server it shows the error:

Internal Server Erro开发者_开发问答r The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

My web.config is as follows:

<configuration>
  <configSections>
    <section name="rewriter" 
             requirePermission="false"                           
             type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
  </configSections>

  <rewriter>
    <rewrite url="~/subjects/(.+).aspx" to="~/subject.aspx?ebook-subject=$1"/>
    <rewrite url="~/books/(.+).aspx" to="~/book.aspx?ebook-name=$1"/>
    <rewrite url="~/booklinks/(.+).aspx" to="~/booklink.aspx"/>
    <rewrite url="~/subcategories/(.+).aspx" to="~/subcategory.aspx?ebook-subcategory=$1"/>
    <rewrite url="~/categories/(.+).aspx" to="~/category.aspx?ebook-category=$1"/>
    <rewrite url="~/explainsubjects/(.+).aspx" to="~/explainsubject.aspx?ebook-subject=$1"/>

    <rewrite url="~/search/search.aspx" to="~/search.aspx"/>
    <rewrite url="~/search/searchresults.aspx" to="~/searchresults.aspx"/>
  </rewriter>
  <system.web>
    <httpModules>
      <add name="UrlRewriter" 
           type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
    </httpModules>
    <compilation debug="true"/>
    <authentication mode="Windows"/>
    <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
    </customErrors>
    <pages/>
  </system.web>
</configuration>

What am I doing wrong?


This post solved my problem.


I take it you have tried on the server itself and checked the event logs.


I think this exception is thrown when the contents of the config file are invalid.

try taking out all the redirects and see if the error occurs.

the httpModule and configSections sections look ok to me.

EDIT: also, as @mikeblake says, check the logs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜