locked
Could not load file or assembly 'Ajax' or one of its dependencies. The system cannot find the file specified

    Question

  • Can anyone help me pls Sad

    I created a new application and it was working fine, after that I change my computer and got a new one I had problems when I was trying to load the solution file but finally I solve this problem, after loading the project I have tow problems: the 1st problem with Debuging my project i have this error: (a project with an Output Type of class Librarycannot be started directly), the 2nd one when i try to open the index.aspx page in my localhost I have this error:

    Configuration Error

    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 'Ajax' or one of its dependencies. The system cannot find the file specified.

    Source Error:

    Line 38:   <system.web>
    Line 39: 	<httpHandlers>
    Line 40: 		<add verb="POST,GET" path="csharpwrapper/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
    Line 41: 		<add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
    Line 42:     </httpHandlers> 

    Source File: C:\Inetpub\wwwroot\powerandwaterme_com\web\web.config    Line: 40

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Ajax' could not be loaded.

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    

    Thursday, July 26, 2007 1:25 PM

Answers

  • I think I have seen this before.  Usually it is because on your old machine you were referencing a dll from the GAC, and now on your new machine that dll isn't in the GAC.  The easiest (and safest) way to fix this is to not reference the dll from the GAC and have a local copy.

     

    So, in your web project make sure all of the AJAX dlls are in the BIN directory.  Then, if you are using a Web Project (instead of a Web Site) you can check the References, selected the DLL that is giving you trouble, and make sure the "Copy Local" property is set to true.

    Thursday, July 26, 2007 4:29 PM

All replies

  • I think I have seen this before.  Usually it is because on your old machine you were referencing a dll from the GAC, and now on your new machine that dll isn't in the GAC.  The easiest (and safest) way to fix this is to not reference the dll from the GAC and have a local copy.

     

    So, in your web project make sure all of the AJAX dlls are in the BIN directory.  Then, if you are using a Web Project (instead of a Web Site) you can check the References, selected the DLL that is giving you trouble, and make sure the "Copy Local" property is set to true.

    Thursday, July 26, 2007 4:29 PM
  • Thank's Chris, I'll try to do that.

     

    Tuesday, August 07, 2007 2:20 PM