HighTechTalks DotNet Forums  

Assembly Permissions & Web App

Dotnet Security microsoft.public.dotnet.security


Discuss Assembly Permissions & Web App in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Registered User
 
Posts: n/a

Default Assembly Permissions & Web App - 12-21-2007 , 10:05 AM






I am experiencing some problems with permissions. The web app uses an
assembly which contains pages derived from System.Web.UI.Page, derived
WebControls and a few helper classes. This assembly in turn uses a
third-party assembly (Endeca) to call the back-end. The app runs fine
both in the VS2005 debugger and in an ISS virtual directory on a Vista
box and a W2k server box. On a new XP-SP2 box with VS2005 installed, a
System.Security.SecurityException is thrown because a
System.Web.AspNetHostingPermission request failed (b77a5c561934e089).

After spending some time reading about permissions and this error I
find myself more confused. Adding

[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution
= true)]
[assembly: PermissionSet(SecurityAction.RequestOptional, Name =
"Nothing")]
[assembly: UIPermissionAttribute(SecurityAction.RequestMinimu m,
Unrestricted = true)]

to the assembly's Assembly.Info file failed to resolve the error. When
these lines are added to the file on the other boxes, the application
no longer runs. The same error occurs and the stack trace is
identical.

[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.Util.GetTypeFromAssemblies(ICollecti on assemblies,
String typeName, Boolean ignoreCase) +140
System.Web.UI.TemplateParser.GetType(String typeName, Boolean
ignoreCase, Boolean throwOnError) +295
System.Web.UI.TemplateParser.ProcessInheritsAttrib ute(String
baseTypeName, String codeFileBaseTypeName, String src, Assembly
assembly) +163

System.Web.UI.TemplateParser.PostProcessMainDirect iveAttributes(IDictionary
parseData) +192


All the machines have the VS2005 service pack installed and the OSs
all are fully updated. The new box also has the 3.0 and 3.5 NET
versions installed.

Can someone point me in the right direction or tell me what I'm
missing?

regards
A.G.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.