Hey guys I am pulling in a Vehicle Feed to an autodealer website for one of our clients. Every night at midnight(ish) the new XML file is uploaded to our FTP and it overwrites the current one. Currently he has two Identical websites and the file needs to be uploaded to both, I was looking into setting it up so both websites can use the same XML file so we can cut down on the risk of errors and for convince.
Pulling the file works great, both websites can read the XML file and have no issues displaying the inventory. The issue comes in when I try to display the date the file was last updated. I created a small snippet that reads the date the file was updated and displays "Last Update: and the date" but when I try and reference a non-local file I get a error that says "URI formats are not supported". Does anyone know of a way to do this or if its even possible?
what it currently is
FileInfo fileInfo = new FileInfo(Server.MapPath("~/feed/VEHICLES.XML"));
DateTime timeOfCreation = fileInfo.LastWriteTime;
what i tried
FileInfo fileInfo = new FileInfo("http://www.autodealername.com/feed/VEHICLES.XML");
DateTime timeOfCreation = fileInfo.LastWriteTime;
this was no good
FileInfo
uses information from the underlying file system which isn't available over HTTP. You'll need to think of some other way.