500 Internal Server Error when use UrlRewriteModule
hi
i use UrlRewriter in my web site when run at local it's correct but in server i get error:
the error:
39: <httpModules>
40: <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
41: </httpModules>
-------------------
Module ConfigurationValidationModule Notification BeginRequest Handler ExtensionlessUrl-Integrated-4.0 Error Code 0x800700b7 Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'UrlRewriteModule'
and in web config use :
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="urlrewritingnet" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" /> </configSections>
<urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="index.aspx" defaultProvider="RegEx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites> <add name="Rewrite" virtualUrl="^~/(.*).html" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/User/SubGroup.aspx?id=$1" ignoreCase="true" />
</rewrites>
</urlrewritingnet>
<system.web> <!--<customErrors mode="On" defaultRedirect="error.html" />-->
<compilation debug="true" targetFramework="4.0"> <assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> </assemblies> <buildProviders> <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" /> </buildProviders> </compilation> <httpModules> <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" /> </httpModules> </system.web> <connectionStrings> <add name="myEntities" connectionString="metadata=res://*/App_Code.CarModel.csdl|res://*/App_Code.CarModel.ssdl|res://*/App_Code.CarModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\MSSQL;Initial Catalog=myDB;User ID=sa;Password=123;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" /> </connectionStrings> </configuration> and get this error:
Internal Server Error
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.
please help me
thanks