medium-trust

.Net Hosting (Flexible Medium Trust) [closed]

青春壹個敷衍的年華 提交于 2019-12-22 00:35:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Any recommendations for cheap .Net hosting that has flexible medium trust rules allowing the use of reflection? 回答1: GoDaddy Hosting (info) - Really cheap, $5/month. And the most popular. DiscountASP.NET (info) - More expansive, starting from $10/month+. The good thing is that they are specializing on .NET SoftSys

NHibernate 2.1.2 in medium trust

爱⌒轻易说出口 提交于 2019-12-21 17:25:32
问题 I'm trying to configure nhibernate 2.1.2 to run in medium trust, without any luck. I have tried follwing the suggestions to run in medium trust and pre-generating the proxies. I then tried to remove all references to lazy loading setting the default-lazy="false" on all classes and bags. However this threw an exception asking me to configure the proxyfactory.factory_class None of these methds worked as they kept throwing generic security exceptions or throwing easying that libraries do not

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

好久不见. 提交于 2019-12-21 05:54:08
问题 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 solution is slow. I just need something that works. 回答1: You should be able to replace the code using Marshal with explicit reading of the underlying stream via

Creating directories in medium trust environment?

守給你的承諾、 提交于 2019-12-20 06:24:54
问题 I've got an ASP.NET Web Application running in a medium trust environment with a shared hosting provider. The following code causes a SecurityException to be thrown: private void TestButton_Click(object sender, EventArgs e) { string directory = Server.MapPath("~/MyFolder/") + "_TestDirectory"; if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); } The full text of the error is: System.Security.SecurityException: Request for the permission of type 'System.Security

Using ELMAH in medium trust

↘锁芯ラ 提交于 2019-12-13 05:16:32
问题 I'm building an ASP.net mvc app, and am having some problems getting ELMAH deployed using xml logging to a medium trust server, though it works fine on my local machine. It keeps getting a 404 error. The problem might be that the host doesn't allow relative filepaths, so the "~/App_Data" doesn't work for logging. I switched that to: logPath="\\Something\Something\ID\www.website.com\web\content\App_Data" in the web.config. The syntax might be completely off, but I've tried a few variations and

Running Ninject 3 on medium trust level

点点圈 提交于 2019-12-13 01:29:07
问题 I've an ASP.NET MVC3 application with Ninject 3. The Ninject 3 was installed using NuGet, and now I'm trying to publish this application on a host that uses medium trust level. So after I searched on google a little I found an build on the Ninject GoogleCode project website an specific version for medium trust environments, so I downloaded and changed the references on my project, and after I published it I still get the same error. I already changed the way that I create my kernel and I'm

Ninject and trust level medium

亡梦爱人 提交于 2019-12-12 15:02:35
问题 I am trying to host my asp.net mvc 4 web app using hostgator. The problem at hand is the fact that the plan I am using only allows for the medium trust level. My application currently has the Ninject MVC package installed. I have tried using the ".NET Framework 4.0 for medium trust environments" version of Ninject from Ninject's homepage, but alas no go. Is there any way I can get Ninject 3.0 working with a medium trust level? The application attempted to perform an operation not allowed by

How do you check if you are running in Medium Trust environment in .NET?

為{幸葍}努か 提交于 2019-12-12 10:17:00
问题 I am running a website on shared hosting at GoDaddy (not my choice, because it is always Medium Trust), and I have some advanced features that I would like to turn on if the application is run in High Trust. So would like to know, if there is an way to check if at runtime if the application is running in Medium Trust environment in .NET? 回答1: You could try the following code: if (!SecurityManager.IsGranted(new RegistryPermission(PermissionState.Unrestricted))) { //do something.... not at full

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

好久不见. 提交于 2019-12-11 01:50:29
问题 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, however this is not working on the local development server (running Medium Trust) or at Rackspace Cloud (formerly Mosso). String cfgpath = Server.MapPath(@"/web

Modify configuration section programmatically in medium trust

江枫思渺然 提交于 2019-12-10 18:52:17
问题 I have a custom ConfigurationSection in my application: public class SettingsSection : ConfigurationSection { [ConfigurationProperty("Setting")] public MyElement Setting { get { return (MyElement)this["Setting"]; } set { this["Setting"] = value; } } } public class MyElement : ConfigurationElement { public override bool IsReadOnly() { return false; } [ConfigurationProperty("Server")] public string Server { get { return (string)this["Server"]; } set { this["Server"] = value; } } } In my web