Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi ,
While i am adding a new wcf service to my existing application by choosing (Solution Explorer->Add new folder->gave name ,then on that folder i choose add new item->wcf service ->name->ok)
result: a interface and a implementation class. after doing some logic while i'm trying to run the wcf service its getting error .

Changed (Added)my web.config as below:
HTML
<services>
      <service name="Serviceforcgi.Service1" behaviorConfiguration="Serviceforcgi.Service1Behavior">
        <endpoint address="../Service1.svc" binding="webHttpBinding" contract="Serviceforcgi.IService1" behaviorConfiguration="webBehaviour" />
        <endpoint name="mexHttpBinding" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service> (for 1st service)
    
       <service name="Intranet.WCF_Service.CGI_Automated" behaviorConfiguration="Intranet.WCF_Service.CGI_AutomatedBehavior">
        <endpoint address="../WCF Service/CGI_Automated.svc" binding="webHttpBinding" contract="Intranet.WCF_Service.ICGI_Automated" behaviorConfiguration="webBehaviour" />
        <endpoint name="mexHttpBinding" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service> (for 2nd one)
    
    </services>


HTML
<serviceBehaviors>

        <behavior name="Intranet.WCF_Service.CGI_AutomatedBehavior">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
       </behavior>

       <behavior name="Serviceforcgi.Service1Behavior">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
       </behavior>
       <behavior name="">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
       </behavior>
     </serviceBehaviors>


please suggest me on this ,i am confused here .
Posted
Comments
What is that error?
Pravuprasad 11-Jun-14 23:27pm    
Wcf Test client Not Running.Mean it's giving error
Bernhard Hiller 12-Jun-14 2:28am    
"trying to run the wcf service its getting error" - please specify: is the SERVER running? Does an exception occur on the SERVER side or on the CLIENT side?
Pravuprasad 12-Jun-14 4:02am    
got the solution modified service endpoint and behaviour in <system.servicemodel> tag

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900