Thursday, May 29, 2008

Citix Hanging at Mapping Client Drives

Quick tips [that works for me]:

If you are trying to login to a published application on Citrix and it was hanging on the "Mapping Client Drives" forever....

Go to the citrix server itself, try to restart the Citrix Print Manager service (or kill the cpsvc.exe process), restart the Print Spooler service and start the Citrix Print Manager again

Monday, May 19, 2008

Flex and .NET Web Service Error Handling

I was doing this Flex project that consumes .NET Web Service and could not figure out how to catch SOAPException from .NET Web Service.

It turns out that Flex could not read any response from the Web Service that has HTTP response code other then 200. You will get the following error (fault) from the Web Service if Flex was getting the HTTP response code other then 200:

FaultCode:Server.Error.Request
faultString:'HTTP request error'
faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error.

Which is annoying because there was not specific details about the error!!

The workaround is to force .NET to return with the response status 200 if the response status code either 500 or 300.

You do this by put the following code in your application global.asax

<%@ language="C#" %>protected void Application_EndRequest(object sender,EventArgs e)
{
if(Context.Response.StatusCode==500 Context.Response.StatusCode == 300)
{
Context.Response.StatusCode = 200;
}
}