Cấp bậc tác giả:

DOTNET

Lỗi System.Web.AspNetHostingPermission trong IIS7

Được viết bởi webmaster ngày 02/01/2015 lúc 05:37 PM
Nếu bạn nhận được lỗi này khi cố gắng truy cập Database trên IIS7
  • 0
  • 7574

Lỗi System.Web.AspNetHostingPermission trong IIS7

Nếu bạn nhận được lỗi này khi cố gắng truy cập Database trên IIS7
Code:
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.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Thì bạn cần phải thay đổi thiết lập Application pool "Load User Profile" là true

Ví dụ như hình sau:

load_user_profile_01.jpg

load_user_profile_02.jpg

Nguồn bài viết: DOTNET.VN

BÌNH LUẬN BÀI VIẾT

Bài viết mới nhất

LIKE BOX

Bài viết được xem nhiều nhất

HỌC HTML