• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 517
  • Last Modified:

IIS 7.5 Security Error

I'm currently trying to deploy my web application to Windows server 2008 R2.  When running an aspx pages that contain AJAX, I get the following error message:

SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase) +0
   System.Web.UI.NamespaceTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean throwOnError) +98
   System.Web.UI.NamespaceTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +11
   System.Web.UI.TagPrefixTagNameToTypeMapper.System.Web.UI.ITagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs) +127
   System.Web.UI.MainTagNameToTypeMapper.GetControlType2(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +228
   System.Web.UI.MainTagNameToTypeMapper.GetControlType(String tagName, IDictionary attribs, Boolean fAllowHtmlTags) +28
   System.Web.UI.RootBuilder.GetChildControlType(String tagName, IDictionary attribs) +20
   System.Web.UI.ControlBuilder.CreateChildBuilder(String filter, String tagName, IDictionary attribs, TemplateParser parser, ControlBuilder parentBuilder, String id, Int32 line, VirtualPath virtualPath, Type& childType, Boolean defaultProperty) +69
   System.Web.UI.TemplateParser.ProcessBeginTag(Match match, String inputText) +526
   System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) +926


The AjaxControlToolkit.dll are located in the bin directory of the application.  I have also checked the properties of this file and it shows to be blocked.  So I select unblock and apply.  Then go back to the file, and it shows it set back to block.  Not sure what to do.

Thanks,
Brian
0
rcvalentinis
Asked:
rcvalentinis
1 Solution
 
Tray896Commented:
Try going into the configuration of your app pool that this is running under, and set the property Load User Profile to True.  More info here:

http://dbvt.com/blog/post/AspNetHostingPermission-Security-Exception-Fix-with-Ajax-in-IIS7.aspx

http://computermutt.wordpress.com/2009/10/02/security-exception-when-using-ajax-control-toolkit-on-server-2008/
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now