Solved

Web service there was no end point listning

Posted on 2010-11-25
6
1,497 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now