Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 16, 2012 07:43 PM by sbpvwder
Member
1 Points
5 Posts
Jun 16, 2012 07:43 PM|LINK
Hi,
I am stumped and need some suggestions in resolving the following error I am getting in my application that is configured to use an HttpModule that I have created:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load type 'namespaceResponseModifier.ResponseModifer'.
...
Exception Details: System.Web.HttpException: Could not load type 'namespaceResponseModifier.ResponseModifer'.
Stack Trace:
[HttpException (0x80004005): Could not load type 'namespaceResponseModifier.ResponseModifer'.]
[ConfigurationErrorsException: Could not load type 'namespaceResponseModifier.ResponseModifer'.]
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
The web server is IIS Express 7.0.
In the web.config file, the code for the <system.webServer> element is:
<system.webServer>
<modules>
<add name="ResponseModifier" type="namespaceResponseModifier.ResponseModifer" />
</modules>
</system.webServer>
The assembly for the HttpModule resides in C:\...\HttpModulePreSendRequestContentCS\Bin\ResponseModifier.dll
I have also tried placing the source for the HttpModule in the App_Code directory but I am still getting Server Error on loading the HttpModule.
In this 2nd scenario, I am getting the following error:
Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.
Exception Details: System.TypeLoadException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.
[TypeLoadException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
[ConfigurationErrorsException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
[HttpException (0x80004005): Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
I have also tried using the Visual Studio Development Web Server instead of the IIS Express Web Server. I tried this server with both scenarios:
- with the assembly in the bin folder
- with the source in the App_Code folder.
These scenarios respectively produced the following Errors:
Server Error in '/HttpModulePreSendRequestContentCS' Application.
Configuration Error
Parser Error Message: Could not load type 'ResponseModifer'. (C:\...\HttpModulePreSendRequestContentCS\web.config line 8)
Source File: C:\...\HttpModulePreSendRequestContentCS\web.config Line: 8
Parser Error Message: Could not load type 'ResponseModifer' from assembly 'App_Code'. (C:\...\HttpModulePreSendRequestContentCS\web.config line 8)
Any suggestions as to what I can do to resolve the problem would be greatly appreciated.
HttpModules web.config
sbpvwder
Member
1 Points
5 Posts
Server Error loading HttpModule
Jun 16, 2012 07:43 PM|LINK
Hi,
I am stumped and need some suggestions in resolving the following error I am getting in my application that is configured to use an HttpModule that I have created:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load type 'namespaceResponseModifier.ResponseModifer'.
...
Exception Details: System.Web.HttpException: Could not load type 'namespaceResponseModifier.ResponseModifer'.
...
Stack Trace:
[HttpException (0x80004005): Could not load type 'namespaceResponseModifier.ResponseModifer'.]
...
[ConfigurationErrorsException: Could not load type 'namespaceResponseModifier.ResponseModifer'.]
...
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
The web server is IIS Express 7.0.
In the web.config file, the code for the <system.webServer> element is:
<system.webServer>
<modules>
<add name="ResponseModifier" type="namespaceResponseModifier.ResponseModifer" />
</modules>
</system.webServer>
The assembly for the HttpModule resides in C:\...\HttpModulePreSendRequestContentCS\Bin\ResponseModifier.dll
I have also tried placing the source for the HttpModule in the App_Code directory but I am still getting Server Error on loading the HttpModule.
In this 2nd scenario, I am getting the following error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.
...
Exception Details: System.TypeLoadException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.
...
Stack Trace:
[TypeLoadException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
...
[ConfigurationErrorsException: Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
...
[HttpException (0x80004005): Could not load type 'namespaceResponseModifier.ResponseModifer' from assembly 'App_Code'.]
...
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
I have also tried using the Visual Studio Development Web Server instead of the IIS Express Web Server. I tried this server with both scenarios:
- with the assembly in the bin folder
- with the source in the App_Code folder.
These scenarios respectively produced the following Errors:
Server Error in '/HttpModulePreSendRequestContentCS' Application.
--------------------------------------------------------------------------------
Configuration Error
...
Parser Error Message: Could not load type 'ResponseModifer'. (C:\...\HttpModulePreSendRequestContentCS\web.config line 8)
...
Source File: C:\...\HttpModulePreSendRequestContentCS\web.config Line: 8
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Server Error in '/HttpModulePreSendRequestContentCS' Application.
--------------------------------------------------------------------------------
Configuration Error
...
Parser Error Message: Could not load type 'ResponseModifer' from assembly 'App_Code'. (C:\...\HttpModulePreSendRequestContentCS\web.config line 8)
...
Source File: C:\...\HttpModulePreSendRequestContentCS\web.config Line: 8
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Any suggestions as to what I can do to resolve the problem would be greatly appreciated.
HttpModules web.config