asp.net mvc 3 - MVC 3 WCF Rest Service In Partial Trust -
i have created mvc 3 wcf rest project using tutorial described here. problem able run project , access rest api when application running @ high trust level when change trust level medium following when access service
[securityexception: request permission of type 'system.configuration.configurationpermission, system.configuration, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' failed.] system.security.codeaccesssecurityengine.check(object demand, stackcrawlmark& stackmark, boolean ispermset) +0 system.security.codeaccesssecurityengine.check(codeaccesspermission cap, stackcrawlmark& stackmark) +31 system.security.codeaccesspermission.demand() +46 system.servicemodel.description.configloader.checkaccess(iconfigurationcontextproviderinternal element) +12116253 system.servicemodel.description.configloader.lookupservicebehaviors(string behaviorname, contextinformation context) +12238226 system.servicemodel.description.configloader.loadservicedescription(servicehostbase host, servicedescription description, serviceelement serviceelement, action`1 addbaseaddress) +137 system.servicemodel.servicehostbase.loadconfigurationsectioninternal(configloader configloader, servicedescription description, serviceelement servicesection) +67 system.servicemodel.servicehostbase.applyconfiguration() +108 system.servicemodel.servicehostbase.initializedescription(urischemekeyedcollection baseaddresses) +192 system.servicemodel.servicehost.initializedescription(type servicetype, urischemekeyedcollection baseaddresses) +49 system.servicemodel.servicehost..ctor(type servicetype, uri[] baseaddresses) +151 microsoft.applicationserver.http.httpservicehost..ctor(type servicetype, uri[] baseaddresses) +63 microsoft.applicationserver.http.activation.httpconfigurableservicehost..ctor(type servicetype, ihttphostconfigurationbuilder builder, uri[] baseaddresses) +40 microsoft.applicationserver.http.activation.httpconfigurableservicehostfactory.createservicehost(type servicetype, uri[] baseaddresses) +79 system.servicemodel.activation.servicehostfactory.createservicehost(string constructorstring, uri[] baseaddresses) +420 system.servicemodel.hostingmanager.createservice(string normalizedvirtualpath) +1440 system.servicemodel.hostingmanager.activateservice(string normalizedvirtualpath) +44 system.servicemodel.hostingmanager.ensureserviceavailable(string normalizedvirtualpath) +615
please help.. ideas on how solve this
the web api project doesn't work in partial trust. pt support planned, hasn't been implemented yet.
Comments
Post a Comment