Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Web service there was no end point listning

Posted on 2010-11-25
6
1,515 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …

856 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