2010-08-12 41 views
1

我從hereDemo)下載的樣本,但是當我在我的Godady服務器上部署它,它給了我錯誤ASP.NET 3.5 + System.Web.Routing

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 

任何一個可以告訴我什麼Godady錯誤。這個示例在本地機器上正常工作。

回答

0

我寫信給Godady但困惑問什麼他們現在....

支持人員響應

感謝您在線聯繫 支持。

這看起來像一個信任issue.Trust 級是指決定什麼 操作,不能被Web應用程序進行 在 Web.config文件設置權限。我們的ASP.NET 3.5 共享託管服務器使用默認的 中等信任級別,並添加了OleDbPermission,OdbcPermission, 的 以及限制較少的WebPermission。 在中型 信任級別下運行的應用程序沒有註冊表訪問, 不能訪問Windows事件日誌, 並且無法使用ReflectionPermission (但可以使用Reflection)。這樣的應用程序只能與 通信,網絡地址的定義範圍爲 ,文件系統訪問僅限於 應用程序的虛擬目錄 的層次結構。

使用介質的信任級別可以防止訪問共享 系統資源 應用和消除了對應用 干擾 潛力。添加OleDbPermission 和OdbcPermission允許應用程序 使用這些數據提供程序訪問 數據庫。 WebPermission被修改爲 以允許出站http和https通信。

請讓我們知道,如果我們能以其他任何方式幫助 你。

客戶查詢

我已經上傳我的網站 (http://www.pinchofbliss.com/anything

,但我得到的錯誤:

============ ================================================== ========

描述:該應用程序嘗試執行 執行安全策略不允許的操作。要授予此 應用程序所需的權限 請與您的系統 管理員聯繫或更改 應用程序的信任級別在 配置文件中。

異常詳細信息: System.Security.SecurityException: 請求類型的 「System.Security.Permissions.SecurityPermission, mscorlib程序許可,版本= 2.0.0.0, 文化=中性

== ================================================== ====================

更多的細節讓我寫更多的 此示例應用程序在本地機器上工作正常 連我放在 與應用源代碼 示例應用程序可以從這裏下載 http://chriscavanagh.wordpress.com/2008/03/11/aspnet-routing-goodbye-url-rewriting/