Archive for February, 2010

Server.Map Path Failure

This is one of those posts that exists to remind myself of my own stupidity.
So, this is the code I was writing:
string pathToFile =
Server.MapPath(ConfigurationManager.AppSettings.Get(”SmartCardMaker_PathToPdfForm”));
FileStream _stream = new FileStream(pathToFile,FileMode.Open,FileAccess.ReadWrite);
string pathToFile =                    Server.MapPath(ConfigurationManager.AppSettings.Get(”SmartCardMaker_PathToPdfForm”));
FileStream _stream = new FileStream(pathToFile,FileMode.Open,FileAccess.ReadWrite);
Seems pretty straightforward, but for the life of me I couldn’t figure out [...]

February 23, 2010 • Posted in: Culture • No Comments