473,569 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

to execute codes that need low trust level on a server where thrust level is high

33 New Member
I a using

System.Reflecti on
System.Runtime. InteropServices
System.Security .Permissions

In my web application
In this, Reflection need low thrust level to run
But I have hosted my site in a shared server.
So thrust level is high

I have tried to over ride the trust level by adding

<location allowOverride=" true">
<securityPolicy >
<trustLevel name="Full" policyFile="int ernal" />
<trustLevel name="High" policyFile="web _hightrust.conf ig" />
<trustLevel name="Medium" policyFile="web _mediumtrust.co nfig" />
<trustLevel name="Low" policyFile="web _lowtrust.confi g" />
<trustLevel name="Minimal" policyFile="web _minimaltrust.c onfig" />
</securityPolicy>
<trust level="Low" originUrl="http ://192.166.1.82/xxx.com" />

</location>

In my applications web.config

Unfortunately this became impossible since the server administrator has

Done <location allowOverride=" false"> on
C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \CONFIG\web.con fig
On the server


What can I do to execute codes that need low trust level
on a server where thrust level is high

:( ;(
Sep 15 '07 #1
2 1890
JosAH
11,448 Recognized Expert MVP
I'll move your question over to the .NET Forum section where it belongs.

kind regards,

Jos
Sep 15 '07 #2
KUTTAN
33 New Member
I'll move your question over to the .NET Forum section where it belongs.

kind regards,

Jos
I solved it by



1)Download the latest version of Enterprise Library : http://www.microsoft.c om/downloads/details.aspx?fa milyid=5a14e870-406b-4f2a-b723-97ba84ae80b5&di splaylang=en
and install (by default, it will be installed under C:\Program Files\Microsoft Enterprise Library January 2006)


2)Download the patch to run EnterPriselibra ry in Medium trust :
http://www.codeplex.co m/entlib/Release/ProjectReleases .aspx?ReleaseId =1339


3)Replace the src and de unittests directories from the Enterprise library by the ones in the patch

4)run 2 batch files which come with the EntLib.
First, run BuildLibrary.ba t, then CopyAssemblies. bat (both files are to be found in the same folder)

5)Replace the references in your webproject (Microsoft.Prac tices......dll) by the newly compiled under the enterprise library. Warning : all the dll's seem to be gathered in one bin directory under the enterprise library.


6)Change the web.config, add requirePermissi on="false" to the <section name="netTiersS ervice" type="MySan.Dat aAccessL .... line (ignore the warning you will get about the non declared attribute)


7)Rebuild your webproject and publish ... it worked



A greate url is bellow http://community.codes mithtools.com/forums/p/4233/17397.aspx
Sep 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7840
by: Bob Garbados | last post by:
I'm pretty new to php\linux and I'm trying to encrypt a file using gpg from a php page on a linux box and it's not working. The following code works for executing 'ls', but not gpg... $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the...
17
7434
by: David Hughes | last post by:
For example, in Python in a Nutshell, Alex Martelli shows how you can run a Windows (notepad.exe) or Unix-like (/bin/vim) text editor using os.spawnv(os.P_WAIT, editor, ) But how would you call the OS X text editor /Applications/TextEdit.app - which appears to be a whole directory inside /Applications? I'm sorry if the answer is blindingly...
0
2592
by: xixi | last post by:
hi, we are using db2 udb v8.1 on win 64 bit with fp3 with type 4 db2jcc.jar driver. when i execute this query , select id, arno01, arcd01, arno16, artx01, armo09, ardy09, arcc09, aryr09, arnm03, armo53, ardy53, arcc53, aryr53, arcd64, arid02 from NJIPD.ARLTNT2 WHERE arno01=13962 ORDER BY arno01 ASC, arcd01 ASC (one where clause)
5
2517
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the...
10
1767
by: Henk van Lingen | last post by:
Hi, docs say (19.2.1): When trust authentication is specified, PostgreSQL assumes that anyone who can connect to the server is authorized to access the database as whatever database user he specifies (including the database superuser). This method should only be used when there is adequate operating system-level protection on connections...
3
1507
by: Aahz | last post by:
I have asp.net 1.1 web site with two controls downloaded from internet (obout slide menu and webcharts), which runs fine on the old server. Few days ago my hosting provider sent me on new server with restricted trust policy (medium trust). Since that I cannot configure my web.config to run !!! I have noticed that two controls mentioned...
2
1561
by: g3000 | last post by:
I used VS .Net 2003 to run a c# web app. but when I run it I get the below 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...
21
4069
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a reliable way of connecting Access to a server. I am willing to switch to any version of Access which might solve the problem. Which server would you...
0
2104
by: Atul Thombre | last post by:
Hello, I am developing a custom membership provider. For that I built a prototype that uses a SQL Server 2005 database as a backend store. I implemented the class System.Web.Security.MembershipProvider and implemented few necessary methods. The methods use SQL for interacting with the SQL Server database. I put all this code in a class...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.