Host WCF in Windows server 2008 R2 and IIS7.5

After I deployed WCF web service to Windows server 2008 R2, I was able to have a page at "http://192.168.100.22:4567/HrmsService.svc" This works on the server, but not on my PC. I created a windows form application and I tried add it as service reference, but there is on error message like below. I installed VS2010 on the server , and I tried to add it as service reference and it works for windows form application. I even added port 4567 in the server firewall to allow it. I tried for all this morning, but I could not figure out. Please, let me know.

Error Message

There was an error downloading 'http://192.168.100.22:4567/HrmsService.svc?wsdl'. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.100.22:4567 Metadata contains a reference that cannot be resolved: 'http://192.168.100.22:4567/HrmsService.svc?wsdl'. There was no endpoint listening at 'http://192.168.100.22:4567/HrmsService.svc?wsdl' that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.100.22:4567 If the service is defined in the current solution, try building the solution and adding the service reference again.

This is my Web.config file.

<system.web>
    <compilation debug="true" targetFramework="4.0"><assemblies><add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /></assemblies></compilation>
  </system.web>
  <system.serviceModel>
      <services>
          <service name="WcfServiceHrms.HrmsService" behaviorConfiguration="BehaviorHrms">
              <endpoint address= ""  binding="wsHttpBinding" contract="WcfServiceHrms.IHrmsService" />
              <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
               <host>
                   <baseAddresses>
                       <add baseAddress="http://192.168.100.22:4567" />
                  </baseAddresses>
              </host>
          </service>
      </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="BehaviorHrms">
             <serviceMetadata httpGetEnabled="true" />
             <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>

Answers


99% that this error is related to network configuration and has nothing to do with WCF.

Try telnet 192.168.100.22 4567

http://technet.microsoft.com/en-us/library/cc771275(v=ws.10).aspx

Move your service to port 80. Not standard ports are often closed by firewalls.


Need Your Help

Can a C# Interface require or dictate a specific class?

c# interface constraints

Can I declare an Interface (i.e. IMySpecialControl) that requires classes implementing it to also inherit from some base class (i.e. System.Windows.Controls.UserControl)?

Created NSURL is null

iphone nsurl

NSURL printing null. What's the reason?