For a web app in asp.net, I have to open a file located in my "app_data" directory. Locally, it works fine.
But when published on the server, I have an error that say : "The system cannot find the file specified"
Here is my code :
StreamReader reader = new streamReader(Server.MapPath("~/App_Data/pubkey.pem"));
Of course, the file exists on the server.
What am I doing wrong ?
Thanks ;)
EDIT : Since the error was not where I think she was, my problem is solved. I have marked mike's response as valid because it helped me a lot to find out I was wrong :)