Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. HttpHandler (another Could not load type )

HttpHandler (another Could not load type )

Scheduled Pinned Locked Moved ASP.NET
csharphelpalgorithmstoolsquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vexi
    wrote on last edited by
    #1

    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

    A V 2 Replies Last reply
    0
    • V vexi

      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

      A Offline
      A Offline
      anilpal
      wrote on last edited by
      #2

      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

      V 1 Reply Last reply
      0
      • A anilpal

        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

        V Offline
        V Offline
        vexi
        wrote on last edited by
        #3

        thanks alot mate realy nice :] but do the httphandler and moduels work the same way? im building a image handler (it is working if im targting it direct in the url), you think a modul are better sutted for such a job? ways thanks agen :D

        1 Reply Last reply
        0
        • V vexi

          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

          V Offline
          V Offline
          vexi
          wrote on last edited by
          #4

          Found 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)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups