Virtual Directory doesn't recognize auth ticket!

  • Thread starter Alioop via .NET 247
  • Start date
A

Alioop via .NET 247

Someone, please help!

I have a website is using forms authentication. A user must beauthenticated to access any part of the website. This workscorrectly except in a subdirectory that is actually a virtualdirectory set up in IIS. Users can never correctly access thefiles in the virtual subdirectory, whether authenticated or not,so it seems as if the subdirectory doesn't recognize the authticket.

Here is my web.config file:[/QUOTE]
<system.web>
<pages enableViewState="false"/>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>

<!-- AUTHENTICATION -->
<authentication mode="Forms">
<forms name="ProtectMe"
loginUrl="/login.aspx"
protection="All"
timeout="60"
path="/"
slidingExpiration="true">
</forms>
</authentication>

<!-- AUTHORIZATION -->
<authorization>
<deny users="?" />
</authorization>


<!-- APPLICATION-LEVEL TRACE LOGGING -->
<trace enabled="false" requestLimit="10" pageOutput="false"traceMode="SortByTime" localOnly="true" />


<!-- SESSION STATE SETTINGS -->
<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=xxx;userid=xxx;password=xxx"
cookieless="false"
timeout="20"
/>

<!-- GLOBALIZATION -->
<globalization requestEncoding="utf-8"responseEncoding="utf-8" />
</system.web>
</configuration>
----------------------------------


If I add this to the web.config file, users can always get in.
<location path="vdocs">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

What I would like is for users to be allowed access only whenthey are authenticated, as with the rest of the site. Doesanyone have any tips?

I've also tried <deny users="?" />, <allow users="?" />, <denyusers="*" />

Any help is greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top