Hi, I had a look at the medium trust level this weekend. The main problem is that you need ReflectionPermission to get Ajax.NET Professional running, of course, because all what Ajax.NET is doing is Reflection.
When your hosting provider has configured <trust level="Medium"/>
ReflectionPermission is missing in the ASP.NET code access security.
Only if the hosting provider has set the allowOverride attribute to
true you can override this setting in your application web.config.
You can simply do this by adding following XML configuration to a
personalized policy file (i.e. copy of webtrustmedium.config):
<configuration>
<mscorlib>
<security>
<policy>
<PolicyLevel version="1">
<SecurityClasses>
<!-- [SNIP] -->
<SecurityClass Name="ReflectionPermission"
Description="System.Security.Permissions.ReflectionPermission,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
</SecurityClasses>
<NamedPermissionSets>
<IPermission
class="ReflectionPermission"
version="1"
Flags="MemberAccess"
/>
<!-- [SNIP] -->
</NamedPermissionSets>
<!-- [SNIP] -->
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>
Copy the new policy file in your web server folder and add following
configuration to your web.config file:
<configuration>
<system.web>
<securityPolicy>
<trustLevel name="Custom" policyFile="custom.config" />
</securityPolicy>
<trust level="Custom" originUrl="" />
</system.web>
</configuration>
This is only working if your hosting provider does allow to modify the
policy and trust configuration. If there is no permission for
Reflection you may not use Ajax.NET Professional. :(
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---
custom.config
Description: application/xml
