Evil Temporary ASP.NET Files CACHED!!!

Another fine mess. 404's galore cause of bad referencing in static CSS files. Culprit found, fix and redeployed, but 404's persist. DIG DIG DIG

AHAHA!!!! The "Temporary ASP.NET Files" still contains the bugged compiled version. Batchscript? Sure why not....

---------------------------------------------------------------


@ECHO OFF
ECHO DO YOU REALLY WANT TO DO THIS???
:: SAFETY FIRST!!! Comment out below to run, but I suggest a dry run and test
GOTO:EOF

::// Uncomment for dry run with just one server
::CALL:GOBANANA WEB1
::GOTO:EOF
:://----------------------------

CALL:GOBANANA ServerName
::CALL:GOBANANA ServerNameX

GOTO :EOF

:GOBANANA
SET SRVNAME=%1
:: Know thy path to Sysinternals Suite:
:: http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
:: Or just goolge
SET PRGPATH=C:\SysinternalsSuite
ECHO HOST: \\%SRVNAME%
%PRGPATH%\psexec \\%SRVNAME% iisreset /stop
%PRGPATH%\psexec \\%SRVNAME% cmd.exe /c for /d %%i in ("C:\Windows\Microsoft.Net\Framework\v2.0.50727\Temporary ASP.NET Files\*") do RMDIR /S/Q "%%i"
%PRGPATH%\psexec \\%SRVNAME% iisreset /start


ENJOY!!!

Comments :

0 comments to “Evil Temporary ASP.NET Files CACHED!!!”