Mono Support SecurityException 

Viewed 37802 time(s), 5 post(s), 5/31/2011 8:28:59 PM - by gonzalom
5/31/2011 8:29:14 PM
345 Reputation 38 Total posts

Hi, I'm installing MonoX remotely at my customer's location for a demo.
I've found some security issues, an SecurityException is being raised complaining about the application's trust level.
I installed MonoX twice on Win 7 and had no problems. In this case this windows server 2008.
I know there's an attribute related to this that one can assign to the assemblies but in my case this seems not to be an option.
IIS configuration looks ok and I run aspnet_regiis -i just in case.
I'm attaching an screenshot for your reference.
Thanks,

Gonzalo

1
5/31/2011 9:37:25 PM
7207 Reputation 956 Total posts

Yes, this is a trust isue, however it looks rather strange, like they have minimal trust security settings - I would not say that this is a medium trust environment.
The whole story behind this concept can be found here: http://www.mono-software.com/blog/post/Mono/109/MonoX-with-medium-trust-shared-hosting/
Can you review and change at least some of the trust settings at their server, or is this a hosted environement that is out of your control?

2
6/1/2011 3:03:34 PM
345 Reputation 38 Total posts

Hi, the problem was resolved by a collegue of mine.
I'll copy here the solution as he described it in an email.
Thanks,

Gonzalo

So the problem stems from the default security in Server 2008r2.The original zip file that Gonzalo moved has this attribute (Blocked), which is inherited when unzipped.

By unblocking the zip and then extracting, the attribute is no longer present. I copied these files over top of the web site. I moved the site from being a virtual on the default web site to its own site, and added a user to run the app pool.The binding is for http://.....

3
6/1/2011 3:14:25 PM
7207 Reputation 956 Total posts

Great, I guess we should always look for more simple causes :)
Actually, this is a very good suggestion for other users - please check if your installation zip fil is blocked when downloaded: http://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a

4
10/19/2011 11:19:51 PM
647 Reputation 69 Total posts

The reference Denis made to the article regarding CLI Streams absolutely solved an issue I was having. I had a fully functioning portal test site based on MonoX 4.1.2741.40. I then downloaded the MonoX 4.5.3057.40 zip and upgraded my test site. After the upgrade I got an "That assembly does not allow partially trusted callers" error when trying to use the portal. I spent much time researching and editing permissions, etc.

Then I found this Topic and I reluctantly downloaded the streams.exe and executed it on my portal folder and files. My portal was instantly fixed.

My thanks go out to Gonzalom and Denis.

- Grant

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