473,394 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

33
I a using

System.Reflection
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="internal" />
<trustLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal" policyFile="web_minimaltrust.config" />
</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\Microsoft.NET\Framework\v2.0.50727\CONF IG\web.config
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 1878
JosAH
11,448 Expert 8TB
I'll move your question over to the .NET Forum section where it belongs.

kind regards,

Jos
Sep 15 '07 #2
KUTTAN
33
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.com/downloads/details.aspx?familyid=5a14e870-406b-4f2a-b723-97ba84ae80b5&displaylang=en
and install (by default, it will be installed under C:\Program Files\Microsoft Enterprise Library January 2006)


2)Download the patch to run EnterPriselibrary in Medium trust :
http://www.codeplex.com/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.bat, then CopyAssemblies.bat (both files are to be found in the same folder)

5)Replace the references in your webproject (Microsoft.Practices......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 requirePermission="false" to the <section name="netTiersService" type="MySan.DataAccessL .... 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.codesmithtools.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
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... ...
17
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...
0
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,...
5
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...
10
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...
3
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...
2
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...
21
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...
0
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.