Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0; Initialize CMS application - kentico

I am running website on kentico 11.
When i'm trying to host and run locally through iis am getting following error.
When am running website directly from visual studio to browser. Then i am not getting this issue.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 23:
Line 24: // Initialize CMS application. This method should not be called from custom code.
Line 25: InitApplication();
Line 26: }
Line 27:
Source File: \CMS\App_Code\Global.asax.cs Line: 25
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.]
CMS.Core.AssemblyDiscovery.IsAssemblyDiscoverable(String filePath) +0
CMS.Core.AssemblyDiscovery.AddOnlyDiscoverableAssembly(ICollection`1 assemblies, Dictionary`2 preloadedAssemblies, AssemblyName assemblyName, String filePath) +131
CMS.Core.AssemblyDiscovery.ExecuteGetAssemblies(Boolean onlyDiscoverable) +1192
CMS.Core.AssemblyDiscovery.get_DiscoverableAssemblies() +31
CMS.Core.TypeManager.PreInitializeTypes() +193
CMS.Core.ModuleEntryManager.PreInit() +19
CMS.Core.AppCore.PreInit() +146
CMS.DataEngine.CMSApplication.PreInit() +164
CMS.DataEngine.CMSHttpApplication.InitApplication() +24
Global..cctor() in \CMS\App_Code\Global.asax.cs:25
[TypeInitializationException: The type initializer for 'Global' threw an exception.]
Global..ctor() +0
ASP.global_asax..ctor() +48
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +174
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737
any help is much appriciated

This package is added to the solution via nugets. It referenced in packages.config.
Clean and rebuild should help. Make sure the it exists in the /packages folder, if not restore nugets (or Update-Package ) for your solution and try to rebuild again. It must exists the /bin folder after the build.

Related

IIS - [Exception: Debugger detected - this software cannot run with Debugger.]

I have some handlers running on the IIS server in Windows server 2019. All this handlers are working fine as expected for all the requests.
Suddenly from yesterday, weirdly server is responding failure for the all the request without any changes on the hosted application. Im not attaching to the debugger or any such debugging tools.
Here is the error:
[Exception: Debugger detected - this software cannot run with
Debugger.] AuthorizeService.RegistryProvider.BuildPartition() +68
.cctor() +8
[TypeInitializationException: The type initializer for ''
threw an exception.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached,
RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +119
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly,
Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
+232 System.Activator.CreateInstance(Type type, Boolean nonPublic) +83 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes, StackCrawlMark& stackMark) +1088
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes) +124 System.Activator.CreateInstance(Type
type, BindingFlags bindingAttr, Binder binder, Object[] args,
CultureInfo culture) +20
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[]
args) +60
System.Web.HttpRuntime.CreateNonPublicInstanceByWebObjectActivator(Type
type) +59
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1
moduleList) +167
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext)
+1068 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +82
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +218
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +296
[HttpException (0x80004005): The type initializer for '' threw
an exception.] System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +10074716
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.7.3429.0
I'm suspecting there is some configuration issue on IIS that needs to be modified. On IIS Manager, [.Net Compilation] => [Debug] already set to [false]. Also, [Server side Debug mode] on ASP set to [False].
Did you insert any dl-ls into the References? They might be old and may not work which is causing the program to not work just go to the Debug of the program, %userprofile%\source\repos{NameOfProgram}{NameOfProgram}\Bin\Debug{ProgramFileName}, and it should start the program. Just don't debug it will give an error while inserting the code of the program.
%userprofile% represents current user

Sitecore Logs - Azure Search

Currently I'm seeing the following a lot in my logs, I'm using Sitecore 8.2 rev 2 with azure. The issue only started recently when I added some new indexes to the site for a new microsite. Any ideas of where to start investigating, I've raised with Sitecore too?
ManagedPoolThread #17 22:03:10 ERROR Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
Nested Exception
Exception: System.AggregateException
Message: One or more errors occurred.
Source: mscorlib
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`2 body)
at Sitecore.ContentSearch.AbstractSearchIndex.PerformUpdate(IEnumerable`1 indexableInfo, IndexingOptions indexingOptions)
Nested Exception
Exception: System.InvalidOperationException
Message: Sequence contains no elements
Source: System.Core
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Sitecore.ContentSearch.Azure.CloudSearchUpdateContext.Delete(IIndexableId id)
at Sitecore.ContentSearch.SitecoreItemCrawler.Update(IProviderUpdateContext context, IIndexableUniqueId indexableUniqueId, IndexEntryOperationContext operationContext, IndexingOptions indexingOptions)
at Sitecore.ContentSearch.AbstractSearchIndex.<>c__DisplayClass93_2.<PerformUpdate>b__0(IndexableInfo info, ParallelLoopState parallelLoopState)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object )
For those with the same issue,
The patch is Sitecore.Support.158988 found here:
https://github.com/SitecoreSupport/Sitecore.Support.158988
Versions cover Sitecore 8.2 update 1 and update 2.
164633 The CloudSearchUpdateContext.Delete(IIndexableId) fails with an exception in case the search index does not contain any matching documents.
Thanks.
Looks like there is a patch for this from Sitecore, hopefully this will resolve the issue.

CRM trying re-create 'Business Closure Calendar' calendar every minute

We are getting following error in event log because InternalOperationPlugin is trying to create 'Business Closure Calendar' in Calender entity almost every minute.
InternalOperationPlugin is a core system plugin which is registered on Stage 30 (non-customizable). Can anyone give an idea why core plugin is trying to create this record every minute.
We are on Roll up 8 and not in position to install latest.
Thanks in Advance
The Web Service plug-in failed in OrganizationId: 07ae1f6f-237f-e111-83c6-005056b41d30; SdkMessageProcessingStepId: 22ccbb1b-ea3e-db11-86a7-000a3a5473e8;
EntityName: calendar;
Stage: 30;
MessageName: RetrieveMultiple;
AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;
ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin;
Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
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.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.ArgumentException: Item has already been added. Key in dictionary: '7fdf4980-237f-e111-83c6-005056b41d30' Key being added: '7fdf4980-237f-e111-83c6-005056b41d30'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at Microsoft.Crm.ObjectModel.CalendarService.RetrieveMultiple(EntityExpression entityExpression, ExecutionContext context)
** Error from Event Log **
at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Pipeline.Execute(PipelineExecutionContext context)
at MessageProcessor.Execute(PipelineExecutionContext context)
at InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
at InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at SandboxSdkListener.Execute(SandboxCallInfo callInfo, SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)
at
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at MessageRpc.Process(Boolean isOperationContextSet)
at ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at ChannelHandler.AsyncMessagePump(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at AsyncResult.Complete(Boolean completedSynchronously)
at ReceiveAsyncResult.OnReceiveComplete(Object state)
at SessionConnectionReader.OnAsyncReadComplete(Object state)
at AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at LazyAsyncResult.Complete(IntPtr userToken)
at NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at AsyncResult.Complete(Boolean completedSynchronously)
at ReadAsyncResult.OnAsyncReadComplete(Object state)
at SocketConnection.AsyncReadCallback(Boolean haveResult, Int32 error, Int32 bytesRead)
at IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at _IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Web Service Plug-in failed in SdkMessageProcessingStepId: {22CCBB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: calendar; Stage: 30; MessageName: RetrieveMultiple; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
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.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.ArgumentException: Item has already been added. Key in dictionary: '7fdf4980-237f-e111-83c6-005056b41d30' Key being added: '7fdf4980-237f-e111-83c6-005056b41d30'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at Microsoft.Crm.ObjectModel.CalendarService.RetrieveMultiple(EntityExpression entityExpression, ExecutionContext context)
.
UPDATE
I have already checked Calendar Entity. There is only one record with Id equals to '7fdf4980-237f-e111-83c6-005056b41d30'. Mpreover, I have searched whole database to find out if there is any other record using same Id.

Using IronPython on MS load tests

I am trying to use IronPython (2.7.3) in my MS load test (Visual studio 2012)
When calling : var engine = Python.CreateEngine();
I am getting :
Failed to load language 'IronPython 2.7.3': The method or operation is not implemented. ---> System.NotImplementedException: The method or operation is not implemented.
at Microsoft.VisualStudio.TestTools.Common.EqtStringPerThreadWriter.get_Encoding()
at System.IO.TextWriter.SyncTextWriter.get_Encoding()
at IronPython.Runtime.PythonFile.InitializeConsole(SharedIO io, ConsoleStreamType type, String name)
at IronPython.Runtime.PythonContext.SetStandardIO()
at IronPython.Runtime.PythonContext.InitializeSystemState()
at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)
--- End of inner exception stack trace ---
at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)
at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)
at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language)
at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)
at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName)
It's strange because when I am running a single unit test everything works perfectly.
I have IronPython 2.7.3 installed and have all the IronPython requested DLLs in my project.
In addition, I am also using Resharper for tests executing - When I ran a single test it's works and when i am trying to run a set of tests together it's crashes with same exception
Solve it :
var runtime = new ScriptRuntime(setup);
var ms = new MemoryStream();
runtime.IO.SetOutput(ms, new StreamWriter(ms));
runtime.IO.SetErrorOutput(ms, new StreamWriter(ms));
var engine = runtime.GetEngine("IronPython");
Apparently , i need to add the output streams.

MonoDevelop security error when trying to run a website on Windows

Perhaps this is just a bug in MonoDevelop but I am trying to build an Orchard website using MonoDevelop on Windows7. I am using the latest MonoDevelp v 2.6b1 and when I try to run Orchard v 1.0 which can be downloaded directly from Codeplex I get the following error. Seems like a partial trust error but I don't get this error when using Visual Studio 2010. (I am trying to see how easily I can create an Orchard Website using only Open Source/Free tools).
Adding applications '/:.'...
Registering application:
Host: any
Port: any
Virtual path: /
Physical path: C:\dev\Orchard.Source.1.0.20\src\Orchard.Web\
Handling exception type SecurityException
Message is That assembly does not allow partially trusted callers.
IsTerminating is set to True
System.Security.SecurityException: That assembly does not allow partially trusted callers.
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstan
Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers.
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at Mono.WebServer.XSP.Server.RealMain(String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet)
at Mono.WebServer.XSP.Server.Main(String[] args)
at Application.Xsp.Main(String[] args)
I do not think you are running on Mono, for one, as Mono does not implement this security system. Make sure you tell MD that you want to run on Mono if that's what you intend.
As for actually running it on Mono, you might want to look at this thread: http://orchard.codeplex.com/discussions/247340.

Resources