简体   繁体   中英

URL Rewrite error in website configuration

I am trying to configure a ASPDotNetStoreFront application on local machine , that was running perfectly on live server.

While trying to run it locally it is giving error

HTTP Error 500.52 - URL Rewrite Module Error.

I have gone through many articles and forums but could not resolve the issue. I am using windows 7, IIS7 and Target framework is 3.5 and AspDotNetStoreFront version is 9.1.0.1

Error message screen shot is given below

在此处输入图片说明

This is because the sub virtual directory inherit the setting from parent node(the site root here). So there will be duplicated rewrite rules in the virtual directory. You can disable the inheritance by using the following element:

<location path="." inheritInChildApplications="false">
<system.webserver>
 ...
<system.webserver>
</location>

However, point the site and virtual directory to the same physical path is not recommended. In this way, any configurations changes in site will be replicated to virtual directory. Obviously, changes on virtual directory also will be replicated to site.

I would suggest not using the default website or localhost as a binding and use staging.aspdotnetstorefront.[yourdomainhere].local or similar. Afterwards you can modify your hosts file by adding 127.0.0.1 staging.aspdotnetstorefront.[yourdomainhere].local for a loop back. This way there are no settings to inherit.

If you do need localhost for license reasons, you could always change the port on the binding (IE localhost:88).

I should also mention that you may need to modify your solution (if you are using the source) to have the web project point to the updated binding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM