开发者

Add WCF service as link from website project to webapplication project

开发者 https://www.devze.com 2023-01-08 12:05 出处:网络
In my solution I have a \"website\" project and \"WebApplication\" project. In the website project I have a WCF service under folder called Services. So by default it places MyService.cs file under Ap

In my solution I have a "website" project and "WebApplication" project. In the website project I have a WCF service under folder called Services. So by default it places MyService.cs file under App_Code folder.

Now I am t开发者_如何学运维rying to add this same WCF service as link file into my WebApplication project. But as the [.svc & .cs] are in two different location in website project it is not being picked up as a service in WebApplication project.

Any solution to this problem ? Any thoughts or ideas ?

Thanks in advance, Keyrav


I think your best bet would be to totally separate out the WCF service into its own class-library assembly (no code in the *.svc.cs code-behind or the App_code directory), and then reference that WCF service assembly from your different projects and web sites.

0

精彩评论

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

关注公众号