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

Assembly does not allow partially trusted callers

I developed on a Win2K3 Server with VS 2005

Published a web app to my local drive.

Copied that folder to a Win2K3 Server. Configured a new virtual
directory
Moved the files there.
Modified the config file so debug=false

Then tried to run it. There are basically two pages in the app. The
first page works fine.
The second page did not work it gave me the below error.
The second page was supposed to show a scatter chart based on
parameters chosen on the first page. The image for the chart is usually
written to the folder of the asp app tree.

Server Error in '/ProjectReports' Application.
--------------------------------------------------------------------------------

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: That assembly
does not allow partially trusted callers.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted
callers.]
_Default.Page_Load(Object sender, EventArgs e) +0
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object
o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object
sender, EventArgs e) +34
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


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Jan 18 '06 #1
4 2197
Have you set appropriate permisison on the folder where image files are
being written?

"g3000" <ca*************@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I developed on a Win2K3 Server with VS 2005

Published a web app to my local drive.

Copied that folder to a Win2K3 Server. Configured a new virtual
directory
Moved the files there.
Modified the config file so debug=false

Then tried to run it. There are basically two pages in the app. The
first page works fine.
The second page did not work it gave me the below error.
The second page was supposed to show a scatter chart based on
parameters chosen on the first page. The image for the chart is usually
written to the folder of the asp app tree.

Server Error in '/ProjectReports' Application.
--------------------------------------------------------------------------------

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: That assembly
does not allow partially trusted callers.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted
callers.]
_Default.Page_Load(Object sender, EventArgs e) +0
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object
o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object
sender, EventArgs e) +34
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


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Jan 18 '06 #2
read the documentation on managed/unmanged and trusted/untrusted .net code.

basically your page is calling an untrusted code (usually unmanaged code
like a com object) and asp.net on the server is configured to not allow that
(common on a shared server).

-- bruce (sqlwork.com)

"g3000" <ca*************@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I developed on a Win2K3 Server with VS 2005

Published a web app to my local drive.

Copied that folder to a Win2K3 Server. Configured a new virtual
directory
Moved the files there.
Modified the config file so debug=false

Then tried to run it. There are basically two pages in the app. The
first page works fine.
The second page did not work it gave me the below error.
The second page was supposed to show a scatter chart based on
parameters chosen on the first page. The image for the chart is usually
written to the folder of the asp app tree.

Server Error in '/ProjectReports' Application.
--------------------------------------------------------------------------------

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: That assembly
does not allow partially trusted callers.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: That assembly does not allow partially trusted
callers.]
_Default.Page_Load(Object sender, EventArgs e) +0
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object
o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object
sender, EventArgs e) +34
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


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42

Jan 18 '06 #3
Bruce I think you are right.

I didnt have the Fwk 2.0 Configuration console on the machine to add a
dll that is used in my web app to the GAC.

So I am currently downloading the SDK for 2.0 and hopefully that has
the management console included in it.

I thought just loading the 2.0 framework should have the management
console.

thanks everyone for your response.

Jan 18 '06 #4
On Wed, 18 Jan 2006 13:22:15 -0800, "Bruce Barker"
<br******************@safeco.com> wrote:
read the documentation on managed/unmanged and trusted/untrusted .net code.

basically your page is calling an untrusted code (usually unmanaged code
like a com object) and asp.net on the server is configured to not allow that
(common on a shared server).


It's the other way around.

An assembly in the GAC is a trusted assembly - the GAC grants Full
Trust by default.

The web app must be running at partial trust, i.e. somewhere in a
configuration file at the web site or machine level there is a <trust
level="Medium"/> element, or another level, but not FullTrust.

..NET will not let your partially trusted code call into the GAC'ed
assembly unless the assembly specifically instructs the runtime to
allow the call with the 'allow partially trusted callers' attribute.

I'd recommend removing the assembly from the GAC. Applying the APTC
attribute is a big responsibility.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Jan 19 '06 #5

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

Similar topics

2
by: Vandana T | last post by:
I created a console application to read and manipulate an Excel file. I added reference to the Microsoft Excel 11.0 Object Library. When I place it in Network Drive and try to run the .exe from my...
1
by: Matt Culbreth | last post by:
Hello All, I've got a very simple ASP.NET 2.0 application which uses a DLL from a third party. I don't have the source to this DLL. Everything has been working fine on my XP development...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
From the amount of articles about this one I’m sure this gets asked a lot, but I haven’t yet found a succinct article which explains what is required in its entirety. I work using Visual...
0
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
I have created Exception Handling Policy that shows a custom error message using Custom Handler and logs it to event log using Logging Handler. I am using this policy in various layers of my...
1
by: John G | last post by:
I have created an ActiveX control that does word automation. Once I creat an instance of work I get the following message System.Security.SecurityException: That assembly does not allow partially...
1
by: nish85 | last post by:
Hi, i have uploaded my sit to web server goddady.com i have a button to download dyanmically generated excel file.This button is ajax enabled.....When i am click on this button it will popup a...
3
by: Joris van Lier | last post by:
I'm running an ASP.NET 2.0 web application in a Medium Trust environment, the application uses ODBC to connecto to MySQL and the hosting company has granted OdbcPermission, the solution includes a...
0
by: John G | last post by:
I tried creating a app with Silverlight. The app works great when I run it in vs.net 2008. But when I publish the app I get the following error: Assembly does not allow partially trusted callers ...
0
ssnaik84
by: ssnaik84 | last post by:
Hello, I've recently added Quartz.net for scheduling of jobs in my website. It's working fine on my localhost. But, giving me problem on hosting server. Inner Ex:...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?

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.