Thursday, April 24, 2008

Recycling Application Pool using NAnt Script

I tried out several different syntax to run a .vbs script ( C:\windows\system32\iisapp.vbs ) to recycle Application Pool. The arg way didn't work. Things that work directly work on Windows command line doesn't necessary work with NAnt script directly. Eventually I resolved it by using this:


<target name="ResetAppPoolForSNAPP25">
<exec program="${vbscript.executable}"
commandline = "C:\windows\system32\iisapp.vbs /a AppPoolForSNAPP25 /r"

/>
</target>

Recycle Application Pool on IIS 6.0 (under Windows Server 2003)

For IIS 7.0, you can recycle application pool using AppCmd. On IIS 6.0, though, there's no command ine command to do that. Still, you can call the script IISAPP.vbs that comes with IIS to do that magic. The syntax is like this:

IISApp /a TheApplicationPoolName /r

Monday, April 21, 2008

Why Does Advanced Disk Catalog so .....

I just found out that the product I use, called Advance Disc Catalog 1.5.1 , is not longer supported. That is just great, since this is the only disc cataloging software I use, and it works fine with me so far. Plus, I was hoping that can improve the export feature, because most of them pretty suck.
  • .csv: This one does not work because I have tons of records, and Excel has limitation on number of rows imported. Plus, it enclose the string in quote.
  • .dbf: This one failed because it created messed up data. Some string overrun into other fields. Basically it's a mess.
  • .xml: I couldn't can app that can directly convert it into an Access database. Sure I can write my own code but .... I am lazy.
  • .sql: it's basically a collection of SQL statements, but I tried execute it using SQLServer Management Studio. It didn't work well because of the double quote thing.
So my last and probably best solution is by writing a C# application, read XML file and then insert the data into a blank access database.

Friday, April 18, 2008

Stupid Mistake

I was stuck figuring out why the ultra simple WCF web service that I created was not working .... until later which I realized that I forgot to set the ASP.Net version of the web application on IIS from 1.1 to 2.0. Once I switched, everything was working Great. Duhhhh ....

Test Driven in .Net

Yesterday I was trying to use TestDriven.Net to run Unit Test on my Visual Studio 2008 project. I got the message saying "0 Passed 0 ....". Basically, all zero.

It happened so many times, and since I keep forgetting, I better write it down now.

I happened mainly because something didn't set right. In my case yesterday, it was because I stuff in something that upset the web.config file. It's strange that it didn't prompt error message, but if you pay attention to the message below you will see that there's something mentioned in warning section.