private string ReadPath() ... { string str = ""; string[] tmp; string path = ""; string CurrentPath = Server.MapPath("."); StreamReader sr=null; try ...{ sr = new StreamReader(CurrentPath + "/config.txt", System.Text.Encoding.Default); while ((str = sr.ReadLine()) != null) ...{ tmp = str.Split('/'); path = tmp[0].ToString(); } sr.Close(); } catch (Exception) ...{ sr.Close(); return path; } finally ...{ sr.Close(); } return path; }