Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Общие вопросы по .NET и C# > Ошибка безопасности


Автор: lvavulin 10.3.2005, 15:01
Здравствуйте, помогиет пожалуйста разобраться. При запуске сайта в IE, появляется следующая ошибка безопасности:

Security Exception
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=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.]
FORIS.Board.Global.Application_Start(Object sender, EventArgs e) +0

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


Подскажите что делать, наверное как-то надо настраивать Microsoft .NET Framework, вот только как?

Заранее спасибо

Автор: AntonSaburov 10.3.2005, 16:50
Ну тут же черным по белому:
Цитата(lvavulin @ 10.3.2005, 15:01)
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.

Прописать в IIS, что твоя прикладуха требует больше прав, чем другие. Это и надо сказать IIS. Но на вопрос "Как" не скажу - не знаю.

Автор: lvavulin 10.3.2005, 16:54
Цитата(AntonSaburov @ 10.3.2005, 16:50)
Ну тут же черным по белому:
Цитата(lvavulin @ 10.3.2005, )
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.

Прописать в IIS, что твоя прикладуха требует больше прав, чем другие. Это и надо сказать IIS. Но на вопрос "Как" не скажу - не знаю.

Вот и я не знаю, может кто знает, где эти права прописываются?

Автор: [Last]Wizard 11.3.2005, 15:46
Administrative Tools -> Microsoft .NET Framework 1.1 Configuration.
Там открываем Runtime Security Policy -> Machine -> Code Groups -> All Code, создаем новый Code Group, указываем имя, условие принадлежности к группе (Membership Condition), и уровень привилегий. Ok.

И потом наверное перегрузиться надо - точно не помню.


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)