c# - System.Net.WebException: The operation has timed out, while calling WCF Service -
i'm not able debug self hosted wcf service it's web application client. and, i'm receiving error - "
system.net.webexception: operation has timed out @ system.web.services.protocols.webclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.httpwebclientprotocol.getwebresponse(webrequest request) @ system.web.services.protocols.soaphttpclientprotocol.invoke(string methodname, object[] parameters)
"
i'm new wcf service development.
i created sample wcf service, automately created through wcf template. then, added web reference client webapplication, using wcf service wsdl, , i'm trying consume below code.
i tried dispose service , set time out interval too.
wcfservice.testwcf obj = new wcfservice.testwcf(); obj.timeout = 20000; // added line of code troubleshoot time out issue. string s = obj.getdata(); obj.dispose(); // added line of code troubleshoot time out issue.
see below wcf code reference.
namespace testwcf { [servicecontract] public interface iservice { [operationcontract] string getdata(); } [datacontract] public class compositetype { bool boolvalue = true; string stringvalue = "hello "; [datamember] public bool boolvalue { { homecoming boolvalue; } set { boolvalue = value; } } [datamember] public string stringvalue { { homecoming stringvalue; } set { stringvalue = value; } } } }
interface implementation
namespace testwcf { public class testwcf_kelly_iqn : iservice { public string getdata() { homecoming string.format("you entered nothing"); } } }
c# asp.net wcf http web
No comments:
Post a Comment