I'm trying to implement the MSDN "How to Share Session State Between Classic ASP and ASP.NET."
I haven't been able to correctly setup the reference to the SessionUtility.dll file from within VS 2008.
I successfully installed the SessionUtility.dll into the GAC.
(C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe /i SessionUtility.dll.)
Note the v1.1.4322 version there. I could not find a gacutil.exe on my machine for v2.0 or v3.5.
I successfully exposed the SessionUtility.dll as a COM object using the regasm.exe.
(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe SessionUtility.dll /tlb:SessionUtility.tlb).
I successfully loaded the Classic ASP page "TestPage.asp" and saw the expected number "1" on the web page.
I then ran the ASPX page "TestPage.aspx" and received the error: "Could not load type 'MSDN.SessionPage'." I realized that I forgot to make a reference to the SessionUtility.dll in VS 2008 so I went to the "COM" tab in the "Add Reference" dialog, and selected "SessionUtility" (which is pointing to SessionUtility.tlb.)
When I click the "OK" button to add the reference, I get this error...
A reference to 'SessionUtility' could not be added. Converting the type library to a .NET assembly failed. Type library 'SessionUtility' was exported from a CLR assembly and cannot be re-imported as a CLR assembly.
I did some searching and found a post or two saying that I should choose "SessionUtility" from the ".NET" tab in the "Add References" dialog box, not from the "COM" tab, but it is not listed on the ".NET" tab.
What did I do wrong? What am I missing?