Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: Question about importing product from excel

  1. #1
    Fean0r is offline Senior Member
    Join Date
    Nov 2009
    Posts
    145

    Default Question about importing product from excel

    I have what seems to be a permissions error;

    Access to the path '\\fs2-n02\stor2wc2dfw1\434648\xxxx\web\content\images\09 385ab1-028a-4ade-b1fe-8a9727fad4ef.xls' is denied.
    Line 97: string xml = String.Empty;
    Line 98:
    Line 99: PostedFile.SaveAs(FullFilePath);
    Line 100: StreamReader sr = new StreamReader(FullFilePath);
    Line 101: string filecontent = sr.ReadToEnd();
    [UnauthorizedAccessException: Access to the path '\\fs2-n02\stor2wc2dfw1\434648\xxx\web\content\images\093 85ab1-028a-4ade-b1fe-8a9727fad4ef.xls' is denied.]
    System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7716623
    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) +1162
    System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +61
    System.IO.FileStream..ctor(String path, FileMode mode) +55
    System.Web.HttpPostedFile.SaveAs(String filename) +99
    AspDotNetStorefrontAdmin.importProductPricing.btnU pload_Click(Object sender, EventArgs e) in \\fs2-n02\stor2wc2dfw1\434648\xxx\web\content\pr1v4te\im portProductPricing.aspx.cs:99
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
    System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +110
    System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
    Has anyone got any idea what I need to change?

    Thanks

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    This a permission issue. You'll need to give the ASP.Net Process Account or Network Service a read and write permission to the {root}/images folder.

  3. #3
    Fean0r is offline Senior Member
    Join Date
    Nov 2009
    Posts
    145

    Default

    Thanks, my host told me to set CHMOD 777 but the file has a new error:

    ERROR: File Uploaded Error:
    Exception=Access to the path '\\fs2-n02\stor2wc2dfw1\434648\xxx\web\content\images\Imp ort_127200942136AM.xls' is denied.
    I can see it's still a permissions issue... do I need them to do something else?

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Make sure you've got read/write/modify access, not just read/write.

  5. #5
    Fean0r is offline Senior Member
    Join Date
    Nov 2009
    Posts
    145

    Default

    Will do thanks