Mono Support Installation error - Windows Server 2008 R2 (Closed)

Viewed 66861 time(s), 7 post(s), 6/21/2011 4:32:51 PM - by monolith
6/21/2011 4:32:52 PM
46 Reputation 5 Total posts

Cannot install MonoX on local Windows Server 2008 R2 64bit.

Copied MonoX (.NET 4.0) files to C:\sites\monox
Granted NETWORK SERVICE full permissions to monox folder
Created monox AppPool, "monox" with .NET4 Integrated
Added monox web site to IIS using monox AppPool
Under Basic Settings in monox website properties, click Test Connection and results are as follows:
Authentication success
Authorization - Cannot verify access to path (C:\sites\monox)

Browsing to the site results in the following:
Security Exception - System.Security.SecurityException: That assembly does not allow partially
trusted callers.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
MonoSoftware.MonoX.BaseHttpApplication..ctor() +0
MonoSoftware.MonoX.Global..ctor() +5
ASP.global_asax..ctor() +5

MonoX log is empty

Getting this error in the Windows Application log:
A process serving application pool 'monox' suffered a fatal communication error with the Windows Process Activation Service. The process id was '6556'. The data field contains the error number.

6/21/2011 5:02:12 PM
7207 Reputation 956 Total posts

This may be a medium trust issue - is this a shared host with medium trust security policy, or is this machine under your total control? More details on medium trust problems and their solutions can be found here:

6/21/2011 5:30:09 PM
46 Reputation 5 Total posts

[The server is installed on my development laptop (local machine)]

As suggested, In the web.config file, I changed the <trust level> to: <trust level="MediumMonoX" legacyCasModel="true"/>

Restarted IIS
Browsed to the site and got a different security error:

Security Exception - System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib, Version=,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +154
System.Web.HttpRequest.MapPath(VirtualPath virtualPath) +37
System.Web.HttpServerUtility.MapPath(String path) +99
MonoSoftware.MonoX.BaseHttpApplication.Application_Start(Object sender, EventArgs e) +201

Windows Application Event Viewer:
An unhandled security exception has occurred.

6/21/2011 5:53:26 PM
7207 Reputation 956 Total posts

You should leave the following tag intact on your local machine

<trust level="Full" />

You effectively lowered the trust level, and there is no need to do it in your local environment. So, going back to your first error message, you may have the global trust level set to low on a machine level, as it overrides the individual application settings. Global settings are defined in a config file that is located here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config (the location depends on the version of .NET and your Windows installation folder). Look for a trust element in that file.

It this is not the cause, we should try a TeamVIewer session to diagnose it. Do you have any other ASP.NET applications running on that server? If not, it may be caused the the IIS misconfiguration that is easily solved with the aspnet_regiis tool.

6/21/2011 7:04:58 PM
46 Reputation 5 Total posts

The global web.config was set to Full trust.

I figured this must be a Windows issue and related to my computer's configuration. Although I am logged in using an administrator account, I am not logged in as the original "Administrator" account that was used to install IIS; Therefore, for some reason, Windows has blocked my account from executing the MonoX site.

I logged in as "Administrator" and was able to access the MonoX setup page.

Then, I logged in using my other administrative account, right-clicked on Internet Explorer and selected Run as Administrator and was able to access the start-up page!

Sometimes, the simplest solution evades the best of us! Perhaps this post will save someone else from this elusive issue.

6/21/2011 9:33:38 PM
7207 Reputation 956 Total posts

Glad to hear that you resolved your problem. Note that MonoX does not have to be installed under "Administrator" account - most of the real-word scenarios involve installation on the various shared hosting platforms. The installation process just copies the MonoX files, sets up the database and changes a few settings in the web.config.
I'm quite sure that this error indicates a problem with the application pool MonoX is running under (maybe it was stopped for some reason, had insufficient privileges, or maybe it is shared with another application using a different version of .NET), but let's leave it at that unless it causes more problems.

4/4/2013 7:14:14 AM
15993 Reputation 2214 Total posts

UPDATE: One of the issues that can cause this error is blocked ZIP. As reported by one of our clients you need to unblock the ZIP file in order for installation and CMS to work properly, otherwise you will get the same exception as described above.

This is a demo site for MonoX. Please visit Mono Software for more info.