Hier ist mein Problem ...Web.config Forms Auth> root schützen, sondern den Zugang zu Unterverzeichnis erlauben
Ich habe eine Website in II7 integrierten Pipeline-Modus ausgeführt wird, und ich möchte abgesehen von den Formen Auth auf der gesamten Webseite ermöglichen '/ secure /' Verzeichnis, das das Login-Formular enthält.
Mein Web-Config zur Zeit ungefähr so aussieht ...
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="secure/login.aspx" protection="All" path="/" timeout="999999" slidingExpiration="true" enableCrossAppRedirects="true">
<credentials passwordFormat="Clear">
<user name="user1" password="xxxxxx"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="user1"/>
<deny users="*"/>
</authorization>
</system.web>
<location path="secure">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.webServer>
<!--Enabling Forms Authentication for the Entire Application-->
<modules>
<remove name="FormsAuthenticationModule" />
<add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" />
<remove name="UrlAuthorization" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
<remove name="DefaultAuthentication" />
<add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" />
</modules>
</system.webServer>
</configuration>
Wenn ich die URL der Website besuchen, bekomme ich nur eine Endlosschleife von Umleitungen. Ich habe versucht, die standortspezifischen Autoregeln über den Abschnitt system.web zu setzen, aber dies hatte keine Auswirkungen.
Irgendwelche Ideen?
Cheers,
Robin