Re: System.Security.SecurityException: Exception from HRESULT: 0x800A0046

From: Nicole Calinoiu (calinoiu)
Date: 01/29/05

Date: Sat, 29 Jan 2005 08:17:40 -0500


The SecurityException you're seeing will occur when using FSO if the user
has insufficient permissions or if the file is locked in some way (in use by
another process, flagged as read-only, etc.). It sounds like you've managed
to confirm that it's a permissions issue, in which case the file permissions
must be changed.

In most shared hosting situations, your account would not have permissions
to alter the ACLs (access control lists) on the files so, unless you have
information to the contrary from your provider, it's very likely that
there's nothing you can do to directly alter the permissions settings.
Instead, you will probably need to request that your hosting provider do
this for you. This will be easier for the provider staff if the files are
all located in a single directory, and it will be safer for you if the
deletable files are the only files in the directory (since your users would
become theoretically capable of deleting any file in the directory).


"Crissy" <> wrote in message
> Please forgive my ignorance. I am new to all of this and volunteered to be
> the webmaster of a site because nobody else would step up.
> When trying to delete or upload pictures, users are getting this error:
> Server Error in '/jeep' 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: Exception from
> 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: Exception from HRESULT: 0x800A0046
> Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
> o, Type objType, String name, Object[] args, String[] paramnames,
> Boolean[] CopyBack, Boolean IgnoreReturn) +794
> Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
> Type objType, String name, Object[] args, String[] paramnames, Boolean[]
> CopyBack) +23
> jeep.FileManager.GoFile.FMDeleteFile(String myFile) in C:\Documents and
> Settings\Bluesky\VSWebCache\\jeep\Common\FileManagement.vb:28
> jeep.ManageImages.View(Object s, DataGridCommandEventArgs e) in
> C:\Documents and
> Settings\Bluesky\VSWebCache\\jeep\Member\ManageImages.aspx.vb:110
> System.Web.UI.WebControls.DataGrid.OnItemCommand(DataGridCommandEventArgs
> e) +110
> System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source,
> EventArgs e) +68
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +26
> System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source,
> EventArgs e) +100
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
> +26
> System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +120
> System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument) +115
> System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument) +18
> System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
> System.Web.UI.Page.ProcessRequestMain() +2112
> System.Web.UI.Page.ProcessRequest() +218
> System.Web.UI.Page.ProcessRequest(HttpContext context) +18
> System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
> +179
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +87
> Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
> ASP.NET Version:1.1.4322.2032
> The only experience I have with web design, I used Putty or FTP to access
> the server. The only option I have now is FTP or through our ISP's site.
> On the FTP site, the permissions aren't correct, for whatever reason. It
> shows ALL the files as having RWX for all groups, which is wrong. Somebody
> tried giving me instructions on fixing this but their directions included
> things that I have no way of doing through FTP or the ISP's site. Please
> help me! Since I'm new to this, I require baby step instructions :) THANKS
> Posted via DevelopmentNow Groups