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 226263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:29:39+00:00 2026-05-11T19:29:39+00:00

I have published my MVC project to an an IIS 6 server. Running under

  • 0

I have published my MVC project to an an IIS 6 server. Running under the application MVCapp. The web project gets the url: http://www.domain.com/MVCapp/.

I use forms login for authentication and got an issue after publishing.

The web.config is as follows:

<authentication mode="Forms">
<forms name="CTWebCookie" loginUrl="~/Account/Login" defaultUrl="~/Home/Index" slidingExpiration="true" protection="All" timeout="20"/>
</authentication> 

For example if I run the following code in an action:

FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();

..everything works great and the user is redirected to http://www.domain.com/MVCapp/Account/Login.

However, when the authentication has timed out – at the next page request the user will be redirected to http://www.domain.com/Account/Login. The application root is not routed and the url points at the IIS root.

How can I make the application resolve the correct url after authorization timeout and why does it work when programamticly signing out not not when it automaticly signs out?

Please advice.

  • 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-11T19:29:39+00:00Added an answer on May 11, 2026 at 7:29 pm

    Nevermind, figured it out (stupid mistake), thanks for the help though.

    The problem was a javascript on the login page that reloaded the page as target.top in case of asyncronous requests. The url in the javascript hadn’t been resolved correctly.

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

Sidebar

Related Questions

I recently published my first MVC 2 project to a commercial web server, running
I have published my web project to local iis but framework can't find the
I have just uploaded my published application files to my web server but I
I have an ASP.NET MVC 2 application. Web project contains a reference to SomeProject
I have a project that has, amongst other things, one web application (mvc) and
This is my first windows application. I have published my project and here are
Azure web role (MVC 3 project) wont' start with Twilio controller class I have
I have a strange problem with my MVC 1.0 application that I published on
I have an Asp.Net MVC application using Forms Authentication that is published to the
I have a ASP.Net MVC application which serves user pages with URL like -

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.