Trikks

The digital adventures of Eric Herlitz

Archive for the ‘IIS’ Category

How to handle the error “Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list”

Posted by trikks on September 8, 2012

I did port some of my development environments to a new virtual machine with a brand new 2008 R2 Server and a Visual Studio 2012. Everything seemed fine until I tried to load one of my Umbraco labs.

The error “Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list” showed up.

This is quite simple to resolve for Umbraco,

  • ensure your application pool runs in .net 4 classic mode in IIS
  • run the aspnet_regiis.exe -i command, to run the aspnet_regiis command
    • navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319 (or whatever .net 4 framework version you have)
    • type aspnet_regiis.exe -i and press enter

Thats it

 

 

Posted in IIS, Umbraco | Tagged: , , | Leave a Comment »

The type ” is ambiguous: it could come from assembly ” or from assembly ”. Please specify the assembly explicitly in the type name.

Posted by trikks on August 26, 2011

Ah the good old error

You most likely seen it looking something like this

The type ‘Prometer.Objects.AnalysisEngineData’ is ambiguous: it could come from assembly ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\aa63ddac\c47315b5\App_Code.8t9ff09n.DLL’ or from assembly ‘C:\Projects\Webbprojects\Prometer\bin\Prometer.DLL’. Please specify the assembly explicitly in the type name.

In short

Now there are quite a few tricks out there that suggest how to solve this. None of them shows to be correct unless you are really lucky. In general this error depend on a structural error in your Visual Studio project. That means this can be solved by either moving the file or by changing the “Build Action” from Compile to Content.

In reasonable depth

This occur when an aspx page tries to reach a class (like an objectdatasource) and tries to (or actually do) compile the class. But since it’s already compiled everything will fail.

Now in the case shown above I had put my class libraries in the App_Code directory and set the “Build Action” to “Compile” on each library. This solution works but will fail if an aspx-page tries to reach a library since it will build it’s own version of the library (stupid). Now I can solve this by leaving my files in the App_Code folder just setting the ”Build Action” to “Content” instead. But other things might fail doing that.

The best option is to move the class libraries to a separate directory, in example “/Classes”. If so done remember to set the ”Build Action” to “Compile”.

If in App_Code

If in /Classes

So that should be it, please not that there are no work around for this. The structure has to be correct otherwise it simply wont work.
Good luck!

Posted in IIS | 6 Comments »

 
Follow

Get every new post delivered to your Inbox.