WCF to Named Pipe does not work when run as a Scheduled Task -
i created process monitoring program (c#) uses wcf handle logging number of processes running on server. local server, , wcf base address "net.pipe://localhost/servicedebughost". when run them explorer, open connection monitoring program , send messages, displays.
however, when run them under task scheduler (windows server 2008r2), no messages arrive. have scheduled task run under admin account.
the server's service model is:
<system.servicemodel> <behaviors> <servicebehaviors> <behavior name=""> <servicemetadata httpgetenabled="false" /> <servicedebug includeexceptiondetailinfaults="false" /> </behavior> </servicebehaviors> </behaviors> <services> <service name="servicedebughost.commservice"> <endpoint address="" binding="netnamedpipebinding" contract="servicedebughost.icommservice"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexnamedpipebinding" contract="imetadataexchange" /> <host> <baseaddresses> <add baseaddress="net.pipe://localhost/servicedebughost" /> </baseaddresses> </host> </service> </services> </system.servicemodel>
the client service mode is:
<system.servicemodel> <bindings> <netnamedpipebinding> <binding name="netnamedpipebinding_icommservice" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" transactionflow="false" transfermode="buffered" transactionprotocol="oletransactions" hostnamecomparisonmode="strongwildcard" maxbufferpoolsize="524288" maxbuffersize="65536" maxconnections="10" maxreceivedmessagesize="65536"> <readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" /> <security mode="transport"> <transport protectionlevel="encryptandsign" /> </security> </binding> </netnamedpipebinding> </bindings> <client> <endpoint address="net.pipe://localhost/servicedebughost" binding="netnamedpipebinding" bindingconfiguration="netnamedpipebinding_icommservice" contract="logservice.icommservice" name="netnamedpipebinding_icommservice"> <identity> <dns value="localhost" /> </identity> </endpoint> </client> </system.servicemodel>
any thoughts why won't send messages under task scheduler?
thanks.
here exception presented in event viewer:
application: monitor.exe framework version: v4.0.30319 description: process terminated due unhandled exception. exception info: system.servicemodel.endpointnotfoundexception stack: server stack trace: @ system.servicemodel.channels.pipeconnectioninitiator.getpipename(uri uri, ipipetransportfactorysettings transportfactorysettings) @ system.servicemodel.channels.namedpipeconnectionpoolregistry.namedpipeconnectionpool.getpoolkey(endpointaddress address, uri via) @ system.servicemodel.channels.communicationpool`2.takeconnection(endpointaddress address, uri via, timespan timeout, tkey& key) @ system.servicemodel.channels.connectionpoolhelper.establishconnection(timespan timeout) @ system.servicemodel.channels.clientframingduplexsessionchannel.onopen(timespan timeout) @ system.servicemodel.channels.communicationobject.open(timespan timeout) @ system.servicemodel.channels.servicechannel.onopen(timespan timeout) @ system.servicemodel.channels.communicationobject.open(timespan timeout) @ system.servicemodel.channels.servicechannel.callopenonce.system.servicemodel.channels.servicechannel.icallonce.call(servicechannel channel, timespan timeout) @ system.servicemodel.channels.servicechannel.calloncemanager.callonce(timespan timeout, calloncemanager cascade) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, timespan timeout) @ system.servicemodel.channels.servicechannelproxy.invokeservice(imethodcallmessage methodcall, proxyoperationruntime operation) @ system.servicemodel.channels.servicechannelproxy.invoke(imessage message) @ system.runtime.remoting.proxies.realproxy.handlereturnmessage(system.runtime.remoting.messaging.imessage, system.runtime.remoting.messaging.imessage) @ system.runtime.remoting.proxies.realproxy.privateinvoke(system.runtime.remoting.proxies.messagedata byref, int32) @ monitor.logservice.icommservice.servicemessage(system.string, int32, system.string) @ monitor.program.log(int32, system.string) @ monitor.program.main(system.string[])
Comments
Post a Comment