c# - WCF service access from client application when user is behind proxy -
i have wcf service hosted on server. client application accessing service on windows 7 machine. there 2 users on windows 7 machine. windows application installed through clickonce separate instance there 2 users.
when usera accessing service through winforms application works fine, when userb on same machine trying access throws following exception: communication exception: remote server returned unexpected response: (417) expectation failed.
server stack trace: @ system.servicemodel.channels.httpchannelutilities.validaterequestreplyresponse(httpwebrequest request, httpwebresponse response, httpchannelfactory factory, webexception responseexception, channelbinding channelbinding) @ system.servicemodel.channels.httpchannelfactory.httprequestchannel.httpchannelrequest.waitforreply(timespan timeout) @ system.servicemodel.channels.requestchannel.request(message message, timespan timeout) @ system.servicemodel.dispatcher.requestchannelbinder.request(message message, timespan timeout) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs, timespan timeout) @ system.servicemodel.channels.servicechannel.call(string action, boolean oneway, proxyoperationruntime operation, object[] ins, object[] outs) @ system.servicemodel.channels.servicechannelproxy.invokeservice(imethodcallmessage methodcall, proxyoperationruntime operation) @ system.servicemodel.channels.servicechannelproxy.invoke(imessage message) exception rethrown @ [0]: @ system.runtime.remoting.proxies.realproxy.handlereturnmessage(imessage reqmsg, imessage retmsg) @ system.runtime.remoting.proxies.realproxy.privateinvoke(messagedata& msgdata, int32 type) @ myapp.serviceproxy.imyapiservice.getdata(string username, string password)
what reason behind working 1 user , not other? missing anything?
update: though found solution (please see answer below) issue still wanted know should done in scenario. msdn article says blocks user send large amount of data server, didn't mention limit in that?
what limit of data client can send server? there better approach connecting wcf service client behind proxy?
finally cracked it. happens because user behind proxy.
following setting in app.config resolved issue:
<system.net> <settings> <servicepointmanager expect100continue="false" /> </settings> </system.net>
but still issue large file upload, looking solution same now.
more information on in msdn article
Comments
Post a Comment