users uplaoding files

Discussion in 'ASP.NET 2.0' started by mypicancom0, Jan 27, 2007.

  1. am making a project in asp.net (c#) and when a user gets aproved he get a dir witch he can upload files 2.
    but am getting "Access to the path 'data' is denied.'
    where data is the name of the dir
    part of my code:
    Code:
    
    
    SaveLocation = Server.MapPath(Session["username"].ToString()/* "data"*/) + "\\" + fn;
    
    
    photoUpload.PostedFile.SaveAs(SaveLocation);
    
    
    
    where fn is the name of the file (only the name, no path)

    can anybody please help me?

    p.s am new to uploading in asp.net
    <LINK href="home.css.v1.19.css" type=text/css rel=stylesheet>
     
  2. make you the path is valid and you have write permission on the folder? Are you getting getting this exception on Dasp server or locally?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. it' was my fault.

    thanks for responce

    Post Edited (serhan) : 1/30/2007 8:40:01 AM GMT
     

Share This Page