So How Do You Set The Last-Modified Header?

Posted by: AspNetResources.com articles, news and updates, on 27 Dec 2007 | View original | Bookmarked: 0 time(s)

What happens you want to set the Last-Modified HTTP header and all you have is a UTC date? Most likely you’ll get an exception. The culprit here is the sloppily designed interface of HttpCachePolicy. It so happens that you should pass to the SetLastModified a non-UTC date because here’s what happens inside the method: public void SetLastModified (DateTime date) { DateTime utcDate = DateTimeUtil.ConvertToUniversalTime(date); this.UtcSetLastModified(utcDate); } What if I only have...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: .NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 996 | Hits: 69

Similar Posts

  • $.fadeTo/fadeOut() operations on Table Rows in IE fail more
  • Oredev Wrap-Up more
  • MSDN Guidance on ASP.NET MVC vs WebForms and its Impact on my EF + ASP.NET Work more
  • Designer v Xaml v Code more
  • Introducing Recurring Appointments for Web.UI Scheduler ASP.NET AJAX more
  • Linking Zune media items with LinQ, Part 1 (Matt Gertz) more
  • Comparing Event Stream Processing and Rete more
  • New Entity Framework Feature CTP for VS2010 Beta 2 more
  • Data-binding Telerik CoverFlow for Silverlight + some Routed Commands goodness more
  • November's Toolbox Column Now Online more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD