Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Dear Friends,
I'm facing Problem while running this WCF-REST Service.
While running it in Browser it Says "End Point Not Found"

So plz someone check this one & provide me Solution.
Here is the Code File:

http://sdrv.ms/TK6XPc[^]

Edit:
In my Service I've Configured web.config as:

HTML
<services>
      <service name="Service">
        <endpoint address="" binding="webHttpBinding" contract="IService"></endpoint>
  </service>
</services>


And .svc File as:
HTML
<%@ ServiceHost Language="C#"  Debug="true" Service="Service" CodeBehind="~/App_Code/Service.cs" %>


But I'm getting Error "End Point Not Found" while Running the Service in Browser.
Someone plz help me out here.

Thanks in Advance.
Posted
Updated 26-Oct-12 6:06am
v3
Comments
Richard MacCutchan 26-Oct-12 10:58am    
No one is likely to download your code and analyse it for you. Use your debugger, or add some tracing to try and find out what is going wrong, and update your question with the information you find.

1) We volunteer our time to help you with coding issues. Asking for someone to download your project and do your work for you debugging it is not likely to occur. Your best bet is to ask something very code based and specific here.
2) End Point Not Found: Is exactly what it says. Your application cannot hit the web service you are trying to hit at the address specified in your .svc file. Show us the configuration section from the .svc file in your project so that we can rule out something in the configuration.
 
Share this answer
 
Hi,
From your code,
1. It looks like namespace is missing in IService.cs and Service.cs files. Ideally it is a good practice to have a namespace.

2. In web.config file, you are referencing a namespace. This is wrong.
XML
<services>
      <service name="WCFREST4.Service">
        <endpoint address="" binding="webHttpBinding" contract="WCFREST4.IService"></endpoint>
      </service>
    </services>

Where is 'WCFREST4'?

3. Service.svc file also has a problem
<%@ ServiceHost Language="C#" Factory="System.ServiceModel.Activation.WebServiceHostFactory" Debug="true" Service="Service" CodeBehind="~/App_Code/Service.cs" %>

If your web.config is having WCFREST4.Service then why is Service="Service" does not have WCFREST4.Service ??


Fix these things and then try to debug first before asking doubts here. You can use WcfTestClient.exe tool for testing the service.
 
Share this answer
 
Comments
P_Dash 26-Oct-12 12:08pm    
Plz Go Through Edited Question.
I've clearly Mentioned the Problem With Code.
I hope this will b Enough for Fixing the Problem.

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



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