SessionState = SQLServer

Hello Jake and Company,
We have been using Northwoods for many years in our web application. Now we have to change from InProc to SQLServer session state. We have extended your classes greatly.
Reading through advice on the forums we have learned to make everything serializable.
With that done we can pass the "GoDocument.TestSerialization" method and most of our functionality has returned.
We are still having some problems though. When we add new layers or other objects to a document the changes are displayed properly but existing objects do not seem to be updated.
For instance,
if we click a object the object is highlight but the old object is not highlighted.
if we add a layer the new layer will display on the screen but in the selection event we attempt to remove the old layer and cannot find it in the document. The old layer and the new layer are both displayed on screen.
Thanks in advance.
Scott Taylor
Pas, Inc.

Using 4.2, right?

I really don’t know how many people are using SQLserver, but we don’t know of any problems in the latest release.

Can you reproduce the problems with a simpler sample?

Thanks for the quick reply. We are on a 3.x version so we will upgrade first if that is what you recommend.

Always a good first step.

Hi Jake,

We have upgraded to 4.2. We are still having the same issue.
We can reproduce our issue with BasicApp by changing session state mode=SQLServer.
Essentially, it seems that events are not firing.


ok, I’ll take a look.

what version of .NET are you using?

OK, this should have been obvious to me with your comment about events…

I’m guessing that the problem is that the event handlers you have defined are not being serialized. (Event handlers are usually not serializable.)

One way around this is to subclass/inherit from GoView and override the corresponding On… methods.

Are you already subclassing GoView in your app?

We are subclassing it now - based on a forum post we came acrossed we attempted to inherit the goview and add the event handlers.

Would you happen to have an example of how to do it properly? In our attempts we end up with some new problems such as the markup attributes (ScriptFile, CssFile, etc) do not seem to be read properly.

I also think this will work:

public class BasicAppView: GoView
public override void OnNoPostLoad() {
WebForm1 wf = this.Page as WebForm1;
this.LinkCreated += new Northwoods.GoWeb.GoSelectionEventHandler(wf.MyView_LinkCreated);
this.BackgroundDoubleClicked += new Northwoods.GoWeb.GoInputEventHandler(wf.MyView_BackgroundDoubleClicked);



But I can’t get Visual Studio to recognize this in the .aspx file:

<%@ Register TagPrefix=“BasicApp” Namespace=“BasicApp” %>


  <<font color="#ff0000">BasicApp:BasicAppView </font>id="MyView" tabIndex="2" runat="Server" NoPost="true" ImagePage="GoWebImage.axd" ScriptFile="GoWeb.js" CssFile="none" Height="400px" Width="650px"></<font color="#ff0000">BasicApp:BasicAppView</font>>

although our samples (like TreeApp) do this same thing. VS gets “Unknown server tag ‘BasicApp:BasicAppView’”

(note I have to make the event handlers “public” to do the OnNoPostLoad.)

Look at the TreeApp sample. It defines a TreeAppView.