Friday, 23 January 2009

ASP.NET with Apache and Mono

Getting "Type MyType not found" exception or "An element with the same key already exists in the dictionary" exception from System.Web.Compilation.BuildManager.AddToCache in mono after deploying an ASP.NET page on Linux?

Check that you have the option:

MonoSetEnv MONO_IOMAP=all

In your Apache config file. It maps windows file names and paths to Linux ones.

You can find more details at http://www.mono-project.com/IOMap and http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications