将breeze web api部署到iis7的问题

时间:2014-02-20 23:48:07

标签: angularjs iis breeze

我创建了一个基于Hottowel模板(角度和微风)的SPA。它可以在Visual Studio中正常运行它,但在将它部署到我们的iis7时它不起作用。对于breeze web api控制器的每个请求,我得到404。加载SPA应用程序它可以正常工作。

当我在浏览器中尝试此操作时:

http://company.com/mySPA/breeze/Repository/Metadata

我明白了:

<Error>
<Message>
No HTTP resource was found that matches the request URI 'http://company.com/mySPA/breeze/Repository/Metadata'.
</Message>
<MessageDetail>
No type was found that matches the controller named 'Repository'.
</MessageDetail>

有什么问题?

1 个答案:

答案 0 :(得分:1)

我找到了解决方案。

我将项目分成两个独立的项目。 Breeze Web API服务器和Breeze SPA客户端。然后我将它们作为两个独立的应用程序进行部署,这些应用程序正常运行

这在我的案例中也很有意义,因为我希望能够使用当前SPA可能不会使用的功能扩展服务器,但未来的SPA可能会延长。

如果遇到跨源问题,请阅读:

Using Breeze with a WebApi Service from another domain

相关问题