开发者

How to prevent a IIS7 Rewrite rule from loading ASP.Net Ajax Client Framework?

I'm developing a webapplication where users will have a custom url just like in Twitter (twitter.com/holiveira). I've created a redirection rule that points to a page where I use the string after the domain name to search in the database.

The problem is that this rule is preventing the Scriptresourse.axd files used by Asp.Net Ajax Client Framework from loading properly.

Any idea how to solve this issue?

This is the rule I'm using:

            <rule name="RewriteDropbox" stopProcessing="true">
                <match url="^([^/]+)/?$"/>
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                </conditions>
                <action type="Rewrite开发者_JS百科" url="dropbox.aspx?clienturl={R:1}"/>
            </rule>


I figured out the problem. The rewrite rule was to loose, since I was not adding the domain to it, and this caused the requests fo the ScriptResource.axd file to get lost, because it was redirected to my dropbox page.

When I added the domain to the rule it worked perfectly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜