none
Hoe to host WCF in server RRS feed

  • Question

  • Hi,

    I have created WCF service with WSDL file. I add the

    App_code,App_Data,WebRefernce, Service.svr

    But i got the below error?


    Wednesday, March 26, 2014 9:29 AM

Answers

  • Hi,

    It seem that you want to creat the wcf service from the wsdl, then please try to check the following:

    First please using svcutil, then you can create interfaces and classes (data contracts) from the WSDL:

    svcutil your.wsdl (or svcutil your.wsdl /l:vb if you want Visual Basic)

    This it will create a file called "your.cs" in C# (or "your.vb" in VB.NET) which contains all the necessary items.

    Now, you need to create a class "MyService" which will implement the service interface (IServiceInterface) - or the several service interfaces - and this is your server instance.

    Now a class by itself doesn't really help yet - you'll need to host the service somewhere. You need to either create your own ServiceHost instance which hosts the service, configure endpoints and so forth - or you can host your service inside IIS.

    Also please try to check this article:
    #WSDL-First development with WCF:
    http://blogs.msdn.com/b/dotnetinterop/archive/2008/09/24/wsdl-first-development-with-wcf.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, March 27, 2014 9:59 AM
    Moderator

All replies

  • Hi,

    You don't need to create wsdl file yourself. Can you please clearly specify more details of the code which is causing error in your code. Adding App_Code, App_Data are irrelevent to the WCF context.

    I suggest to first create a demo test WCF application. There are you finding  the same issue?


    One good question is equivalent to ten best answers.

    Wednesday, March 26, 2014 9:44 AM
  • Hi,

    You don't need to create wsdl file yourself. Can you please clearly specify more details of the code which is causing error in your code. Adding App_Code, App_Data are irrelevent to the WCF context.

    I suggest to first create a demo test WCF application. There are you finding  the same issue?


    One good question is equivalent to ten best answers.

    I added the Salesforce WSDL file for .Net to Salesforce integration. That namespace only i added in the Project. Now I got error in this file.
    Wednesday, March 26, 2014 9:52 AM
  • Hi,

    It seem that you want to creat the wcf service from the wsdl, then please try to check the following:

    First please using svcutil, then you can create interfaces and classes (data contracts) from the WSDL:

    svcutil your.wsdl (or svcutil your.wsdl /l:vb if you want Visual Basic)

    This it will create a file called "your.cs" in C# (or "your.vb" in VB.NET) which contains all the necessary items.

    Now, you need to create a class "MyService" which will implement the service interface (IServiceInterface) - or the several service interfaces - and this is your server instance.

    Now a class by itself doesn't really help yet - you'll need to host the service somewhere. You need to either create your own ServiceHost instance which hosts the service, configure endpoints and so forth - or you can host your service inside IIS.

    Also please try to check this article:
    #WSDL-First development with WCF:
    http://blogs.msdn.com/b/dotnetinterop/archive/2008/09/24/wsdl-first-development-with-wcf.aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, March 27, 2014 9:59 AM
    Moderator