We're in the process of building a extension.
This extension has a Editor and a Model. In the Model we have a service defined that acts as a Proxy to a external service. Doing all the XML formatting & Authentication to use the data in Tridion Controls.
This is working fine. But a few days a ago we hit a speed bump.
When you entered the Tridion Content Manager everything would load fine. Then if you were to hit refresh the Skeleton of the Content Manager would load but all calls to the communicator would hang. And after a few minutes would just start working fine.
We initially though this was some timeout of a thread and the communicator was having a Deadlock and the thread was timing out. Another cause mentioned, was that we were not closing the WCF connection correctly. This was checked and traced. And we were indeed closing our methods.
After a few days debugging we found that the cause was the Session from System.Web.HTTPContext.Current.Session (off the top of my head, excuse if it's wrong) that would simply hang. We removed the references to the session and everything started working correctly with no hanging.
We were using the session to save a authentication token from the service in. This just meant we didn't need to authenticate with every request.
We did check and the WCF service is marked as ASPNet Compatible. The strange part is that it works the first time ??
Why would this be ? Any ideas ?