从Server获取本地源中的404错误 [英] Getting 404 Error in local source which is got from Server

查看:96
本文介绍了从Server获取本地源中的404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在尝试在我的localhost中运行我的服务器源代码(DNN),但它得到404错误,但是,在服务器工作正常



NetworkError:404 Not Found - http:// localhost:50189 / dnnsample / Default.aspx



告诉我我错过了什么...

提前感谢

解决方案

嗯...文件?



404是一个通用网站错误 - 这意味着指定的文件不存在。

所以看看你的代码,找到你打开的地方该文件并确切地检查它试图打开的内容:您可能在一个子目录中的页面中有一个相对地址,例如../default.aspx或default.aspx。 />


可能你想使用〜/ default.aspx来强制根目录 - 但是如果没有访问你的网站代码,我们就无法分辨。 / blockquote>

如果你没有从Visual Studi运行它o然后你需要在你的IIS上设置一个分配给端口50189的网站,你需要一个名为dnnsample的虚拟目录,你的网站就在那里。



您可能更不可能理解内置的Visual Studio网络服务器以及它为什么会生成它所做的网址。


Hi all,

I am trying to run my server source(DNN) in my localhost , but its getting 404 error like this but , In server working fine

"NetworkError: 404 Not Found - http://localhost:50189/dnnsample/Default.aspx"

tell me what i have missed ...
thanks in advance

解决方案

Um...the file?

404 is a "generic" website error - it means that the file specified does not exist.
So look at your code, find where you open the file and check exactly what it is trying to open: the chances are that you have a relative address such as "../default.aspx" or just "default.aspx" in a page that is located in a subdirectory.

It may be that you want to use "~/default.aspx" to force the root directory - but without access to your website code, we can't tell.


If you're not running this from Visual Studio then you need a website set up on your IIS that is assigned to port 50189, and you'll need a virtual directory in there called "dnnsample" where your site sits.

It's probably more likely that you aren't understanding the built-in Visual Studio webserver and why it generates the urls it does.


这篇关于从Server获取本地源中的404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆