windows - WCF Hosted as Service -
i have vb.net wcf service hosted window service. able create install package, install service machine, , start service manually services in administrative tools.
now when try reference service in test console application (address: http://localhost:8080/), following error:
there error downloading 'http://localhost:8080'.`
unable connect remote server no connection made because target machine actively refused 127.0.0.1:8080`
metadata contains reference cannot resolved: 'http://localhost:8080/'. not connect http://localhost:8080/. tcp error code 10061: no connection made because target machine actively refused 127.0.0.1:8080. unable connect remote server no connection made because target machine actively refused 127.0.0.1:8080 if service defined in current solution, try building solution , adding service reference again.
not sure can this. ideas???
thanks, jason.
here's code app.config inside service:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.diagnostics> <sources> <!-- section defines logging configuration my.application.log --> <source name="defaultsource" switchname="defaultswitch"> <listeners> <add name="filelog"/> <!-- uncomment below section write application event log --> <!--<add name="eventlog"/>--> </listeners> </source> </sources> <switches> <add name="defaultswitch" value="information" /> </switches> <sharedlisteners> <add name="filelog" type="microsoft.visualbasic.logging.filelogtracelistener, microsoft.visualbasic, version=8.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil" initializedata="filelogwriter"/> </sharedlisteners> </system.diagnostics> <system.servicemodel> <services> <service name="exstreamwcf.service1" behaviorconfiguration="exstreamwcf.service1behavior"> <!-- service endpoints --> <host> <baseaddresses> <add baseaddress = "http://localhost:8080/design_time_addresses/jasonsservice/service/" /> </baseaddresses> </host> <endpoint address="" binding="wshttpbinding" contract="exstreamwcf.iservice1"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange"/> </service> </services> <behaviors> <servicebehaviors> <behavior name="exstreamwcf.service1behavior"> <servicemetadata httpgetenabled="true"/> <servicedebug includeexceptiondetailinfaults="false"/> </behavior> </servicebehaviors> </behaviors> </system.servicemodel> </configuration>
if needs more me please let me know!
not sure if it's issue - on production server, never use localhost
base address.
so can try change:
<service name="exstreamwcf.service1" behaviorconfiguration="exstreamwcf.service1behavior"> <host> <baseaddresses> <add baseaddress = "http://localhost:8080/design_time_addresses/jasonsservice/service/" /> </baseaddresses> </host>
to
<service name="exstreamwcf.service1" behaviorconfiguration="exstreamwcf.service1behavior"> <host> <baseaddresses> <add baseaddress = "http://yourservername:8080/design_time_addresses/jasonsservice/service/" /> </baseaddresses> </host>
does make difference when calling service??
Comments
Post a Comment