8

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 ?

1
  • You may want to consider asking this question in Stack Overflow too... (wider .NET audience)
    – Nuno Linhares
    Feb 20, 2013 at 15:12

1 Answer 1

3

There is no session first time in to the session Is the session actually being created

May be think about the security context that creates the session and the browser

3
  • Interesting. But how would I test this ? Feb 25, 2013 at 13:07
  • As i understand it the asp.net session state service needs to be running on the server that could be your first check and IIS has a module that needs to be enabled. Have you tried retrieving the session state variable value immediately after setting it or debugging and inspecting the value? Feb 27, 2013 at 23:26
  • Found out what was wrong. The first call to the service is done via the browser where subsequent calls are coming from the communicator service itself for which there is no service context. We ended up just doing the authenticate the entire time as it had minimal performance impact. I'm accepting your answers as this seems to be the logical route to follow if you were having the problem. Feb 28, 2013 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.