Solved

Web service there was no end point listning

Posted on 2010-11-25
6
1,504 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

11 Experts available now in Live!

Get 1:1 Help Now