I have experienced yet another really strange and annoying problem. This happened in an Umbraco-project that I'm working with. Below I tried to print out the the error message, the cause of the error and a few suggestions of a solution.
Server error in an application/.
Beskrivning: Ett fel uppstod vid kompilering av en resurs som är nödvändig för att utföra den aktuella begäran. Granska den specifika felinformationen nedan och gör nödvändiga ändringar i källkoden.
Especially the App_global.asax.dll is causing the double existence error since the global.asax file will also be built on run time. That is what is causing the exception, so make sure that you have removed this.
Well, how to solve it!
This shouldn't happen normally of course, but it seems to be related to the fact that I have upgraded to be using VS 2010. Some seems to state that this is due to the fact that even though I have set the application to be compiled with .Net 2.0 it seems to be using .Net 4.0 and therefore creating these files.
Other solutions I haven't found, any ideas, put them in the comments?
Normally it is not recommended to use an own Global.asax file in an Umbraco project since it alread exists in the Umbraco.Presentation project. The main requirement for using your own is to inherit from umbraco.Global.
Recommended is to rather use HttpModules instead, which is a valid argument. We are using PartialCaching in this project, so we needed a way to empty or differentiate the cache based on different nodes. Therefore we put that in the Global.asax. Maybe we should move it!