Thank you for your response.
I think I could do it by creating a custom policy derived from the
web_minimaltrust.config.
In this policy I could give Full trust for my assemblies based on
StrongNameMembershipCondition and UrlMembershipCondition. I successfully
set up such an environment using 2 new codegroups, my main pages got full
trust (it is needed for it because it uses remoting).
However, when I want to run the start page of a web service under a
_restricted app_ I got an exception:
SecurityException: Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.]
System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter
xmlImporter, SoapReflectionImporter soapImporter, Boolean
serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use,
SoapParameterStyle paramStyle, String elementName, String
elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members,
Boolean validate, String key) +0
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs) +1996
This is strange because 2 codegroup explicitly gives Full trust to ms
assemblies. I lost, please help. I attached the modified config file, the
last two codegroup is my addition.
Regards,
Zsolt Soczo
Dominick Baier said:
Hello Zsolt,
if allowOverride=false in machine.config - you can't.
Another approach would be to create 2 web sites in IIS - and place a
web.config
in the corresponding root directory which set the trust level for the
site.