日期:2014-05-17  浏览次数:20446 次

上传文件读取后,为啥删除不了,求助高手!

                                    file.SaveAs(file_save_path); //save upload photo file
                                    //using (StreamReader sr = new StreamReader((System.IO.Stream)File.OpenRead(file_save_path), Encoding.UTF8, true))
                                    //using (StreamReader sr = new StreamReader((System.IO.Stream)File.OpenRead(file_save_path), GetFileEncodeType(file_save_path), true))
                                    
                                    using (StreamReader sr = new StreamReader(file_save_path, GetFileEncodeType(file_save_path)))
                                    {                                            
                                        file_content = sr.ReadToEnd();
                                        sr.Close();
                                        sr.Dispose();
                                    }