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.

SecurityException  (Mono Support )

Viewed 28883 time(s), 5 post(s) 5/31/2011 8:28:59 PMby gonzalom
gonzalom

gonzalom

5/31/2011 8:29:14 PM
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
This content has not been rated yet. 
345 Reputation 38 Total posts
denis

denis

5/31/2011 9:37:25 PM
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?
This content has not been rated yet. 
7207 Reputation 956 Total posts
gonzalom

gonzalom

6/1/2011 3:03:34 PM
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://.....
Rated 5.00, 1 vote(s). 
345 Reputation 38 Total posts
denis

denis

6/1/2011 3:14:25 PM
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
Rated 5.00, 1 vote(s). 
7207 Reputation 956 Total posts
grant-stone007

grant.stone007

10/19/2011 11:19:51 PM
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
This content has not been rated yet. 
647 Reputation 69 Total posts