ASP.NET MVC Page Won't Load and says “The reso

2020-02-26 02:50发布

I am having a problem where I try to open my ASP.NET MVC application but I get the ASP.NET error page which says this:

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

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053**

I am using the URL trick from this blog post and that is why I have the .aspx in the URL:

http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

It works on my other sandbox server (not a dev machine), and now I just deployed it to my production site as a new virtual directory, but for some reason it seems like it's actually looking for a .aspx file.

Any ideas? I think I must be forgetting a step.

20条回答
再贱就再见
2楼-- · 2020-02-26 03:43

I had a similar problem. But I was working with Episerver locally with ssl enabled. When I wasn't getting a

Server Error in '/' Application.

I was getting a Insecure connection error. In the end, for me, this post on PluralSight together with configuring the website urls, accordingly with the ssl link set up on the project's config, on Admin's Manage Website's screen solved the problem.

查看更多
狗以群分
3楼-- · 2020-02-26 03:46

Make sure you're not telling IIS to check and see if a file exists before serving it up. This one has bitten me a couple times. Do the following:

Open IIS manager. Right click on your MVC website and click properties. Open the Virtual Directory tab. Click the Configuration... button. Under Wildcard application maps, make sure you have a mapping to c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll. MAKE SURE "Verify the file exists" IS NOT CHECKED!

查看更多
闹够了就滚
4楼-- · 2020-02-26 03:49

Two Things Needs To Be Ensure:

1) Route should be proper in Global.ascx file

2) Don't forget to add reference of Controller Project in your Web Project (view is in separate project from controller)

The second one is my case.

查看更多
祖国的老花朵
5楼-- · 2020-02-26 03:49

Go to any page you want to see it in browser right click--> view in browser. this way working with me.

查看更多
\"骚年 ilove
6楼-- · 2020-02-26 03:50


Step 1 : Check to see if you have received the following update? http://support.microsoft.com/kb/894670 If you have you might want to follow this procedure and see if it works for you. It worked partially for me. The item where it mentions the additional "/" to be removed is not entirely true but it did give me some insight to change my project properties just a bit.

step 2 : Right click on your properties for your Web Project in your Solun. Select WEB > Choose Current Page instead of Specific Page.

step 3 : Go into your project where you keep your *.aspx's select a start page. (Should be the same as the current page or choose another one of your choice :) ) Hit Debug Run.

查看更多
Luminary・发光体
7楼-- · 2020-02-26 03:51

Suppose source code copy from other places.

Sometime, if you use Virtual Directory in your application url like:

http://localhost:50385/myapp/#/

No route will pick up the request.

solution:

Explicitly click the button 'create a virtual directory' in your project file.

查看更多
登录 后发表回答