Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7165689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:17:26+00:00 2026-05-28T14:17:26+00:00

I have an application in a virtual directory (ASP.Net 4.0 C#). It is secured

  • 0

I have an application in a virtual directory (ASP.Net 4.0 C#). It is secured with forms authentication. Within my application are sub directories so that I have a content tree that matches the rough order of my website

http://www.server.com/application/sub-directory1/sub-directory2/

 <forms name=".ADAuthCookie" loginUrl="Login.aspx" slidingExpiration="true" timeout="100" defaultUrl="~/Default.aspx"/>

What should the “loginUrl” be to allow it to work from a subdirectory? i.e. if your session times out, how can you get the loginUrl to redirect you to the right place?

if you set it to loginUrl=”~/Login.aspx” and you are in sub-directory 1, it redirects you to http://www.server.com/application/sub-directory1/login.aspx which does not exist. I want it to always redirect to http://www.server.com/application/login.aspx

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:17:27+00:00Added an answer on May 28, 2026 at 2:17 pm

    Did you configure the loginUrl inside the web.config file located at the root folder? If so that should work. I have an asp.net 3.5 with a similar structure. When I timeout inside http://localhost/Providence /Member/Mail/NewMessage.aspx, I am redirected to http://localhost/Providence/Login.aspx?ReturnUrl=%2fProvidence%2fMember%2fMail%2fNewMessage.aspx.

    I have not tried this with asp.net 4.0 though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET application (Root Application) that has a virtual directory set up
I have a 3.5 ASP.Net WebForm parent application. The parent uses forms authentication. I
I have a ASP.NET web application that uses Themes. Inside the theme directory are
I have a simple ASP.NET 3.5 application running under IIS7 under a virtual directory.
I have an ASP .net Web Application already deployed on my local machine (virtual
I have an ASP.NET MVC application for which I store uploaded content files in
I have an ASP.NET application which features some server-side includes. For example: <!--#include virtual=/scripts.inc
I have an ASP.NET Web Application project that I am using to host a
We have an ASP.NET 2.0 application that is available as a trial download. As
I have an ASP.NET MVC 3 application, that resides in lets say localhost/myapp under

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.