medium-trust

Medium-Trust File I/O permission

帅比萌擦擦* 提交于 2020-01-24 04:09:30
问题 According to this MSDN article about medium trust, under medium-trust: FileIOPermission is restricted. This means you can only access files in your application's virtual directory hierarchy. Your application is granted Read, Write, Append, and PathDiscovery permissions for your application's virtual directory hierarchy. However, for my current hosting provider runs applications under medium-trust and when I try to read/write a file in the application's root folder, I get a access to path

nhibernate proxy generator

青春壹個敷衍的年華 提交于 2020-01-07 01:21:35
问题 I am attempting to get nhibernate working in medium-trust. What I found said that I needed to use a proxy generator. I pulled the one from nhibernate's site. When I attempt to use it, I recieve an error that it could not load the assembly 'DynamicProxyGenAssembly2'. Is there something I am missing or is there one that works somewhere. I would prefer not to use the generator, but there seems to be no alternative with nhibernate. 回答1: From what I gather the issue with medium trust is the use of

nhibernate proxy generator

青春壹個敷衍的年華 提交于 2020-01-07 01:21:31
问题 I am attempting to get nhibernate working in medium-trust. What I found said that I needed to use a proxy generator. I pulled the one from nhibernate's site. When I attempt to use it, I recieve an error that it could not load the assembly 'DynamicProxyGenAssembly2'. Is there something I am missing or is there one that works somewhere. I would prefer not to use the generator, but there seems to be no alternative with nhibernate. 回答1: From what I gather the issue with medium trust is the use of

NHibernate 2 + Fluent Nhibernate medium trust

妖精的绣舞 提交于 2019-12-30 11:05:38
问题 Will NHibernate 2 and\or Fluent Nhibernate work in a medium trust environment. If not are there any work-arounds? 回答1: Not sure about fluent NH - I assume it should - it just translates to XML. With NH itself you will loose bytecode optimization, all your setters/constructors will need to be public. If you need to use lazy loading you will have to have your proxies generated with build (NH proxy generator). Should you have some permissions enabled in your medium trust settings you can relax

What risk does Reflection pose? (Medium Trust)

老子叫甜甜 提交于 2019-12-30 02:18:07
问题 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 回答1: Reflection allows malicious code to inspect all kinds of secrets: not so much intellectual property (though sure, that too), but data that should be private and

Allowing partially trusted callers security exception is been thrown althought running on Full trust mode

為{幸葍}努か 提交于 2019-12-25 16:08:43
问题 While developing using ASP.net 2.0 (C#) and NHibernate 2.1.0 I am getting the error: System.TypeInitializationException: The type initializer for 'NHibernate.ByteCode.LinFu.ProxyFactory' threw an exception. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers. This error is been thrown only in the production server (a web hosting company) and in my development environment everything is fine. I also ran this code below on the production server to see

Redirecting from Global.asax in Medium Trust

倾然丶 夕夏残阳落幕 提交于 2019-12-24 19:23:10
问题 I am attempting to do a redirect in the Application_Error handler in Global.asax. Nothing fancy at all. private void Application_Error(object sender, EventArgs e) { // ...snip... Server.Transfer(somePath, false); // ...snip... } This works great under Full trust, but I need to get it to work under Medium trust. The code I'm working on here needs to function properly in a shared hosting environment (Unfortunately, I have no control over this requirement). However, when I configure the site as

Subsonic 3.0 Medium Trust Issue

僤鯓⒐⒋嵵緔 提交于 2019-12-24 05:02:30
问题 I'm having an issue with running Subsonic in medium trust and don't know if i'm querying wrong - if there is some part of subsonic 3.0.3 that doesn't like medium trust can someone tell me? Someone else posted somethin similar a while ago and there was no real reply on whether it did exist or not (the bug). Rob said it had been tested, while someone else said they still had to bug (SubSonic 3.0 - Medium Trust) i'm using a query that looks like this: List<Data.Blog> objBlogPosts = ((from blog

RDLC Medium Trust

99封情书 提交于 2019-12-23 01:14:43
问题 Does anyone know of a free (for a non-profit group) RDLC reporting tool that will work under medium trust in IIS 7? 回答1: Our Data Dynamics Reports product is not free, but we did implement special support for working in the restrictive medium trust environments. I don't know if it is tested on IIS7 yet, but I presume the security policy is the same so it should work in any case. If it does not let us know and we will surely get it working as this is a scenario we explicitly wanted to make

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

吃可爱长大的小学妹 提交于 2019-12-22 04:45:16
问题 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 the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security