Search code examples
asp.net.netasp.net-mvciisiis-8

IIS server error .Server Error in '/' Application


enter image description here

This is an ASP.NET MVC app but using the Web Forms View Engine (.aspx) instead of the Razor View Engine (.cshtml).

I've set the default start page to Login.aspx in the project and in IIS default document. However if i enter http://localhost:150/Login.aspx to the web browser it works. What am I doing wrong?


Solution

  • I have figured it out. I moved my login page into the VIEWS folder ( it wasn't before).

    Created a default controller

    public class DefaultController : Controller
        {
            // GET: Default
            public ActionResult Index()
            {
                return Redirect("~/Login.aspx");
            }
        }
    

    And not everything seems to work. Thank you for your assistance.