TempDirectory is driving me crazy.

Last post 01-06-2010, 3:05 PM by paparush. 3 replies.
Sort Posts: Previous Next
  •  12-30-2009, 1:38 PM 57994

    TempDirectory is driving me crazy.

    Physical address to the folder:
    c:\inetpub\wwwroot\dmportal\PI\tmp
     
    Web.config setting:
     <add key="CuteWebUI.AjaxUploader.TempDirectory" value="~/tmp" />
     
    Error from webserver:
     System.ArgumentException: Unable to write to folder:~/tmp.
     
    IIS is running on Windows Server 2003 and I've granted FULL permissions to the NETWORK SERVICES account.
     
    What am I doing wrong?
     
    Thanks.
  •  12-30-2009, 6:03 PM 57999 in reply to 57994

    Re: TempDirectory is driving me crazy.

    Hi,
     
    Are you using IIS 5 ? or 6 ?
     
    Maybe you need set the permossion for account ASPNET
     
    Regards,
    Terry
     
  •  12-30-2009, 9:03 PM 58002 in reply to 57994

    Re: TempDirectory is driving me crazy.

    I finally got this to work by expressing the full path in the web.config file like this:
     
    <add key="CuteWebUI.AjaxUploader.TempDirectory" value="c:\inetpub\wwwroot\dmportal\PI\tmp" />
  •  01-06-2010, 3:05 PM 58067 in reply to 57994

    DOH!

    UGH!
     
    Remembering that this application actually runs from the /bin directory (DOH!!), THIS works as expected:
     
    <add key="CuteWebUI.AjaxUploader.TempDirectory" value="~/PI/tmp" />
     
    My bad. 
View as RSS news feed in XML