Reputation: 2890
According to a document "How to: Specify a Port for the ASP.NET Development Server". For example, if you are testing a page called MyPage.aspx, when you run the page on the Visual Studio Development Server, the URL of the page might be the following:
http://localhost:31544/MyPage.aspx
Since IIS Express is the default web server for web application projects in Visual Studio 2012. I changed my project's Properties as described below:
Previously, I was able to debug my .Net MVC project with that approach without any problem.
But recently, the second URL's segment is being generated randomly every time I debug my project something like below:
http://localhost:5086/(S(ffi1hjahbgr1qcwzhziq2wo3))/MyPage.aspx
http://localhost:5086/(S(m3nq32tgyznmc04s5htp1exo))/MyPage.aspx
What should I do to remove the second segment?
Upvotes: 1
Views: 161
Reputation: 115017
It seems like you have configured ASP.NET Cookieless sessions for your ASP.NET application. This will generate the type of Url you're seeing.
ASP.NET MVC doesn't support this feature, so you'll need to turn it off.
In your web.config look up the <authentication><forms>
element and set the cookieless
option to useCookie
. ASP.NET MVC doesn't support the other values and there are known security vulnerabilites concerning the Cookieless session feature, since te URI token can easily be intercepted using Javascript and man-in-the-middle setups, allowing others to easily hijaak the session.
See also:
Upvotes: 1