iis7.0 set routing, URL steering, pseudo-static
<system.webServer>
<modules runallmanagedmodulesforallrequests= "true"/>
</system.webServer>
Configure the subdirectory Web. config to eliminate inheritance
Instead of modifying the Web. config file for the root directory, modify the subdirectory's Web. config. Assuming that the root directory's Web. config has a connection string named BlogEngine, to use another connection string named BlogEngine in the subdirectory, you need to first clear the existing connection string (the root directory inherits the ConnectionString settings), clear all the configuration, you can use the clear syntax, clear the configuration of the specified name, you can use the Remove syntax, as follows
<-- The root directory of Web. config-<connectionStrings> <name= " ConnectionString= "providerName="System.Data.SqlClient "/></ ConnectionStrings>
<--Web. config for subdirectories (Clear method)-<connectionStrings> <clear/> <add name= "blogengine" connectionString= "Data source=localhost\sqlexpress; Initial Catalog=blogengine2; User id=xxx; Password=xxx " providerName="System.Data.SqlClient "/></connectionStrings>
<--Web. config for subdirectories (remove method)-<connectionstrings> <remove name= "blogengine "/> <add Name= "blogengine" =" data source=localhost\sqlexpress; Initial Catalog=blogengine2; User id=xxx; Password=xxx "providername=" /></connectionstrings< Span style= "color:blue;" >>
This is just an example of using ConnectionString, which can be applied to all nodes that can be configured, and any configuration node can use the clear and remove nodes to clear the inherited configuration before adding a new configuration. This method is more flexible and preserves some common configurations in the root directory Web. config (without having to reset all).
Configure the subdirectory Web. config to eliminate inheritance, iis7.0 set the route