- Create hidden tooltip element:
- Create JS scripts for showing/hiding tooltip:
function show()
{
var tooltip = document.getElementById('tooltip');
tooltip.style.top = event.clientY;
tooltip.style.left = event.clientX + 10;
tooltip.style.display = 'block';
}
function hide(){
var tooltip = document.getElementById('tooltip');
tooltip.style.display = 'none';
} - Set Javascript events for the chosen page element:
Element content
Friday, 29 May 2009
JS: Display tooltip over page element
Monday, 4 May 2009
The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."
Most of the suggestions found in Web blamed the invalid code, giving examples similar to the following one:
Since I was sure this was not the case I had to discover the real exception reason by myself.
using (MyWebServiceClient service = new MyWebServiceClient())
{
service.DoSomeOperation();
service.Close();
service.DoAnotherOperation();
}
Solution:
The using statement in the form presented above will mask any errors coming from the web service client and throw the "faulted state" exception instead, which may be irrelevant to the actual problem. To find out the real issue you can examine the InnerException property of the exception thrown (e.g. by logging it or debugging your app).
Alternatively you can add an additional try/catch to ensure that the real exception is thrown by your application rather than the "faulted state" one:
You can read more about the reason for the "faulted state" exception on MSDN page (Thanks to Carl for the link).
try
{
MyWebServiceClient service = new MyWebServiceClient()
service.DoSomeOperation();
service.Close();
}
catch (CommunicationException e)
{
service.Abort();
}
catch (TimeoutException e)
{
service.Abort();
}
catch (Exception e)
{
service.Abort();
throw;
}
Subscribe to:
Posts (Atom)