Dorababu Meka

Dorababu Meka

  • 227
  • 8.3k
  • 1.7m

Error While getting the Path of the File

Jun 23 2010 4:18 AM

Hi all i have written a code to get the path of the file


if(objbll.AddAchFileHeader())
            {
                string strFilePath;
                strFilePath = System.Environment.CurrentDirectory;
                objbll.FilePath = strFilePath;
                //file = System.Configuration.ConfigurationSettings.AppSettings.Get("m_path");
                objbll.SaveFileHeader();
                MessageBox.Show("InsertSuccess");

}


Build was success but while running i am getting the error the business layer


using (TextWriter tw = new StreamWriter(m_strFilePah))


Here i am getting the run time error as Access to the path 'D:\Dora\My Works\ACHWinapp1\ACHWinapp1\bin\Debug' is denied.


Can any one help me out please..


Thanks in advance.

Answers (1)