S
S
Stamper2014-08-20 07:45:03
IIS
Stamper, 2014-08-20 07:45:03

How to manage GAC location for IIS Managed Modules?

My task is to write a module for IIS.
The module is compiled as Strong Name and signed. The gacutil utility has successfully placed it in the Global Assembly Cache (GAC). <system.webServer><modules>And added to the file C:\Windows\System32\inetsrv\config\applicationHost.config in the branch

<add name="Name" type="NameSpace.Name" preCondition="managedHandler,runtimeVersionv4.0" />

But trying to access localhost throws an exception:
Could not load type 'NameSpace.Name'.
Exception Details: System.Web.HttpException: Could not load type 'NameSpace.Name'.
As far as I understand, IIS is looking for my module in the C:\Windows\assembly folder where it really doesn’t exist, and the modules are there for .Net v2.0
My module is clearly in C:\Windows\Microsoft.NET\assembly\GAC_32 but IIS Apparently he doesn't look there.
How do I control the GAC location for IIS so that the web server discovers the build location of my module?
Environment: Windows Server 2008 R2, IIS 7.5, .Net 4.5.1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
igo, 2018-07-15
@igo

IIS -> Application Pools -> Set Application Pool Defaults -> .Net Framework Version = v4.0 for all pools or did you try to change it for a specific site?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question