2012-08-02 79 views
0

我試着去建立阿賈克斯無法包括AJAX文件

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 13:  <!-- Register the ajax handler --> 
Line 14:  <add verb="POST,GET" path="ajax/*.ashx" 
Line 15:   type="Ajax.PageHandlerFactory, Ajax" /> 
Line 16:  </httpHandlers> 
Line 17: 

我已經加入到我的bin文件夾中的文件是AjaxPro.dll當從IE收到此錯誤消息,我已經添加了上面的代碼配置文件。

誰能告訴我如何解決這個問題?

PS的Ive使用此作爲指導 MSDN Page

+0

我的回答可以幫到你嗎? – 2012-08-03 14:24:02

回答

0

嘗試一個引用添加到AjaxPro.2.dll

(針對.NET 1.1框架使用AjaxPro.dll )

添加以下行到你的web.config:

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.web> 
    <httpHandlers> 
     <add verb="POST,GET" path="ajaxpro/*.ashx" 
      type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> 
    </httpHandlers> 

... 

爲.NET 1.1框架使用AjaxPro.dll
添加以下行到你的web.config:

<?xml version="1.0" encoding="utf-8" ?> 
    <configuration> 
     <system.web> 
     <httpHandlers> 
      <add verb="POST,GET" path="ajaxpro/*.ashx" 
       type="AjaxPro.AjaxHandlerFactory, AjaxPro"/> 

... 
0

我面臨同樣的問題。目前我的webconfig是

<system.webServer> 
     <handlers> 
       <add name="AjaxPro" verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> 
      </handlers> 
     <validation validateIntegratedModeConfiguration="false" /> 
    </system.webServer> 

它工作正常。