Error calling Web Service from Excel Application
I've got this error too. I tried to trust all assemblies that my Excel
program used, but it didn't work.
This is an error I got;
System.Security.Policy.PolicyException: Execution permission cannot be
acquired.
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at System.CodeDom.Compiler.CompilerResults.get_Compil edAssembly()
at
eYesoft.Tools.WebServices.DynamicWebServiceProxy.B uildAssemblyFromWsdl(String
strWsdl)
at eYesoft.Tools.WebServices.DynamicWebServiceProxy.B uildProxy()
at eYesoft.Tools.WebServices.DynamicWebServiceProxy.. ctor(String
wsdlLocation, String inTypeName, String inMethodName)
at UCI.Client.UCIApplication.AsyncInvokeService(UCISe rviceTask task)
at VaRExcel.OfficeCodeBehind.CalculateRequest(String brokerUrl, Int32
numWorker, Int32 numRequest, String date, Int32 method) in
c:\inetpub\wwwroot\hpcnc\uciclientexample\varexcel \thisworkbook.cs:line 220
at VaRExcel.OfficeCodeBehind.ThisApplication_SheetFol lowHyperlink(Object
sh, Hyperlink target) in
c:\inetpub\wwwroot\hpcnc\uciclientexample\varexcel \thisworkbook.cs:line 188
Please help.
Thanks
Thanapol R.
|