Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 534037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:34:12+00:00 2026-05-13T09:34:12+00:00

I have developed a HTTP resource, that uses the Last-Modified header, and it should

  • 0

I have developed a HTTP resource, that uses the Last-Modified header, and it should reflect any modifications made to the application. I would like to update this field to tell the build date, or the last application update date. Here is some solutions I have thought of:

  1. Use a build script to change a DateTime setting whenever the application is built.

  2. Get the latest modification time of all files in the application folder

What approach seems more interesting? Do you have any suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:34:13+00:00Added an answer on May 13, 2026 at 9:34 am
    1. Is very easy to do. You can write out a simple file (e.g. xml) and add it as an embedded resource so it’s compiled into your app. THis gives you the freedom of it providing any form of information you require.

    2. I’d avoid this. It’s a bit hacky, and prone to problems (e.g. if a log file is written to the folder, then you’ll start reporting today’s date instead of the build date). Better and easier to just read the datestamp from Application.StartupPath (i.e. the main .exe file)

    3. In your AssemblyInfo, specify a version of [assembly: AssemblyVersion("1.23.*")] and the compiler will automatically add the build date and time to the version (it’ll look a bit like: 1.23.4567.12345). You can then read the date/time of compilation out using (pinched from a search hit, but looks about right):

    AssemblyName an = Assembly.GetEntryAssembly().GetName();
    DateTime date = new DateTime(2000, 1, 1, 0, 0, 0);
    date += TimeSpan.FromDays(an.Version.Build) + TimeSpan.FromSeconds(an.Version.Revision * 2);
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have developed a website that uses MVC, C#, and jQuery. In one of
I am looking at globalizing an application that I have developed in asp.net mvc.
I have developed a simple application in GWT. After that, I generate war file
I have developed a set of apis that live on an asp.net mvc application,
I have developed a VB.NET WCF service that recives and sends back data. When
I have a simple app that reads internet resource and displays the information in
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There
I have developed application in Android and designed one splash screen image of size
I have an application that plays a video from the sdcard with MediaPlayer. I
I have been following this tutorial for setting up tabs in your application. http://developer.android.com/resources/tutorials/views/hello-tabwidget.html

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.