asp.net, url rewrite module and web.config

前端 未结 3 390
不思量自难忘°
不思量自难忘° 2020-12-05 00:09

i\'m using ASP.net with .NET 3.5 on IIS7 (Vista) with the URL Rewrite Module from Microsoft.

This means, that i have a


             


        
相关标签:
3条回答
  • 2020-12-05 00:39

    I believe you need to have the URL Rewrite Module "installed" within the web.config file on your system.

    You either need to install the module on your application via the IIS 7.0 interface or have your hosting firm do it for you.

    0 讨论(0)
  • 2020-12-05 00:44

    I believe you need to define the module in your web.config like this:

    <system.webServer>
        <modules>
            <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
        </modules>
    </system.webServer>
    

    Update: Intellisense can be setup here:

    http://ruslany.net/2009/08/visual-studio-xml-intellisense-for-url-rewrite-1-1/

    Update: Verify that the sectionGroup is identified in %systemroot%\system32\inetsrv\config\applicationHost.config:

    <sectionGroup name="rewrite">
        <section name="rules" overrideModeDefault="Allow" />
        <section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" />
        <section name="rewriteMaps" overrideModeDefault="Allow" />
    </sectionGroup>
    
    0 讨论(0)
  • 2020-12-05 00:58

    I was able to get this working in Visual Studio 2010.

    Start with Ruslan's post here and download the 2.0 IntelliSense file. Then, just follow the directions he posted previously here. All I ended up doing was running the following command as Ruslan instructs:

    C:\download_directory\rewrite2_intellisense>cscript UpdateSchemaCache.js

    As Christoph points out in his comment, make sure you replace VS90COMNTOOLS with VS100COMNTOOLS in UpdateSchemaCache.js before running the above command if you are using Visual Studio 2010.

    I did not need to restart Visual Studio. I added the <rewrite> section only to the applicable Web.config transformation files, as having it in the main Web.config breaks local debugging.

    0 讨论(0)
提交回复
热议问题