IIS调用asp页面时出现404错误
我的 asp.net 4.0 应用程序有问题。当我在服务器上调用它时,它可以工作,但是当我从服务器外部调用它时,它会给出 404 错误。
我调用 asp.net 应用程序的链接是一个很好的链接。其他 ASP.NET 4.0 应用程序从服务器外部调用时工作正常。其他应用程序虽然位于另一个文件夹中,但我不明白为什么它可以在一个文件夹下而不是另一个文件夹下工作。应用程序没有 IP 限制。
有人在过去遇到过这个错误吗?
谢谢
编辑: 该应用程序配置为 asp.net 4.0 应用程序。它存储在虚拟目录中。
此链接有效: http://localhost/Phonebook/PhoneBook/default-defaut.aspx
此链接不: https://www.test.com/Phonebook/PhoneBook/default-default.aspx
I have a problem with my asp.net 4.0 application. When I call it on the server, it works, but when I call it from outside the server, it gives me a 404 error.
The link I call the asp.net application from is the good one. Other asp.net 4.0 applications are working fine when called from outside the server. The other applications are in another folder though, but I do not see why it would work under a folder and not another one. There is no IP restrictions on the applications.
Anyone got that error int eh past?
Thanks
EDIT:
The app is configured as an asp.net 4.0 application. it is stored in a virtual directory.
This link works:
http://localhost/Phonebook/PhoneBook/default-defaut.aspx
this link does not : https://www.test.com/Phonebook/PhoneBook/default-defaut.aspx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我和一位同事找到了答案。这是因为我调用我的 url 的服务器应该有一个规则,将浏览器重定向到正确的 url。所以我的测试服务器上的 IIS7 设置正确。
A coworker and me found the answer. It's because the server I called on my url was supposed to have a rule redirecting the browser to the right url. So IIS7 on my test server was setted up right.
有几件事需要检查。
必须使用名为电话簿的文件夹似乎有点过分了。尝试取出其中之一并将您的 Web 应用程序指向您的
c:\whatever\phonebook\phonebook 文件夹。
Theres several things to check.
Seems overkill to be having to folders named phonebook. Try taking one of them out and pointing your web application to your
c:\whatever\phonebook\phonebook folder.
如果您使用 https,请确保端口 443 绑定到您的应用程序,这可能是您的问题。
Make sure port 443 is bound to your app if you're using https, that could be your problem.