0

我试图让这个运行 ComponentArt 的网站在本地运行。它适用于 DEV 服务器,但不适用于本地。一些回叫不起作用。我在服务器端代码中设置了一个断点,它没有被命中,因为试图调用它的 JavaScript 出错了。

JavaScript 错误是:

SCRIPT5007:属性“SaveChanges”的值为 null 或未定义,不是函数对象文件: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);

有人知道是否缺少配置项或文件吗?

4

1 回答 1

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>
于 2015-07-16T12:36:08.850 回答