Re: Assembly does not allow partially trusted callers



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" <carlton_gregory@xxxxxxxxx> wrote in message
news:1137613327.040737.247040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>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.Callback(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(HttpContext context)
> +18
> System.Web.UI.Page.ProcessRequest(HttpContext context) +49
> ASP.default_aspx.ProcessRequest(HttpContext context) +4
>
> System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
> +154
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +64
>
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
> ASP.NET Version:2.0.50727.42
>


.



Relevant Pages

  • RemotingException.
    ... makes a call to a remoting server to get information on what the page should ... customErrors in the server's .config file. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.dotnet.framework.remoting)
  • Remoting: Serialization.SerializationException thrown
    ... I get the following exception thrown when I try to run my code: ... Here's a copy of my server side config file: ... And here's a copy of the client's config file: ... reference of the client to the server object in order to later on be able to ...
    (microsoft.public.dotnet.languages.csharp)
  • .Net Remoting impass. Please help!
    ... I get the following exception thrown when I try to run my code: ... Here's a copy of my server side config file: ... And here's a copy of the client's config file: ... reference of the client to the server object in order to later on be able to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .Net Remoting impass. Please help!
    ... > "An unhandled exception of type> 'System.Runtime.Serialization.SerializationException' occurred in> mscorlib.dll ... > And here's a copy of the client's config file:> ... Only thing is that I'm passing a> reference of the client to the server object in order to later on be able> to ... the application is running both> the server and the client on the same machine for now so it shouldn't have> anything to do with the network. ...
    (microsoft.public.dotnet.languages.csharp)
  • Enterprise lobrary 2.0 Please help
    ... In my project we are using webservices to fetch data from the SQl server. ... For logging exceptions we are using Enterprise library 2.0. ... exception in the UI code but if the exception occurs in the webservice it ... includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) ...
    (microsoft.public.dotnet.framework.aspnet)

Loading