HTTP 错误 503 - 但仅在使用域名导航时
我目前遇到一个奇怪的问题,这让我感到惊讶,我以前没有遇到过这个问题,我不知道为什么现在会出现这个问题。
我有一个 asp.net mvc 3 网站,其中有许多带有操作的控制器。请务必注意,此问题仅存在于一个控制器中,并且问题存在于所有操作中。
我收到的错误是“HTTP 错误 503。服务不可用。”
但是,仅当我使用域名浏览页面时才会出现此错误,例如...
subdomain.example.com/controller
但是如果我使用 IP 地址和端口号进行浏览,一切都会正常工作...
xxx.xxx.xxx.xxx:xxxxx/controller
请记住,无论使用哪种浏览方法,所有其他控制器都可以正常工作。
我尝试寻找这个问题的答案,并试图找到任何有用的日志信息,但没有发现任何有用的信息。希望这里有人之前见过这个问题
I am currently having a strange issue that has taken me by surprise, I have not had the issue before and I have no idea why I am getting it now.
I have an asp.net mvc 3 website which has a number of controllers all with actions. It is important to note that this issue is only present with one controller and the problem is with all Actions.
The error I am getting is "HTTP Error 503. The service is unavailable."
However, this error only occurs if I browse to the page using the domain name, for example...
subdomain.example.com/controller
but everything works fine if I browse with the ip address and port number...
xxx.xxx.xxx.xxx:xxxxx/controller
remember all other controllers work fine regardless of the method used to browse.
I have tried looking for answers to this and trying to find any useful logging information but have found nothing of use. Hopefully somebody here will have seen this issue before
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我已经创建了一个带有报告控制器的示例 mvc 项目,该项目可以正常工作,因此我不认为这是 MVC 的问题。
我建议查看您的路线和 web.config,并确保您没有任何东西将其拦截到 httphandler 或模块中。然后我会查看 IIS 实例并检查虚拟目录。您几乎正在试图找出它到底失败在哪里 - 它甚至达到了 ASP.Net 吗?
要查看的最后一个选项是您公司的代理 - 是否直接通过代理访问 URL?我知道在我的公司可能会发生这种情况 - 所以那里可能有一条规则正在拦截它。
Ok I have created a sample mvc project with a Reports controller that works so I don't believe it is a problem with MVC.
I'd reccomend looking at your routes and your web.config and make sure you don't have anything intercepting it there into an httphandler or module. Then I'd look at the IIS instance and check for virtual directories. You pretty much are trying to figure out where exactly it is failing - is it even reaching ASP.Net?
One last option to look into is your company proxy - does going to the URL directly go through the proxy? I know at my company this can happen - so there may be a rule there that is intercepting it.