Server Error in '/' Application.

Access to the path 'D:\FTP Root\Developer\Websites\www.anthonyscigars.com\temp.txt' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\FTP Root\Developer\Websites\www.anthonyscigars.com\temp.txt' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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:


[UnauthorizedAccessException: Access to the path 'D:\FTP Root\Developer\Websites\www.anthonyscigars.com\temp.txt' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +13055705
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +776
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +66
   System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) +73
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) +73
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +24
   System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding) +54
   System.IO.File.AppendAllText(String path, String contents) +41
   GlobalFunctions.xOlwoWbCJU0l0fvUByJ(Object , Object ) +52
   GlobalFunctions.WriteEmail(String Content, Exception ex) +146
   DBLayer.DBConnection.VbW5krMonLxRTFHtfLe(Object , Object ) +53
   DBLayer.DBConnection.ExeSelectQuery(String Query, String Limit) +849
   DBLayer.AutoFetch.NeAgwLsQUNHjLfrkWrg(Object , Object , Object ) +62
   DBLayer.AutoFetch.GetSingleFieldValue(String FieldName, String TableName, String Condition, String OrderBy) +1073
   CodeBehind_Functions.Advance_Search_Result_Conditions(FormView FilterForm, Literal lblReturnMessage) +4955

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +2026
   System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) +30
   Controls_AutoInterface.vNu5go8TN(String  , String  ) +4971
   Controls_AutoInterface.cc4Ck46W7(String  ) +210
   Controls_AutoInterface.AutoInterface_GridView_ODS_Selecting(Object sender, ObjectDataSourceSelectingEventArgs e) +345
   System.Web.UI.WebControls.ObjectDataSourceView.OnSelecting(ObjectDataSourceSelectingEventArgs e) +101
   System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +978
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +22
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
   System.Web.UI.WebControls.ListView.PerformSelect() +101
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
   Controls_AutoInterface.pf99bqIHay4gvSe7Gl4(Object ) +46
   Controls_AutoInterface.SWVSUr42e() +2586
   Controls_AutoInterface.Page_Load(Object sender, EventArgs e) +201
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4063.0