Willem Odendaal

the coder's point of view

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

I Read

Subscriptions

Post Categories



Tuesday, March 15, 2005 - Posts

Custom Assembly Path

In a previous post, I mentioned that my ASP.NET Session Variables were getting lost. This was due to the fact that I was deploying 'plugin' assemblies in my bin folder. Because I was altering the bin folder, my web application had to silently restart. Not nice.

One solution to this would be to use a different state management system. SQLServer or StateServer will work fine. However, these methods are not as fast as InProc.

Another solution (in my case), is to specify an alternate bin folder. In other words, I need to tell the CLR to look for assemblies in the normal bin folder, but also in another folder for my 'addin' assemblies. This is done by adding the following section to web.config...

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="AddinBin" />
    </assemblyBinding>
  </runtime>
</configuration>

The <probing> element tells the CLR to look for assemblies in the “AddinBin” folder.

posted Tuesday, March 15, 2005 11:40 PM by willemo

How to destroy the earth

A site for all budding evil masterminds (pointed out by Bruce Schneier) - How to destroy the earth. Very detailed.

posted Tuesday, March 15, 2005 11:01 PM by willemo

Losing Session Variables

I had a strange problem this morning. My ASP.NET web application used to work fine. Then all of the sudden my Session State started dissapearing. This happened for no apparent reason after a postback occurred.

After looking at a number of forums I figured out what was going on...

I've been working on a 'extensible' web application and deploying 'plugins' to the bin folder. When sessionState (in web.config) is set to InProc, any change to the bin folder will cause the application to silently restart! Thus the loss of Session Variables. Strangely enough the SessionID stays the same.

Apparently this happens on IIS5 and IIS6. I've only tested it on IIS6. 

The solution is simple - switch your session management to SQLServer.

posted Tuesday, March 15, 2005 2:48 AM by willemo

Visual Studio 2003 problem

Visual Studio 2003 constantly kills my event hookups! I add an ASP.NET control, hookup some events, then a couple of days later everything stops working and I see that all the event hookups have been removed. What an insane waste of time!

I'm sure that my computer is pretty solid. It got a fresh install of everything less than a month ago, while this VS problem has been going on for ages. 

I wish there was a service pack for VS2003. One that would solve this problem, all the assembly locking problems (“Could not copy to the output folder...”) and the fact that my HTML always gets re-formatted.

posted Tuesday, March 15, 2005 2:15 AM by willemo




Powered by Dot Net Junkies, by Telligent Systems