Medium trust environment?

Jan 26, 2010 at 3:18 AM

Can you use MvcSiteMap user medium trust? When I try and run my application with:

<siteMap defaultProvider="MvcSiteMap">

I get the error:

Required permissions cannot be acquired. 
Looking into the stack trace I find:

[HttpException (0x80004005): Could not load file or assembly 'MvcSiteMap.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
Jan 26, 2010 at 7:00 AM

No, currently not possible.

Jan 26, 2010 at 8:05 PM

From what I know, there is some reflection in the code.

This reflection is used to look at what 'authorization/roles' attributes are set on the controller method.  This let's it know if access to that method is allowed and if it should show that controller.   Maybe there is a better way of doing this?

I proposed an alternative method (closed in issue tracker), but maartenba looked at it and said it would not work right now...not sure why.

Additionally, if you ONLY used hand keyed roles in the sitemap and were not relying on the authorization in the controller for determining site map access, you could remove this code and then it may work in partial trust?

Thoughts anyone?