2013-02-22 43 views
1

我需要一個cfajaxproxy接口到我的服務器(傳遞數據而不必在頁面上進行提交)。希望cfajaxproxy是正確的方式去?ColdFusion使用cfajaxproxy給出「模板被拒絕訪問」錯誤

爲了學習這一點,我首先修改了http://tutorial13.learncf.com/所示的示例教程,但是在得到「模板拒絕訪問」錯誤後,我決定直接使用本教程,它只有兩個小文件(可以是從他的教程中剪切並粘貼)。不幸的是,我在他的教程中遇到了同樣的錯誤(儘管他將它作爲演示運行在他的網站上)。那麼?

我把proxy.cfc文件放在我正在訪問的(主要)wwwroot目錄中(第一次使用cfc)。我是否需要讓託管公司允許服務器上運行(運行ColdFusion 8)?

謝謝。錯誤詳細信息:

出錯處理請求時 安全性:要求模板已被拒絕到C訪問:/Coldfusion8/wwwroot/WEB-INF/cfclasses/cfproxy2ecfc771136334.class。

以下是內部異常消息:訪問被拒絕(java.io.FilePermission中C:/Coldfusion8/wwwroot/WEB-INF/cfclasses/cfproxy2ecfc771136334.class讀)

ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem. 
Resources: 
Check the ColdFusion documentation to verify that you are using the correct syntax. 
Search the Knowledge Base to find a solution to your problem. 
Browser  Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17 
Remote Address  72.201.113.149 
Referrer  
Date/Time 22-Feb-13 12:42 AM 
Stack Trace 
java.security.AccessControlException: access denied (java.io.FilePermission C:/Coldfusion8/wwwroot/WEB-INF/cfclasses/cfproxy2ecfc771136334.class read) at cfdemo2ecfm1260454926.runPage(C:/Websites/202350mu7/wwwroot/sf/demo.cfm:1) 

java.security.AccessControlException: access denied (java.io.FilePermission C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cfproxy2ecfc771136334.class read) 
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374) 
at java.security.AccessController.checkPermission(AccessController.java:546) 
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) 
at java.lang.SecurityManager.checkRead(SecurityManager.java:871) 
      ... 

回答

2

這是一個安全沙箱問題,你需要聯繫你的主機,並確保你有一個沙箱可以訪問這個文件夾。

+0

謝謝。你能告訴我是否應該把這個cfc放在一個子文件夾中,如果這樣的話,如果這影響了任何CF標籤來訪問它。 (服務器是否搜索組件和子目錄的整個目錄樹不會影響標籤)? – Ray 2013-02-22 16:43:33