Sunday, June 15, 2008

touch command for DOS/command line


Following command would simulate UNIX touch command in DOS:
copy /b test.txt +,,
(command was changed following to the comments).

ArgumentOutOfRangeException at HttpCachePolicy.UtcSetLastModified if assembly file with script control has future date relatively to the machine date


It seems that I discovered an annoying bug in the AJAX engine:
if you have a JavaScript file of script control, which is loaded through the WebResource.axd and the DLL module that embeds this JavaScript file has a file creation date, which is in the future relatively to the current machine date – you would get an unhandled ArgumentOutOfRangeException exception, raising from System.Web.HttpApplication.ExecuteStep:


System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate)
System.Web.HttpCachePolicy.SetLastModified(DateTime date)
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


This would cause JavaScript error "Type NNN is undefined or null" in your browser.
The simple resolution for this problem is to "touch" the affected DLL to update it's date to current machine date time:
copy /y nul tt.txt

Tuesday, April 08, 2008

Funny automatic translation (English to Russian):


Original:
ThreadPoolSynchronizer marshals all calls to a custom thread pool, where the calls are first queued up, then multiplexed on the available threads. The size of the pool is provided as a construction parameter. If the pool is maxed out, the call will be pending in the queue until a thread is available. You can also provide a pool name (which will be the prefix of the name of the threads in the pool). Disposing or closing ThreadPoolSynchronizer kills all threads in the pool gracefully...



Translated:
ThreadPoolSynchronizer маршалы все звонит таможенному бассейну нитки, где призывы сначала стоятся в очереди, тогда multiplexed на доступных нитках. Размер бассейна обеспечивается в качестве строительного параметра. Если бассейн maxed, призыв будет находящийся на рассмотрении в очереди прежде чем нитка имеется в распоряжении. Вы можете также обеспечить имя бассейна (который будет префикс имени ниток в бассейне). Размещая или закрытие ThreadPoolSynchronizer убивает все нитки в бассейне грациозно...



Monday, April 07, 2008

Redistributable installation of Microsoft .NET framework 3.0 SP 1


Somehow there are no direct link and installation instructions for the .NET framework 3.0 SP 1 on MS site.
Here is how to get it:
1) Make sure .NET 2.0 SP 1 is installed.
2) Get redistributable install of .NET 3.0 SP 1 from here: http://download.microsoft.com/download/8/F/E/8FEEE89D-9E4F-4BA3-993E-0FFEA8E21E1B/NetFx30SP1_x86.exe
3) You may need to install XPSEPSC before installation of .NET 3.0 SP 1. Get it here: http://download.microsoft.com/download/8/D/4/8D4C4B2F-269B-44E1-80EA-BF59143D7BAC/XPSEPSC-x86-en-US.exe




Tuesday, April 01, 2008

How to install Windows Media Player 11 on Windows Server 2003



1) Download the installation file wmp11-windowsxp-x86-enu.exe and then extract its content to subfolder
2) Change value of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows\CSDVersion from 100 to 200
3) Go to this sub-folder and change compatibility mode of wmfdist11.exe to WindowsXP. Run it.
4) Change compatibility mode compatibility mode of wmfdist11.exe to WindowsXP. Run it.
5) Change compatibility mode compatibility mode of wmdbexport.exe. to WindowsXP. Run it.
6) RESTART!!!
7) Return to the extracted files, change compatibility of wmp11.exe to Windows XP and run it
8) Change value of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows\CSDVersion from 200 back to 100
9) Enjoy