H
Hari Menon
Hi,
I have an ASP.NET web application that connects to a web service (the web
app contains a DLL that connects to the web service). This works fine when I
deploy it on the Default Web Site on IIS.
However, if I deploy it on a SharePoint website, I get the
"System.MethodAccessException: Attempt to access the method failed." error -
the full call stack is shown below. From what I can see, SharePoint uses
impersonation. Is that the problem?
How do I solve this problem?
Thanks.
System.MethodAccessException: Attempt to access the method failed. at
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly,
Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean&
bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean
publicOnly, Boolean fillCache) at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean fillCache) at
System.Activator.CreateInstance(Type type, Boolean nonPublic) at
System.Web.Services.Protocols.SoapReflectedExtension.GetInitializer(LogicalMethodInfo
methodInfo) at
System.Web.Services.Protocols.SoapReflectedExtension.GetInitializers(LogicalMethodInfo
methodInfo, SoapReflectedExtension[] extensions) at
System.Web.Services.Protocols.SoapClientType..ctor(Type type) at
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
(call stack of my app)
I have an ASP.NET web application that connects to a web service (the web
app contains a DLL that connects to the web service). This works fine when I
deploy it on the Default Web Site on IIS.
However, if I deploy it on a SharePoint website, I get the
"System.MethodAccessException: Attempt to access the method failed." error -
the full call stack is shown below. From what I can see, SharePoint uses
impersonation. Is that the problem?
How do I solve this problem?
Thanks.
System.MethodAccessException: Attempt to access the method failed. at
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly,
Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean&
bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean
publicOnly, Boolean fillCache) at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean fillCache) at
System.Activator.CreateInstance(Type type, Boolean nonPublic) at
System.Web.Services.Protocols.SoapReflectedExtension.GetInitializer(LogicalMethodInfo
methodInfo) at
System.Web.Services.Protocols.SoapReflectedExtension.GetInitializers(LogicalMethodInfo
methodInfo, SoapReflectedExtension[] extensions) at
System.Web.Services.Protocols.SoapClientType..ctor(Type type) at
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
(call stack of my app)