开发者

deploying wcf service application as a precompiled app

I have a wcf service application that has some application startup code in the app_code folder of the project. When i publish this project to my website, it deploys it with source code and app_code folder.

Is the开发者_StackOverflow社区re a way to precompile the wcf app ( like an asp.net app), that includes all the dependencies and compiled code ?

i checked the web deployment package files, and even that has the source code of app_code folder.


problem here really is that since the template for wcf does not expect app_code folder and .cs files in it, they get added as content, changing them to compile would include them in the web dll


Your best bet would be to:

  • put all your WCF service-related code into a separate class library assembly
  • deploy that assembly to the .\bin directory
  • only put your MyService.svc file (without any code-behind) to your virtual directory

With this setup, the WCF service is still being hosted by IIS, but you don't need to do any special tricks and hacks to get it to work properly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜