2015-05-04 70 views
0

我試圖讓該網站運行ComponentArt以在本地運行。它適用於DEV服務器,但不在本地。一些回調不起作用。我在服務器端代碼中設置了一個斷點,並且它沒有被打到,因爲JavaScript正在嘗試調用它。ComponentArt回調不會觸發,因爲JavaScript對象爲空或未定義

JavaScript的錯誤是:

SCRIPT5007:屬性的 '的SaveChanges' 的值是空值或未定義,而不是一個Function對象 文件:PopupDataCollectionNoteExternal.aspx.js,線:35,柱:2

服務器端代碼是:

<ComponentArtCallbackMethod()> Public Function SaveChanges(ByVal sDrawerID As String, ByVal iDataCollectionRequestID As String, ByVal iNoteID As String, ByVal sNote As String, ByVal iClosed As String, ByVal sResolution As String) As String 
... 
End Function 

的JavaScript代碼是:

var sReturn = SaveChanges(sDrawerID,iDataCollectionRequestID, iNoteID, sNote, iClosed, sResolution); 

任何人都知道是否有配置項或文件丟失?

回答

0

我想答案就在這裏:

http://www.componentart.com/community/forums/t/64103.aspx

您在IIS 7在環境中集成模式可能運行在那裏它不爲你工作。

這種配置需要IIS 7在集成模式:

<system.web> 

    <compilation debug="true" targetFramework="4.0" /> 

    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /> 

    <httpHandlers> 

     <add type="ComponentArt.Web.UI.ScriptHandler,ComponentArt.Web.UI" path="ComponentArtScript.axd" verb="*" /> 

     <add type="ComponentArt.Web.UI.CallbackHandler,ComponentArt.Web.UI" path="*.aspx" verb="*" /> 

    </httpHandlers> 
     <roleManager enabled="true" />  

    </system.web> 

    <system.webServer> 

    <validation validateIntegratedModeConfiguration="false" /> 

    <handlers> 

    <add name="ComponentArtCallbackHandler" path="*.aspx" verb="*" type="ComponentArt.Web.UI.CallbackHandler" resourceType="Unspecified" preCondition="integratedMode" /> 

     <add name="ComponentArtScriptHandler" type="ComponentArt.Web.UI.ScriptHandler,ComponentArt.Web.UI" path="ComponentArtScript.axd" verb="*" /> 

    </handlers> 

    </system.webServer>