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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:00:46+00:00 2026-05-16T15:00:46+00:00

This is going to sound quite bizarre. I have one ASP .NET MVC 2

  • 0

This is going to sound quite bizarre. I have one ASP .NET MVC 2 application. Works great. Routing is not very complicated. I am running this on windows 2003 IIS 6, so I have to use the {controller}.aspx routing configuration.

Anyhow, I’ve set the same MVC 2 application up twice under different virtual directories on IIS. This is literally a copy/paste of the existing app files to the new directory. The virtual directory / app name is of course different for each.

Routing works perfect in the original application. In the second, I can’t seem to get the login page to post to the login post action, let alone make it beyond that.

The most complicated url in my application is something akin to:

http://server:90/appName/controller.aspx/AnAction?StartPeriod=2008

My global.asax.cs looks like:

        routes.IgnoreRoute("{resource}.html/{*pathInfo}");
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default",
            "{controller}.aspx/{action}/{id}",
            new { controller = "Account", action = "LogOn", id = UrlParameter.Optional }
          );

        routes.MapRoute(
          "Root",
          "",
          new { controller = "Account", action = "LogOn", id = "" }
        );

The application only has 2 controllers: Account & Mpa. Again, the exact same compiled code exists in both places on the same IIS server under different app names/virtual directories. Can anyone think of a reason I would get different behavior in the copied one (doesn’t work/can’t find views/throws 404’s for just about everything beyond displaying the LogOn page of Account controller)?

EDIT 1

Another thing worth mentioning is that I’m using ValidateAntiForgeryToken attributes on all post methods in the Mpa.aspx controller. This is the controller that should be redirected to after the post to Account.aspx (which doesn’t seem to really happen). I thought the issue was that the salt value used for the ValidateAntiForgeryToken was the same for both applications since I copied & pasted. I’ve since changed the value for the original application, but I’m still getting the same results.

FYI: Here are the details returned from firebug. 

    **GET Account.aspx**
    http://server:90/MpaDemo/Account.aspx 200 OK 2.9 KB 15ms

    ParamsHeadersPostPutResponseCacheHTML
    Response Headersview source
    Date    Thu, 26 Aug 2010 20:42:57 GMT
    Server  Microsoft-IIS/6.0
    X-Powered-By    ASP.NET
    X-AspNet-Version    2.0.50727
    X-AspNetMvc-Version 2.0
    Set-Cookie  ASP.NET_SessionId=z1q43ezg2hvtx255i5y5df21; path=/; HttpOnly
    Cache-Control   private
    Content-Type    text/html; charset=utf-8
    Content-Length  2921
    Request Headersview source
    Host    server:90
    User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
    Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language en-us,en;q=0.5
    Accept-Encoding gzip,deflate
    Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive  115
    Connection  keep-alive
    Authorization   NTLM TlRMTVNTUAADAAAAGAAYAHoAAAAYABgAkgAAAAoACgBIAAAADgAOAFIAAAAaABoAYAAAAAAAAACqAAAABYKIogUBKAoAAAAPdABtAGsAbgBiAGIAMAAwADUAagB4AGIATQBTAEoAQQBLAE0ATwBMADIANAAxADAAOADIJ4z3L+WAUAAAAAAAAAAAAAAAAAAAAABhigoN+1bIPZirxXzNQHWNIu/rx4Senq8=


    **Account.aspx POST**

    Date    Thu, 26 Aug 2010 20:44:26 GMT
    Server  Microsoft-IIS/6.0
    X-Powered-By    ASP.NET
    X-AspNet-Version    2.0.50727
    X-AspNetMvc-Version 2.0
    Location    /MpaDemo/Mpa.aspx/CustomErrorView?aspxerrorpath=/MpaDemo/Account.aspx
    Cache-Control   private
    Content-Type    text/html; charset=utf-8
    Content-Length  200
    Request Headersview source
    Host    SERVER:90
    User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
    Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language en-us,en;q=0.5
    Accept-Encoding gzip,deflate
    Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive  115
    Connection  keep-alive
    Referer http://SERVER:90/MpaDemo/Account.aspx
    Cookie  ASP.NET_SessionId=z1q43ezg2hvtx255i5y5df21

    **GET CustomErrorView**

    Response Headersview source
    Date    Thu, 26 Aug 2010 20:44:26 GMT
    Server  Microsoft-IIS/6.0
    X-Powered-By    ASP.NET
    X-AspNet-Version    2.0.50727
    Cache-Control   private
    Content-Type    text/html; charset=utf-8
    Content-Length  1534
    Request Headersview source
    Host    server:90
    User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
    Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language en-us,en;q=0.5
    Accept-Encoding gzip,deflate
    Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive  115
    Connection  keep-alive
    Referer http://server:90/MpaDemo/Account.aspx
    Cookie  ASP.NET_SessionId=z1q43ezg2hvtx255i5y5df21
  • 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-16T15:00:47+00:00Added an answer on May 16, 2026 at 3:00 pm

    Okay, this is annoying. I forgot to check permissions on the folders I copied. Apparently, attempting to write to the log & not being able to threw an error, which my try/catch block caught, but then in the catch, I try logging the error, which threw another one, which my general catch all page should have caught, but didn’t because the web.config had it under another controller.

    sigh

    Long story short, I removed the controller requirement for the shared error page like so:

    Was: defaultRedirect="~/Mpa/CustomErrorView" Is now: defaultRedirect="~/CustomErrorView"

    The view for the error page is in the Shared directory of the Views folder.

    Lastly, I added the correct permissions to my logging folder.

    Now it all works.

    Wow. This took me 6 hours to figure out. I feel really, really lame.

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

Sidebar

Related Questions

Ok this is going to sound strange, but I have inherited an app that
All right, this one is going to sound very weird and I don't know
This is going to sound like an odd request, but... I have a web
I'm afraid this is going to sound redundant. I have done my diligence, and
This is going to sound so basic as to make one think I made
Sorry this is going to sound like a ridiculous question but can methods (not
This is going to sound too silly / too basic - sorry about that,
Ok I know this is going to sound weird but it is what the
Firstly, this is going to sound like homework, but it ain't. Just a problem
This is probably going to sound like a sci-fi request, though – is there

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.