473,378 Members | 1,544 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,378 software developers and data experts.

How do you change the trust level for an APS.NET application?

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 configuration file.

Exception Details: System.Security.SecurityException:
System.Security.Permissions.SecurityPermission

Source Error:
[No relevant source lines]
Source File: default.aspx.cs Line: 136

Stack Trace:
[SecurityException: System.Security.Permissions.SecurityPermission]
AspNetResources.Owc._default.BuildCharts() in default.aspx.cs:136
AspNetResources.Owc._default.Page_Load(Object sender, EventArgs e)
in default.aspx.cs:26
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +4

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64
any ideas of how to change the trust level?

Jan 31 '06 #1
2 1552
trust levels for asp.net is set in the machine.config under <securityPolicy>

-- bruce (sqlwork.com)


"g3000" <ca*************@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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 configuration file.

Exception Details: System.Security.SecurityException:
System.Security.Permissions.SecurityPermission

Source Error:
[No relevant source lines]
Source File: default.aspx.cs Line: 136

Stack Trace:
[SecurityException: System.Security.Permissions.SecurityPermission]
AspNetResources.Owc._default.BuildCharts() in default.aspx.cs:136
AspNetResources.Owc._default.Page_Load(Object sender, EventArgs e)
in default.aspx.cs:26
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6953
System.Web.UI.Page.ProcessRequest(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context)
+18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) +4

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64
any ideas of how to change the trust level?

Jan 31 '06 #2
well this is what I have in machine.config

<location allowOverride="true">
<system.web>
<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>
<!-- level="[Full|High|Medium|Low|Minimal]" -->
<trust level="Full" originUrl=""/>
</system.web>
</location>

Jan 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nedk | last post by:
I did the walkthrough at http://msdn2.microsoft.com/library/879kf95c(en-us,vs.80).aspx on creating a web site with membership and user login in VS 2005 but when I click on the login button I'm...
0
by: Fabrice | last post by:
Hello, One question about security. I try to secure my web application on IIS6 and asp.net 1.1 I have differents questions about the element "trust level" in the config.web to manage...
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...
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...
3
by: Mukesh | last post by:
Hi all I have Created an web application using VS 2005, asp.net2.0, Ajax Extensions 1.0, Ent Lib 3.1 , MS sql Server 2005, ajax Control tool kit Version 1.0.10618.0
5
by: =?Utf-8?B?S1A=?= | last post by:
I have an asp.net application that I've installed on several of my customers laptops (they run a localized IIS). I've been doing this for years without and issue. Today I attempted to install...
2
by: KUTTAN | last post by:
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 ...
4
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
Is it possible for a medium trust web application to read the Membership providers? The following throws a SecurityException: MembershipSection membershipSection =...
4
vikysaran
by: vikysaran | last post by:
Hello, I have my new application on Godaddy.com server. Previously it was giving error on Permission. i asked support about it and they told me to set trust level MEDIUM so I search over the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.