Cannot create folders or files

Discussion in 'ASP.NET / ASP.NET Core' started by myreadernet, Dec 11, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I cannot open my website for business until the following problem is resolved:

    Anonomous has Read/Write to the folder and all subfolders and files, yet no sub-folders or files can be created.

    namely:
    Could not find a part of the path: c:\windows\system32\inetsrv\ where the website's root: "c:\windows\system32\inetsrv\" is picked up in dotnet on application_start at DiscountAsp.

    Support says it is an application error so post to this ng.

    The code that works here, getting the correct folder, does notget the correct folderat DiscountAsp.

    Any help resolving this is greatly appreciated.

    Sincerely,

    John Bickmore
    www.MyReader.net
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Based on this error, your application is trying to write to c:\windows\system32\inetsrv\which is the IIS system directory and customer do not have write access to this directory.

    You need to look in your application and change the path to somewhere within your website.

    The best way to do that is to use server.mappath function. eg.

    server.mappath("/") should return the site root's physical path.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thank you,

    I was doing a


    Server.MapPath(clsStaticVARS.StartWithPageName)


    where clsStaticVARS.StartWithPageNameis a static string that = "Default.aspx"
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page