Solved

Web service there was no end point listning

Posted on 2010-11-25
6
1,511 Views
Last Modified: 2012-05-10
Ok, I have next to no webservice experiance so please be patiant with me. I created a webservice that for now has 3 methods each taking a string and returning their name and the string to show that it has worked. I have this working on my local machine. I tried to move it up to our server and now I am getting an error that there was no endpoint listening at ............. Now here is the part I am having trouble with, to access the webservice I need to use an ip address when I type the address and path into the address bar it takes me to the screen I expect. Now the link on the top to take you to the wsdl file is not the ip address but it is the server name. This is the same with the error message I get about there is no end point listening at the 'server name' location. When I click on the wsdl link it comes back with a could not find error. I am guessing this is the issue, and am hoping that it is a simple webconfig change. If any one has any ideas please let me know.

Attached is part of the web config.


<system.serviceModel>
    <services>
      <service behaviorConfiguration="WcfService1.Service1Behavior"
        name="TestService.Service1">
        <endpoint address="" binding="basicHttpBinding" contract="TestService.IService1">
          <identity>
            <dns value="" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

        <host>
          <baseAddresses>
            <add baseAddress="http://"NAME OF SERVER"/IntegrationTest/Service1.svc" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        
        <behavior name="WcfService1.Service1Behavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <!--<serviceDebug includeExceptionDetailInFaults="true"/>-->
			<serviceCredentials>
				<serviceCertificate findValue="xx xx xx xx"
				  x509FindType="FindBySerialNumber" />
			</serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Open in new window

0
Comment
Question by:scottlafoy
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:mavrj
ID: 34216030
Well,

I thing you can start with a simpler web.config:
<system.serviceModel>
  <services>
    <service behaviorConfiguration="WcfService1.Service1Behavior" name="TestService.Service1">
      <endpoint address="" binding="basicHttpBinding" contract="TestService.IService1" />
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      <host>
        <baseAddresses>
          <add baseAddress="http://ServerName/IntegrationTest/" />
        </baseAddresses>
      </host>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="WcfService1.Service1Behavior">
        <serviceMetadata httpGetEnabled="true"/>
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>

Open in new window


Then ensure that your server has a well register name in the DNS (or use ip as servername for testing). There could also be a problem if the port 80 is already in use (use another port in the base address definition ie. 8080) Don't use the service1.svc in base address. verify that your port in not filtered by any firewall/antivirus. finally checkout if you can access the service (via web browser) from either the server and the client. When checked from the server you might see events in the event viewer reported.

your service should be accessible via:
http://ServerName/IntegrationTest/
http://ServerName/IntegrationTest/mex
http://ServerName/IntegrationTest/?wsdl

Hope this help

mavrj
0
 
LVL 5

Author Comment

by:scottlafoy
ID: 34218177
Thank you for your reply. I will try your suggestions soon. I have no access to my machine until Tuesday.
0
 
LVL 5

Author Comment

by:scottlafoy
ID: 34240295
Ok, I made the changes to my webconfig and placed them on the server. I am able to use my test c# program to access the service internaly (using the internal 172 address) Now however when I try to use the external address I get an error

 "Configuration binding extension 'system.serviceModel/bindings/BasicHttpBinding' could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly."

the app config for the c# programs endpoint address is

" <endpoint address="http://xx.xx.xxx.xxx:4430/Integrationtest/Service1.svc"
               binding="BasicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
               contract="ServiceReference1.IService1" name="BasicHttpBinding_IService1" />"

I can access the external webservice from the webbrowser by typing in the address but it has to be https. https://xx.xx.xxx.xxx:4430/Integrationtest/Service1.svc...........this will bring up the screen saying the webservice is ready, except when I try to get the wsdl it goes to the named server and says it is not available.

for exaple when i type in https://xx.xx.xxx.xxx:4430/Integrationtest/Service1.svc i get a page with a link on the top of it. The link is http://[servername]/IntegrationTest/Service1.svc?wsdl and clicking on this brings up a page not found error.

Im closer now but still cant get the external part working
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Expert Comment

by:mavrj
ID: 34241842
I assumed that you are not hosting in IIS/WAS, but in a App. Could you confirm.
0
 
LVL 1

Accepted Solution

by:
mavrj earned 500 total points
ID: 34241885
If you are in IIS please make sure that you register hostname correctely. You can use the following steps http://gavinmckay.wordpress.com/2009/03/24/howto-fix-wcf-host-name-on-iis/

Not that IIS hosting make baseaddress useless. It uses the IIS base address.

Hope this helps
0
 
LVL 1

Expert Comment

by:mavrj
ID: 34241968
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question