HttpHandler (another Could not load type )
-
Hello first of sorry for the bad english but im dyslexic im working on a simpel httpHandler at the momment but my problem is that i simply cant regiser it in my web.config, i have tryed adding a assembly name (im on the WWD so i dont think i can actly make assembys?) bouth whith my application name and whith the App_Code (bouth whith the handler in the App_Code folder And whith it in the root, and if is the App_Code folder DotNet wont let me build my page at all) after 3 houres of forum searching im truey lost, i whent on the MSDN and copy pasted there helloworld exampel but its not working eather... i tryed whith following in my Root web.config (not that i have any sub cfg's now.
<httpHandlers> <remove verb="\*" path="\*.asmx"/> **<add verb="\*" path="\*.sample" type="HelloWorldHandler,HelloWorldHandler"/>** <add verb="\*" path="\*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="\*" path="\*\_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpHandlers>
And whith:
<add verb="*" path="*.sample" type="HelloWorldHandler,HelloWorldHandler"/>
**Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'HelloWorldHandler' or one of its dependencies. The system cannot find the file specified.**
=== Pre-bind state information ===
LOG: User = vexis\vexi
LOG: DisplayName = HelloWorldHandler
(Partial)
LOG: Appbase = file:///C:/Users/vexi/Documents/webs/vxm/
LOG: Initial PrivatePath = C:\Users\vexi\Documents\webs\vxm\bin
Calling assembly : (Unknown).LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\vexi\Documents\webs\vxm\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied t -
Hello first of sorry for the bad english but im dyslexic im working on a simpel httpHandler at the momment but my problem is that i simply cant regiser it in my web.config, i have tryed adding a assembly name (im on the WWD so i dont think i can actly make assembys?) bouth whith my application name and whith the App_Code (bouth whith the handler in the App_Code folder And whith it in the root, and if is the App_Code folder DotNet wont let me build my page at all) after 3 houres of forum searching im truey lost, i whent on the MSDN and copy pasted there helloworld exampel but its not working eather... i tryed whith following in my Root web.config (not that i have any sub cfg's now.
<httpHandlers> <remove verb="\*" path="\*.asmx"/> **<add verb="\*" path="\*.sample" type="HelloWorldHandler,HelloWorldHandler"/>** <add verb="\*" path="\*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="\*" path="\*\_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpHandlers>
And whith:
<add verb="*" path="*.sample" type="HelloWorldHandler,HelloWorldHandler"/>
**Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'HelloWorldHandler' or one of its dependencies. The system cannot find the file specified.**
=== Pre-bind state information ===
LOG: User = vexis\vexi
LOG: DisplayName = HelloWorldHandler
(Partial)
LOG: Appbase = file:///C:/Users/vexi/Documents/webs/vxm/
LOG: Initial PrivatePath = C:\Users\vexi\Documents\webs\vxm\bin
Calling assembly : (Unknown).LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\vexi\Documents\webs\vxm\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied tHi, Ok thats fine do one thing, first create a simple app with Httphandler. Follow simple steps below: 1.Create class and inherit it from "IHttpModule " interface 2.Imlement the below method public void Init(HttpApplication context) { //context.BeginRequest += new EventHandler(context_BeginRequest); } void context_BeginRequest(object sender, EventArgs e) { //HttpApplication app = (HttpApplication)sender; } 3. Add below code in yr web.config file Regards Anil Pal
-
Hi, Ok thats fine do one thing, first create a simple app with Httphandler. Follow simple steps below: 1.Create class and inherit it from "IHttpModule " interface 2.Imlement the below method public void Init(HttpApplication context) { //context.BeginRequest += new EventHandler(context_BeginRequest); } void context_BeginRequest(object sender, EventArgs e) { //HttpApplication app = (HttpApplication)sender; } 3. Add below code in yr web.config file Regards Anil Pal
-
Hello first of sorry for the bad english but im dyslexic im working on a simpel httpHandler at the momment but my problem is that i simply cant regiser it in my web.config, i have tryed adding a assembly name (im on the WWD so i dont think i can actly make assembys?) bouth whith my application name and whith the App_Code (bouth whith the handler in the App_Code folder And whith it in the root, and if is the App_Code folder DotNet wont let me build my page at all) after 3 houres of forum searching im truey lost, i whent on the MSDN and copy pasted there helloworld exampel but its not working eather... i tryed whith following in my Root web.config (not that i have any sub cfg's now.
<httpHandlers> <remove verb="\*" path="\*.asmx"/> **<add verb="\*" path="\*.sample" type="HelloWorldHandler,HelloWorldHandler"/>** <add verb="\*" path="\*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="\*" path="\*\_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </httpHandlers>
And whith:
<add verb="*" path="*.sample" type="HelloWorldHandler,HelloWorldHandler"/>
**Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'HelloWorldHandler' or one of its dependencies. The system cannot find the file specified.**
=== Pre-bind state information ===
LOG: User = vexis\vexi
LOG: DisplayName = HelloWorldHandler
(Partial)
LOG: Appbase = file:///C:/Users/vexi/Documents/webs/vxm/
LOG: Initial PrivatePath = C:\Users\vexi\Documents\webs\vxm\bin
Calling assembly : (Unknown).LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\vexi\Documents\webs\vxm\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied tFound it! i missed the IIS 7 changes >_<<br mode="hold" /> http://msdn.microsoft.com/en-us/library/bb515251.aspx[^] Handlers are now defined in
<system.webServer>
<handlers>
<Handler here (whith name="" now)>
</handlers>
</system.webServer>i guss i shod have looked harder but thanks for youre time thou ^^ (found it when googgling "httpmodule vs httphandler" 4 houres of random httpmodule didnt work, werd and imho MS shod revisit there tuturials)