Host a WCF Data Service in an ASP.NET MVC 3 application?
I've an ASP.NET MVC3 application, and now I would like to offer a WCF Data Service for heavy client.
I can generate and configure my WCF service, but when I try to call it, it appears that templates of my MVC 3 application are mixed with my WCF service, which seems to be normal.
How can I say that it should not use any template or MVC concept for this specific开发者_运维知识库 service?
Thank you!
It's best to keep the UI code (MVC 3) and the service code (WCF DS) in separate projects, and simply add a Service Reference from the MVC project to the WCF DS project. Then code is both logically and physically separated, but of course they can coexist on the server nicely. When debugging your MVC project, Visual Studio is smart enough to also start up the WCF DS project.
精彩评论