且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我需要做什么?

更新时间:2022-02-18 04:20:10

404只是意味着您的Web服务器找不到所需的资源. aspx页面的路径很可能不正确,您需要检查一下.通常,对于普通的ASP.NET应用程序:

404 just means your web server cannot find the requested resource. Most probably the path to the aspx page is incorrect, you need to check that. In general, for a normal ASP.NET app:

http://server/directories/page.aspx



其中 server 是服务器的名称或IP地址,最像localhost.如果您使用的是ASP.Net Development Server(将弹出一个气球,这将为您提供端口号(例如4907),在这种情况下服务器将为localhost:4907.这是随机分配的,所以我不能告诉您是什么.

Page是您可能想要的页面的名称default

目录遵循应用程序的目录结构.如果您的文档位于根目录下,则可以保留此空白,然后删除并加正斜杠.

您所需的网址很可能是:



Where server is the name or IP address of the server, most likey localhost. If you are running with ASP.Net Development Server (a balloon will pop up, this will give you a port number (e.g. 4907) in which case server would be localhost:4907. This is randomly assigned so I can''t tell you what it is.

Page is the name of the page you want probably default

Directories follow the directory structure of the app. If your document is in root you can just leave this blank and remove and double forward slashes.

Your required url is most likely to be:

http://localhost:4907/Default.aspx



需要用您的端口号替换 4907 .

没有更多信息,很难给出具体答案.您可以做的一件事是右键单击Web项目并将其设置为启动项目,然后右键单击要显示的页面并将其设置为默认页面.然后运行该应用程序即可.

最后一件事,我曾经遇到过Visual Studio过去无法提供页面的问题.在排除了由于网址错误而导致的可能性之后,机器重新启动解决了该问题.



Where 4907 needs to be replaced with your port number.

Without more information it is hard to give a specific answer. One thing you can do is to right-click the web project and set that as the startup project, then right-click the page you want to display and set it as the default page. Running the application should then work.

One final thing, I''ve had problems with Visual Studio not serving up pages in the past. After I eliminated the possibility of an incorrect URL as a reason, a machine re-boot fixed the problem.