开发者

Getting 404 error in IIS when calling asp page

开发者 https://www.devze.com 2023-03-29 17:28 出处:网络
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.

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 o开发者_运维百科ther 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


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.


Theres several things to check.

  1. That test.com is even going to your server. Put a file in the root directory 'test.txt' that IIS lists as the root folder for your site. ensure you can get to it.
  2. Once you verify your root site folder WORKS for ex., www.test.com/test.txt then ensure you have a virtual directory /phonebook that contains a folder phonebook within it.

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.


Make sure port 443 is bound to your app if you're using https, that could be your problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消