How to redirect from MVC application to ASP.Net Web-form application with in same solution.
I have tried some method like this
[HttpPost]
public ActionResult Home(LoginUser lu)
{
return Redirect("http://localhost:51410/SessionWebFrom/Login.aspx");
}
But got exception: 404 Error
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /SessionWebFrom/Login.aspx
There is just a little tweak to have it working: instead of using a relative URL, do use an URL relative to the application root ~, like this:
return Redirect("~/SessionWebFrom/Login.aspx")
If it doesn't work like this:
The only problem can have to do with some .config configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With