Has been trying to get an ASP.NET DLL's modification date/time for the
"release date/time" to be displayed on the page's footer
Using:
System.Reflecti on.Assembly
asm=System.Refl ection.Assembly .GetExecutingAs sembly();
appVer = asm.GetName().V ersion.ToString ();
// get the location of our executing assembly
System.IO.FileI nfo inf = new System.IO.FileI nfo(asm.Locatio n);
DateTime dt = inf.LastWriteTi me;
appDate = dt.ToString("d MMM yyyy")
log.Info ("asm.Location= " + asm.Location);
However, the debug log indicate that it is reading the last write time from
c:\winnt\micros oft.net\framewo rk\v1.1.4322\te mporary asp.net
files\MyProd\0b b3e1a5\e740ffe2 \assembly\dl2\a 5a61754\024e623 d_c70bc601\MyCo mpany.MyDept.My Prod.dll and not c\inetpub\wwwro ot\MyProd\bin\M yProd.dll
How can I update my code to read the last modification date/time of where
the DLL was deployed?
Note the
1) Problem happens both on IIS5.1 / Win XP Pro SP2 and IIS6 / Windows 2003
server
2) .Net framework 1.1
3) Impersonation is used, impersonating the logged on user (no admin
priviledges)
"release date/time" to be displayed on the page's footer
Using:
System.Reflecti on.Assembly
asm=System.Refl ection.Assembly .GetExecutingAs sembly();
appVer = asm.GetName().V ersion.ToString ();
// get the location of our executing assembly
System.IO.FileI nfo inf = new System.IO.FileI nfo(asm.Locatio n);
DateTime dt = inf.LastWriteTi me;
appDate = dt.ToString("d MMM yyyy")
log.Info ("asm.Location= " + asm.Location);
However, the debug log indicate that it is reading the last write time from
c:\winnt\micros oft.net\framewo rk\v1.1.4322\te mporary asp.net
files\MyProd\0b b3e1a5\e740ffe2 \assembly\dl2\a 5a61754\024e623 d_c70bc601\MyCo mpany.MyDept.My Prod.dll and not c\inetpub\wwwro ot\MyProd\bin\M yProd.dll
How can I update my code to read the last modification date/time of where
the DLL was deployed?
Note the
1) Problem happens both on IIS5.1 / Win XP Pro SP2 and IIS6 / Windows 2003
server
2) .Net framework 1.1
3) Impersonation is used, impersonating the logged on user (no admin
priviledges)
Comment