2009-09-29 107 views
0

我感動從XP ASP.NET應用程序到一個新的服務器,現在我有這樣的例外:ASP.NET安全異常

「System.Security.Permissions.SecurityPermission, mscorlib程序,版本= 2.0 .0.0, 文化=中性

在此行中的代碼:

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(「it-IT」);

我的服務器,從而可配置: 的Windows XP 2003 Sever的 的SharePoint MS Visual Studio 2008團隊系統工作組服務器

我試圖改變安全設置,machine.config中。 有人可以幫我解釋我在哪裏以及如何改變什麼?

非常感謝。

回答

0

SharePoint不考慮.NET Framework中的所有程序集都是安全的,只需在應用程序中爲您的web.config文件添加幾行即可。

做它在SharePoint SafeControls部分:

<SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Security" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
<SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Security.Permissions" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
+0

謝謝,但它沒有按-T的工作,我想還添加 <的SafeControl大會= 「MyAssembly程序」 命名空間= 「System.Security」 的TypeName = 「*」Safe =「True」AllowRemoteDesigner =「True」/> 但是例外情況相同。 – Neo1975 2009-09-30 06:49:00