Issues with Web.config in IIS 7 (Vista) and Modules

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mazdotnet

    Issues with Web.config in IIS 7 (Vista) and Modules

    Hi,
    I'm using UrlRewriter.NET in my project which is causing problems when
    in Vista (same code works fine on Windows XP). I'm going by the
    example in Scott's Blog http://weblogs.asp.net/scottgu/archi...h-asp-net.aspx.
    In Vista when I press F5 or Control F5 I get an error message saying

    HTTP Error 500.19 - Internal Server Error
    Description: The requested page cannot be accessed because the related
    configuration data for the page is invalid.

    Error Code: 0x800700b7
    Notification: BeginRequest
    Module: IIS Web Core
    Requested URL: http://localhost:80/UrlRewrite_HttpModule2/Default.aspx
    Physical Path: C:\inetpub\wwwr oot\UrlRewrite_ HttpModule2\Def ault.aspx
    Logon User: Not yet determined
    Logon Method: Not yet determined
    Handler: Not yet determined
    Config Error: Cannot add duplicate collection entry
    Config File: \\?\C:\inetpub\ wwwroot\UrlRewr ite_HttpModule2 \web.config
    Config Source: 31: <remove name="ScriptMod ule"/>
    32: <add name="UrlRewrit er"
    type="Intellige ncia.UrlRewrite r.RewriterHttpM odule,
    Intelligencia.U rlRewriter"/>
    33: <add name="ScriptMod ule" preCondition="m anagedHandler"
    type="System.We b.Handlers.Scri ptModule, System.Web.Exte nsions,
    Version=3.5.0.0 , Culture=neutral , PublicKeyToken= 31BF3856AD364E3 5"/></
    modules>


    My configration file contains the following sections
    <configSections >
    <section name="rewriter" requirePermissi on="false"
    type="Intellige ncia.UrlRewrite r.Configuration .RewriterConfig urationSectionH andler,
    Intelligencia.U rlRewriter"/>
    ......
    httpModules>
    <add name="UrlRewrit er"
    type="Intellige ncia.UrlRewrite r.RewriterHttpM odule,
    Intelligencia.U rlRewriter"/>
    <add name="ScriptMod ule" type="System.We b.Handlers.Scri ptModule,
    System.Web.Exte nsions, Version=3.5.0.0 , Culture=neutral ,
    PublicKeyToken= 31BF3856AD364E3 5"/></httpModules>
    ........
    <modules runAllManagedMo dulesForAllRequ ests="true">
    <remove name="ScriptMod ule"/><add name="UrlRewrit er"
    type="Intellige ncia.UrlRewrite r.RewriterHttpM odule"/>
    <add name="ScriptMod ule" preCondition="m anagedHandler"
    type="System.We b.Handlers.Scri ptModule, System.Web.Exte nsions,
    Version=3.5.0.0 , Culture=neutral , PublicKeyToken= 31BF3856AD364E3 5"/></
    modules>

    So it complains that we have duplicate module sections? Any idea how I
    can enable Integrated ..NET mode on this? I tried using

    C:\Windows\Syst em32\inetsrv>ap pcmd.exe migrate config "Default Web
    Site/UrlRewri
    te_HttpModule2"
    ERROR ( message:Configu ration error
    Filename: \\?\C:\inetpub\ wwwroot\UrlRewr ite_HttpModule2 \web.config
    Line Number: 15
    Description: Cannot add duplicate collection entry
    .. )

    Which also says the same thing. Can anyone please tell me how I can
    get this working in IIS7 on Vista Ultimate?

    Thx
    Maz
Working...