Tuesday, January 26, 2010

AspNetHostingPermission Security Exception Fix in IIS7

I used the ASP.NET Server Control, part of Search Server Community kit in an Intranet site.

The Intranet site was running on IIS 7 and the application pool running on Classic mode. (need to make some changes to run on Integrated pipeline) mode.

Deployed the search page and placed the Microsoft.SearchToolkit.DotNetSearchControls.dll in the bin folder.

Tried loading the search page and got the following error.

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Set 'Load User Profile' to true for the application pool and it will fix the above security exception.

1 comment:

Shahedul Huq Khandkar said...

thank you so much!

Post a Comment