0

I have stored a file HelloWorld.txt in App_Data.

My application is running locally but not on Server.

File Path is D:\MyProject\App_Data\HelloWorld.txt

How can I access?

Is this is the way?

var file= File.ReadAllText(@"D:\MyProject\App_Data\HelloWorld.txt"); 

(File is on my disk but not on server)

or is there any other way?

I cannot use server.Mappath(); because my file is not on server.

cdeszaq
  • 30,869
  • 25
  • 117
  • 173
Tom Crusie
  • 283
  • 3
  • 5
  • 11

0 Answers0