Admiral Land
Admiral Land

Reputation: 2492

ASP.Net MVC – Resource Cannot be found error - at first time

Good day!

I'm writing a very simple asp mvc 4 app which is a simple static site. When i send a request from the site to app - I get the following error on my first attempt:

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: /EmailSendApp/login.aspx

On my second attempt, i click "send" and my app works well!

Why is it not working the first time?

Thank you!

It is Intranet site and i use Windows authorization.

It is ASP MVC application with Windows authorization.

Upvotes: 2

Views: 381

Answers (1)

DKR
DKR

Reputation: 5754

In MVC application we cannot write .aspx extension in browser url.In mvc application viewpage extension is .cshtml so please remove .aspx extension in browser url.

Your requested url could be like this http:localhost/EmailSendApp/login so your request is sent to login method which is present in EmailSendApp controller

Upvotes: 1

Related Questions