MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

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

Viewed 64932 time(s), 7 post(s) 6/21/2011 4:32:51 PMby monolith

Related topics

monolith

monolith

6/21/2011 4:32:52 PM
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.
This content has not been rated yet. 
46 Reputation 5 Total posts
denis

denis

6/21/2011 5:02:12 PM
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: http://www.mono-software.com/blog/post/Mono/109/MonoX-with-medium-trust-shared-hosting/
This content has not been rated yet. 
7207 Reputation 956 Total posts
monolith

monolith

6/21/2011 5:30:09 PM
[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=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, 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:
4010
An unhandled security exception has occurred.
MediumMonoX
5092
w3wp.exe
NT AUTHORITY\NETWORK SERVICE
http://monox.local.net/
127.0.0.1
This content has not been rated yet. 
46 Reputation 5 Total posts
denis

denis

6/21/2011 5:53:26 PM

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.


This content has not been rated yet. 
7207 Reputation 956 Total posts
monolith

monolith

6/21/2011 7:04:58 PM
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.
This content has not been rated yet. 
46 Reputation 5 Total posts
denis

denis

6/21/2011 9:33:38 PM
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.
This content has not been rated yet. 
7207 Reputation 956 Total posts
khorvat

khorvat

4/4/2013 7:14:14 AM
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 content has not been rated yet. 
15993 Reputation 2214 Total posts