.net - Failed to add a service. Unable to connect to the remote server -


i know faq, , i've read similar q's , a's i'm still not coming right.

i'm newbie @ web services , asp.net in general. have small wcf service application written colleague worked , demo'ed on pc. on pc, , no changes, can't accepted wcf test client program when adding service (error message below). colleague on leave!

the project properties set start wcftestclient.exe using vs development server auto-assigned port number. project has webform.aspx , global.asax file added needed service.

i have run

netsh http add urlacl url=http://localhost:51568/service1.svc user=<loginname> 

my questions how service started wcftestclient, , webform on browser?

i have looked @ various answers similar questions still stumped.

failed add service. service metadata may not accessible. make sure service running , exposing metadata. error: cannot obtain metadata http://localhost:51568/service1.svc if windows (r) communication foundation service have access, please check have enabled metadata publishing @ specified address. enabling metadata publishing, please refer ... error uri: http://localhost:51568/service1.svc
metadata contains reference cannot resolved: 'http://localhost:51568/service1.svc'. there no endpoint listening @ http://localhost:51568/service1.svc accept message. caused incorrect address or soap action. see innerexception, if present, more details. unable connect remote server no connection made because target machine actively refused 127.0.0.1:51568http error uri: http://localhost:51568/service1.svc there error downloading 'http://localhost:51568/service1.svc'. unable connect remote server no connection made because target machine actively refused 127.0.0.1:51568

this web.config:

<system.web>     <compilation debug="true" targetframework="4.0" /> </system.web> <system.servicemodel>     <services>         <service name="service1" behaviorconfiguration="defaultbehavior">             <endpoint address="http://localhost:*/service1" binding="basichttpbinding" contract="iservice1" />             <endpoint address="http://localhost:*/service1/mex" binding="mexhttpbinding" contract="imetadataexchange" />         </service>     </services>     <behaviors>         <servicebehaviors>             <behavior name="defaultbehavior">                 <servicemetadata httpgetenabled="true"/>                 <servicedebug includeexceptiondetailinfaults="false"/>             </behavior>         </servicebehaviors>     </behaviors>     <servicehostingenvironment multiplesitebindingsenabled="true" /> </system.servicemodel> <system.webserver>     <modules runallmanagedmodulesforallrequests="true"/> </system.webserver> 

something strange me regarding port numbers if don't set project start external program browser lists directory listing @ localhost port 50345 different port number 51568.

unable connect remote server no connection made because target machine actively refused 127.0.0.1:51568

and

if don't set project start external program browser lists directory listing @ localhost port 50345

this means wcf service hosted @ latter port. can change on 'web' tab in project's properties.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -