【发布时间】:2017-07-06 14:00:40
【问题描述】:
我有一个 ASP.Net WebApi 项目。我已经在我的本地机器 IIS 上部署了它。
在我的本地机器上,api 运行良好。此后,我将这组文件从本地机器复制到远程机器。
但是在从远程机器访问 API 时,我收到所有 api 的 404 错误。
我交叉检查了机器上的 IIS 配置。它们都是一样的。
本地 IIS
远程 IIS
http://localmachine/api/user/customer - 在本地运行良好。
http://remotemachine/api/user/customer - 远程 Http 404 错误。
非常感谢任何帮助/建议。
谢谢。
【问题讨论】:
-
首先只浏览远程机器以检查它是否可以访问,如
http://remotemachine -
@Mairaj,默认 index.html 加载正常
-
OK 加载 api 主页。即没有
controller/action -
@Mairaj 对不起!!我没找到你
-
http://remotemachine/api
标签: c# iis asp.net-web-api deployment iis-7