none
WCF Service is not working properly. RRS feed

  • Question

  • I'm going to access WCF service which is hosted from IIS Manager (IIS 7.5). Client is a java application and it is deployed in a tomcat server. When I tried to access WCF service, tomcat displays a SOAPFaultException saying "Unable to initialise Settings property. This is most likely due to a missing config file". WCF service is hosted in local machine and can be accessed through browser. And also client stubs was generated using "wsimport" without getting any errors and warnings.

    But, When I ran WCF service from visual studio, it worked properly. I'm not familiar with .net and can't figure out what was missed.  

    (There are service.svc file, web.config file and bin folder with dlls are placed in the physical path)

    Here is the service model defined in web config file

    <system.serviceModel>
    <services>
      <service name="ABC_WCF.ABCDrugService">
        <endpoint address="" binding="basicHttpBinding" contract="FDB_WCF.IABCDrugService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>




    Please help me!

    Thanks!


    • Edited by Madhujithk Friday, October 3, 2014 11:14 AM improve question
    Friday, October 3, 2014 7:59 AM

Answers

All replies

  • But, When I ran WCF service from visual studio, it worked properly. I'm not familiar with .net and can't figure out what was missed. 

    If you were not using IIS on the local development machine and you were using VS's Web development server, then that is not IIS. What happens when developing a Web service application on IIS using VS and VS using its Web development server are two different environments, which can get one into trouble if not using local IIS and devloping against local IIS to expose beforehand the issue you are now facing when you finally did deploy the solution to IIS.

    Friday, October 3, 2014 1:58 PM
  • Thank you very much for your directions. I'm using IIS on the local development machine and problem happened in my local development environment. So, do I have to use different configuration when deploying service in IIS? 
    • Edited by Madhujithk Monday, October 6, 2014 3:44 AM
    Monday, October 6, 2014 3:44 AM
  • Hi,

    For this situation, you have created the WCF service in visual studio. And if you want to consume the WCF service, you may need to host the WCF service in iis.

    About Hosting WCF Service inside IIS:

    http://www.c-sharpcorner.com/uploadfile/anavijai/hosting-wcf-service-inside-iis/

    http://www.c-sharpcorner.com/UploadFile/013102/creating-wcf-service-iis-hosting-and-consuming/

    Regards

    Tuesday, October 7, 2014 1:57 AM
    Moderator