Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Web service there was no end point listning

Posted on 2010-11-25
6
Medium Priority
?
1,567 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline

877 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