Thursday, July 29, 2010

Remove Items in a Select Box, IE compliant

function showAllDates() {

var findSel = new Object();
findSel = document.getElementById("idHAllDates")

if (findSel) {
if (findSel.value != 1){
else {
// default

function RemoveDates(){
var nowDate = new Date();
var nowDate2 = new Date(nowDate.getYear(), nowDate.getMonth(), nowDate.getDate());
var findSel = document.getElementById("idSelPEDate");
var tempString = "";

if (findSel)

// This does not work in IE
// for (var i = 1; i < findSel.options.length; i++) {

// leave the first option empty
for (var i = findSel.options.length - 1; i >=1; i--) {

// yy/mm/dd : input is in the form of mm/dd/yy
tempString = findSel.options[i].value;
tempString = tempString.substring(0, 2) + "/"
+ tempString.substring(3, 5) + "/"
+ "20" + tempString.substring(6, 8);

var compDate = new Date(tempString);
// alert(nowDate2 + " " + compDate + " " + tempString + " " + findSel.options[i].value);

if (compDate > nowDate2){
alert("bigger: " + compDate);

Thursday, July 15, 2010

ctrl home opens find and replace

[tools] [options] [general] - turn off the "Navigation for Word Perfect users" checkbox

Wednesday, July 14, 2010

Explorer.exe Customization

Target: %SystemRoot%\explorer.exe /n, /e, /select, D:\Temp\Joe\Code\


Tuesday, July 13, 2010

Space of All Tables In DB

EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"

ASP and .Net BE DLLs Interop

Check out, optionally version #.

If changing #, change # for namespace, assembly and default namespace.


Copy to [server] C:\Web_DSS_Files\DLLs>

Put in GAC
C:\Web_DSS_Files\DLLs>gacutil /if PMMaccr09.dll

Register for COM Interop
C:\Web_DSS_Files\DLLs>regasm PMMaccr09.dll /tlb:PMMaccr09.dll


Thursday, July 8, 2010

Debugging Classic ASP With Visual Studio 2008 SP1 and 3.5 Framework

Thursday, April 30, 2009 06:22 | posted by: kevin

As much as I’d like never to debug complicated classic ASP code again, the fact is it’s everywhere in the enterprise today. Here is one way that I have found to speed up the process of supporting classic ASP w/ VS 2008 SP1/3.5.

At the last User Group meeting, I presented the features in the VS08 SP1 and 3.5 Framework. One topic/feature was only lightly covered in the documentation, but really jumped out at me, was that with Visual Studio 2008 SP 1 and 3.5 Framework VS 2008 can debug classic ASP code (script). I tried to find more information online, but the details were hard to find.So after a bit of research and trial and error I am sharing what I learned with you!

Here’s How:

1. Allow Server Side Debugging inside IIS Manager for the web site.

IIS Manager Settings

2. Open the Web Site in VS 2008 IDE by File - Open - Web Site and browsing to the directory that the IIS’s web is pointed to.

Open Web Site

3. Accept FrameworkUpgrade Warning (if prompted).

Framework Upgrade Warning

4. Configure Web Site Startup Properties to open correct website through IIS url (http://localhost/…)

Web Site Properties

5. Run Web Site in Debug Mode (F5) and accept Web.Config warning.

Allow .NET Debugging

6. In VS 2008 IDE Debug Menu select Attach To Process and choose the dllhost.exe process

Attach to dllhost.exe process

7. Begin Debugging By Setting Breakpoints in the IDE.

Visual Studio 2008 Debugging

That’s is !!! Ok so what changes were made to the original process?

When you exit the it VS 08 will prompt you to save a solution file.

And… A web.config for the .NET Debugger will be created in the root of the web. You should remove it when you deploy to production.

IIS Log and Last Stop - Restart


IIS - Site properties - Web Site - Log Properties
C:\WINDOWS\system32\LogFiles nad then the specific site file name w3svcxyz\abc.log

Last Stop - Restart

Event Viewer - System - Filter for IISCTLS

Last Time Server Was Rebooted

net statistics server

Wednesday, July 7, 2010

Command Line Process and IIS Tips

Recycle Ap Pool and others ...

Tip/Trick: List Running ASP.NET Worker Processes and Kill/Restart them from the command-line [a better way]
by Sander Gerz July 02, 2006 19:37

Scott Guthrie posts a trick on a quick way to kill a process on your system, or kill and restart an ASP.NET or IIS worker process. I tried to post a comment on his trick, but the commenting system is not working. So I'll give my opinion here, leaving me with a bit more room to elaborate.

Scott's suggesting that you use taskkill to kill a process running the application pool. That's all nice and neat, but how do you know what process to kill? If you have multiple application pools, you might just kill the wrong one. A much better solution is to use the little known iisapp command. In fact, iisapp is a vb-script located in %winnt%\system32. Run it from the command prompt without parameters, and you get a list of application pools with their associated process ids.

W3WP.exe PID: 3328 AppPoolId: DefaultAppPool
W3WP.exe PID: 232 AppPoolId: AppPool ASPNET2.0

The command IIsApp /a DefaultAppPool /r will recycle the specified application pool. Not only is this a lot easier, it's less error prone, thus safer to use. What if you kill the wrong process? I.e. by mistyping or by the fact that after you listed your processes, the application pool has recycled already.

There are a few other commands that few are aware of. E.g.

issweb /query

This will give you a list of configured websites, their status, port number and hostheader. You can also use iisweb to create, pause, stop, start and delete websites. iisvdir will do something similar for virtual folders.

With iisback you can backup and restore the IIS configuration. In fact, if you do a listing of .vbs-files from within %winnt%\system32 you may find some other hidden gems.

Hope this helps... too.


Find Process Locking DLL

tasklist /m thelocked.dll

Thursday, July 1, 2010

Register DLL's - Old School

C:\WINNT\system32>regsvr32 dss270_new.dll