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

M

mazdotnet

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/archive/2007/02/26/tip-trick-url-rewriting-with-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\wwwroot\UrlRewrite_HttpModule2\Default.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\UrlRewrite_HttpModule2\web.config
Config Source: 31: <remove name="ScriptModule"/>
32: <add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule,
Intelligencia.UrlRewriter"/>
33: <add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></
modules>


My configration file contains the following sections
<configSections>
<section name="rewriter" requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,
Intelligencia.UrlRewriter"/>
......
httpModules>
<add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule,
Intelligencia.UrlRewriter"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/></httpModules>
........
<modules runAllManagedModulesForAllRequests="true">
<remove name="ScriptModule"/><add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
<add name="ScriptModule" preCondition="managedHandler"
type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></
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\System32\inetsrv>appcmd.exe migrate config "Default Web
Site/UrlRewri
te_HttpModule2"
ERROR ( message:Configuration error
Filename: \\?\C:\inetpub\wwwroot\UrlRewrite_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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top