Hi,
I'm developing a Windows Control Library to use as Smart Client in a
ASP.NET application and one of the tasks of my custom control is call a
WebService. So, when i try to call the WebService using my control
through the IE, i get this exception:
System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.EnvironmentPermission , mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
at System.Security.CodeAccessSecurityEngine.Check(Obj ect demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.CredentialCache.get_DefaultCredentials( )
at
System.Web.Services.Protocols.WebClientProtocol.se t_UseDefaultCredentials(Boolean
value)
at
com.Enterprise.Impressao.webCaixa.Caixa.set_UseDef aultCredentials(Boolean
value)
at com.Enterprise.Impressao.webCaixa.Caixa..ctor()
at com.Enterprise.Impressao.PDV.enviaReducao(String[]
memoriaFiscal, Boolean isReducaoZ)
at com.Enterprise.Impressao.PDV.fecharCaixa()
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.EnvironmentPermission
and i call my webService at enviaReducao() method. I've trusted my
assembly as FullTrust too.
What should i do?
thanks in advance.