HTPPModule and GAC problems???

G

Guest

I have written an assembly that houses a class implementing the IHTTPModule class and have strongly named it and added it to the GAC.

I then reference the assembly in my web apps web.config and get the "assembly or one of its dependancies not found" error. The trace then shows that it tried to find the assembly in the bin directory of the web app.

Why is it not finding it in the GAC? The class does nothing and there are no dependancies that could be causing this. Help?

I want to add an HTTPModule to my machine.config but cant until I get this simple problem solved!!!

Thanks
 
N

Natty Gur

Hi,

use full qulified name when you add your assembly to config file :

<httpModules>
<add
type=".NET Class, Assembly [,Version=version number]
[,Culture=culture] [,PublicKeyToken=token]"
name="MyHttpModule" />
</httpModules>


without PublicKeyToken CLR loader won't look for your assembly in the
GAC. in application compilation phase ASP.NET uses this entry to create
reference to dynamic create assembly. and as i mention CLR take in
account if assembly reference holds SN public key.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
N

Natty Gur

Hi,

use full qulified name when you add your assembly to config file :

<httpModules>
<add
type=".NET Class, Assembly [,Version=version number]
[,Culture=culture] [,PublicKeyToken=token]"
name="MyHttpModule" />
</httpModules>

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
G

Guest

Thanks Natty, but my httpmodules entry is as follows:

<add name="CustomAuthenticationModule" type="GenericHttpModule.SecurityModules.CustomAuthenticationModule, GenericHttpModule, Version=1.0.0.0 Culture=neutral, PublicKeyToken=84cff19282edc2cb"/>

So, as far as I can see I am using the fully qualified name.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top