I have a website project and in that I added a .svc file with the foll开发者_Python百科owing details-
<%@ ServiceHost Language="VB" Debug="true" Service="Communication" CodeBehind="???" %>
Here am not sure what should I put in for "CodeBehind". As I have put all my service contracts and their implementations in another project and I added that project as a reference to this website. Is this allowed? Or Do I need to have the Codebehind files only in the App_Code folder under website project?
Please suggest if there is a way to specify the CodeBehind file other than placing that in App_Code folder.
Thanks in advance
Saiyou don't need a codebehind I don't believe. Just specifying the service is enough, although you need to specify the full namespace of the class which implements the service.
According to this example, you should be fine doing this if the class is in another referenced assembly, in which case you don't need the language bit either, only the service part.
In the example on MSDN they don't use it.
精彩评论