WCF service failure
-
30 septembrie 2008 07:12
Hi,
I have windows application with WCF service. On form load, there are some methods to load master table values , and i have an method to get some data based on month. I have 3 calls made to WCF service to fetch information and display on form load. Most of the times, the application hangs and I get a message 'Unable to process request' with a 'Catastrophic failure' message. And any frequent calls to poll DB through the WCF service hangs the application.
Can anyone help me in resolving the problem for catastrophic failure.
Thanks,
Sangeetha
Toate mesajele
-
30 septembrie 2008 08:18You should try the WCF forum:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=118&SiteID=1 -
11 noiembrie 2009 07:34
Hi,
You can resolve this issue by using "using" statement.
Because ones you called service, it will not close automatically and request will reach at its maximum limit. So you have to close after use ones.
using(serviceClient srvClient = new serviceClient)
{
//code here
}
//This service will be freed connection after.- Propus ca răspuns de spguy2012 9 martie 2011 13:17
-
25 iunie 2010 14:33
This can be solved by creating singleton class as interface between web service reference and application. Then it will create only one instance of service reference.
class ServiceInterface
{
private static ServiceInterface _instance;
private ServiceClient _service = new ServiceClient ;
private ServiceInterface()
{
//Prevent accessing default constructor
}
public static ServiceInterface GetInstance()
{
if(_instance == null)
{
_instance = new ServiceInterface();
}
return _instance;
}
// You can add your functions to access web service here
} -
9 martie 2011 13:17thanks dude Your answer is great
Like Cricket -
23 septembrie 2011 14:59
Hi,
Thanks.
You can resolve this issue by using "using" statement.
Because ones you called service, it will not close automatically and request will reach at its maximum limit. So you have to close after use ones.
using(serviceClient srvClient = new serviceClient)
{
//code here
}
//This service will be freed connection after.
White Carpet Kitchen Carpet