AllowPartiallyTrustedCallers
4 posts
• Page 1 of 1
RE: AllowPartiallyTrustedCallers
System.Security.SecurityException: That assembly does not allow partially trusted callers.
Server stack trace:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at PHP.Core.Externals.InitCollocation()
at PHP.Core.Externals.InitializeExtMans()
at PHP.Core.Externals.EndRequest()
at PHP.Core.ScriptContext.RunApplication(Delegate mainRoutine, String relativeSourcePath, String sourceRoot)
at Dorp.DorpletHost.Hosts.PhpHostedProvider.OnRender(RenderParameters parameters)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at 0:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
The action that failed was:
LinkDemand
The assembly or AppDomain that failed was:
PhpNetCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71
The method that caused the failure was:
PHP.ExtManager.RemoteDispatcher Collocate()
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///C:/WINDOWS/assembly/GACMSIL/PhpNetCore/2.0.0.0_0a8e8c4c76728c71/PhpNetCore.dll
Server stack trace:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at PHP.Core.Externals.InitCollocation()
at PHP.Core.Externals.InitializeExtMans()
at PHP.Core.Externals.EndRequest()
at PHP.Core.ScriptContext.RunApplication(Delegate mainRoutine, String relativeSourcePath, String sourceRoot)
at Dorp.DorpletHost.Hosts.PhpHostedProvider.OnRender(RenderParameters parameters)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at 0:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
The action that failed was:
LinkDemand
The assembly or AppDomain that failed was:
PhpNetCore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71
The method that caused the failure was:
PHP.ExtManager.RemoteDispatcher Collocate()
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///C:/WINDOWS/assembly/GACMSIL/PhpNetCore/2.0.0.0_0a8e8c4c76728c71/PhpNetCore.dll
- schizoidboy@codeplex
- Posts: 10
- Joined: January 7th, 2012, 8:37 pm
RE: AllowPartiallyTrustedCallers
Looking closer at the Exception, PhpNetCore was just the assembly in which it failed (as PhpNetCoredoes have AllowPartiallyTrustedCallers), but it looks like php4ts does not. This is where the exception was thrown from in Externals.cs:
private static void InitCollocation()
{
// load php4ts
Assembly ass = Assembly.Load("php4ts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=43b6773fb05dc4f0");
// obtain reference to RemoteDispatcher (this is not a proxy!)
_localExtMan = (IExternals)ass.GetType("PHP.ExtManager.StartupHelper").InvokeMember("Collocate",
BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Static, null, null, null);
}
private static void InitCollocation()
{
// load php4ts
Assembly ass = Assembly.Load("php4ts, Version=2.0.0.0, Culture=neutral, PublicKeyToken=43b6773fb05dc4f0");
// obtain reference to RemoteDispatcher (this is not a proxy!)
_localExtMan = (IExternals)ass.GetType("PHP.ExtManager.StartupHelper").InvokeMember("Collocate",
BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Static, null, null, null);
}
- schizoidboy@codeplex
- Posts: 10
- Joined: January 7th, 2012, 8:37 pm
AllowPartiallyTrustedCallers
I am trying to use Phalanger in a partial trust AppDomain, but it fails...
- schizoidboy@codeplex
- Posts: 10
- Joined: January 7th, 2012, 8:37 pm
RE: AllowPartiallyTrustedCallers
Potential fix would be to add
[assembly: System::Security::AllowPartiallyTrustedCallers];
into Stdafx.cpp in ExtSupport.PHP4 project
[assembly: System::Security::AllowPartiallyTrustedCallers];
into Stdafx.cpp in ExtSupport.PHP4 project
- schizoidboy@codeplex
- Posts: 10
- Joined: January 7th, 2012, 8:37 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 11 guests