medium-trust

What application trust level is need for ASP.NET MVC framework?

Hi, i am trying to deploy simple asp.net mvc frameworkd application in may shared hosting and i get erro like this: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change t...

Running ASP.Net websites in Medium Trust environments

Hi, Disclaimer: I have limited ASP.Net skills I have a couple of websites which I am transferring from my current hosting onto the Mosso hosting service. When I tried transferring one of the websites, I got the error "System.Security.SecurityException: That assembly does not allow partially trusted callers.", which appears to have to d...

Send Email on GMail SMTP under medium trust

Hi I need to send an email from my app, which will be running under medium trust. My current email sending code that works fine under full trust throws SecurityException under medium trust [SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77...

ASP.NET MVC in Medium Trust

Hi, just trying to set up my development environment for ASP.NET MVC, have started a blank ASP.NET MVC project, and have placed the following in my web.config: <trust level="Medium" originUrl=""/> Running the project then results in the following exception: Description: The application attempted to perform an operation not allowed ...

Reset changepassword control in ASP.Net under medium trust

Hi A ChangePassword Control does not let us change the password multiple times in succession. The control never shows its text boxes after the first time. I found a fix here (http://msmvps.com/blogs/egoldin/archive/2007/10/30/reseting-changepassword-control.aspx) but it wont work under medium trust. Any ideas how can i reset my Chan...

Rediret from global.asax under medium trust

I have this simple Application_Error method in my global.asax, and it does not redirect in case an exception occurs under medium trust. Can someone tell me whats wrong here. This code works fine under full trust void Application_Error(object sender, EventArgs e) { Response.Redirect("~/error.aspx",false); } ...

ASP.NET Using Twitterizer in Medium Trust

Does anyone using the Twitterizer framework have any experience running it in a Medium Trust environment? I keep getting security exceptions... Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please conta...

File I/O in medium trust?

I'm attempting to read the contents of a file in a medium trust environment (Go Daddy), and Im naturally getting SecurityException with FileIOPermission. Is there anyway around this? ...

How to Automate Testing of Medium Trust Code

I would like to write automated tests that run in medium trust and fail if they require full trust. I am writing a library where some functionality is only available in full trust scenarios and I want to verify that the code I wish to run in medium trust will work fine. If also want to know that if I change a class that requires full ...

NonPublic causing a permissions error in reflection on medium trust

I must say that so far, I've probably just been darn lucky in that I've never come across the problems associated with a web site running in medium trust. I've only ever developed intranet apps or happened to have use a hosting company that runs in full trust. But the host I've been asked to use for a recent project runs at medium trust ...

Using Castle Windsor and the NHibernate facility on shared hosting

I'm attempting to use Windsor and NHibernate in a medium trust environment and I'm running up against some problems with permissions. I have read through the other questions on this but I'm using Windsor's NHibernate facility which I haven't seen discussed. For some reason there is a dependency on the Castle.Service.Transations assembly...

db4o running in asp.net Medium Trust environment

I am using the embedded client/server version of db4o (I called OpenServer() instead of OpenFile() method) so that I can host an asp.net website that will have several users reading and writing to the database simultaneously. The only issue is that the webhost that we use is a medium trust environment so it's throwing an error stating t...

Any hints on getting Sitefinity CMS to work on medium trust?

We have been using Mosso / The Rackspace Cloud until very recently, but they have suddenly switched to a medium trust model for .NET for newly added sites and will be migrating existing server farms to medium trust shortly We can't get our Sitefinity CMS V3.6 SP2 (the latest) to work in this environment. Does anyone have any ideas abou...

Is there any way to do Image Quantization safely and with no Marshalling?

I'm currently using Brendan Tompkins ImageQuantization dll. http://codebetter.com/blogs/brendan.tompkins/archive/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness.aspx But it doesn't run in medium trust in asp.net. Does anyone know of a Image Quantization library that does run in medium trust? Update I don't care if the solu...

What risk does Reflection pose? (Medium Trust)

The lack of reflection in Medium Trust hosting environments seems to cause a lot of problems for many popular web applications. Why is ReflectionPermission disabled by default with Medium Trust? What risk does reflection pose in a shared hosting environment? For random reference, see MSDN: How to use Medium Trust in ASP.NET 2.0 ...

string template and medium trust hosting

Hi my problem is with string template and operating under medium trust that godaddy enforces. Has anyone had the same problem and what did you do? Moving to another host is a solution so feel free to name one. Modifying the code will be the last thing I want to do since it is mostly done and it will set me back some time. I have read ...

ReportViewer Control and a Medium Trust Server

I have a couple of websites with the same hoster that have been setup with 2 different trust levels. One is 'Full' and the other is 'Medium'. I did not realise this because the hoster decided to implement a new security policy and not tell anyone. I only found out when I tried to use the ReportViewer control like I had on the other, olde...

Unable to upload a file from web page in ASP.NET 3.5 web application running in Medium Trust

Possible Duplicate File I/O in medium trust? I get the following error when I try to upload a file from a web page: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed The web application runs on ASP.NET Framewor...

Is there a way to generate(emit) code at runtime in medium trust?

I would like to know if there is something similar to CSharpCodeProvider, but it should work in ASP.NET Medium Trust, anyone knows a good one? [EDIT 08-25-2009] Why I want to do that? I was writing a simple tutorial about Link to Objects and I would like users could write some simple querys on a textbox, post it to server to see the ...

Encrypt and Save the ASP.NET ConnectionString within the web.config using Medium Trust?

I have searched around Google and Stackoverflow but can't seen to come up with a solution for editing the web.config to encrypt and store a SQL Server connection string for an installation script. The link at Accessing the web.config in Medium trust seems to suggest that the following code would work instead of OpenWebConfiguration, ...