开发者

How do I host a WCF service in an existing ASP.NET application?

开发者 https://www.devze.com 2023-04-08 03:41 出处:网络
The service has been debugged and is running in its own website. We already have the SSL certificate and DNS configured for the application. It would save some work开发者_JAVA技巧 if we could host th

The service has been debugged and is running in its own website.

We already have the SSL certificate and DNS configured for the application. It would save some work开发者_JAVA技巧 if we could host the service in the application.

Application is hosted and used behind our firewall. No public access at all . No cross domain security issues.

Application and service will be hosted on the same server even if in different websites. That's the plan for now anyway.

How do I do this? Or should I just consume the service from the website it’s currently hosted in?


I would keep the service as a separate ASP.NET application. It allows for more flexibility. But if you wanted to do it, simply copy the .svc file, along with all the service and data contracts to the ASP.NET application and modify web.config to add the <services> section. Or if those data and service contracts are in a separate class library all you need is to reference this class library.

0

精彩评论

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