Blog: 2016 May

How to programmatically retrieve the deployment time of an ASP.NET web site

May 26, 2016, Software Development

In one of my web projects, I wanted to append the web site deployment time to the JavaScript URLs. This way the browser uses the cached file version until a new web site version is deployed. To do so, I looked for a way to read the deployment time of the currently running ASP.NET web site. It’s actually very simple, just read the modified date of the applications Web.config: var deploymentTime = File.GetLastWriteTime(Server.MapPath("~/Web.config")) Do you known a better way to do this? Read more...

Tags:


  Page 1 of 1