Tuesday, January 09, 2007

Writing to eventLog from ASP

Thought of blogging bits of code I use daily at work..so that I[..hmm ofcourse you too] can refer them in future...

Today I had to write some events from ASP page in to eventlog..after refering some articles..we came up with 3 methods..

1. Log using COM component
2. Using Windows script Host
3. WMI

I tried the first 2. For COM component create a VB activeX dll and code the following.

Function LogEvent(Dim strError As string, Dim EventType as integer) AS Boolean
App.LogEvent strError, EventType
End Function

Then from ASP use server.CreateObject and call this component to log. As simple as that.

For second method just use server.CreateObject("Wscript.shell") from ASP and call LogEvent method of that instance.

Thats it!

Tuesday, September 05, 2006

My new Sony ericsson M600i

....uhhgh...I always hated cellphones for some or the other reasons. But due to my nature of living and frequent travels, atlast I thought I am definitely in need of a cellphone. So I went ahead and bought this Sony ericsson M600i black from Amazon. also i bought prepaid service from T-mobile. So far so good. No reception problems with tmobile.

I fell in love with this thingy at my first sight. What a slim and sleek smartphone? But after a week of use, i realize some of the problems which i thought to share.

First thing I noticed is that enabling speakerphone can be done only after you make the call. What a stupid decision from firmware designers? hope they fix it in near future.

Next, I was not able to copy files more than 3 mb from my pc to the phone. Then I called up the Service center and they suggested me to try it on different computer. Oh my goodness, It started working. So this may be a problem with PC Suite software installation? I dont know...as my previous istallation went smooth without any errors.

The most important thing which made me regret is that this phone comes with usb 1.1 instead of usb 2.0 . I know it is usb 2.0 compatible as seen in specs, but the speed of data transfer they mentioned is 12 mbps which equals usb 1.1 spec. Copying of music files are terrible when compared to my Ipod which is usb 2.0.

Despite of these couple of problems, this phone has become my favourite. The dual key pad is very intuitive. The touch screen is very beautiful. The mp4 and 3gp video files looks amzingly superb on this screen. I definetly recommend this phone to anyone who need smart phone and multimedia functionality in a sleek pack.

Thursday, July 13, 2006

Creating a complete personal website with Blog, Guestbook and Gallery in Google page creator (GPC)

Just today I finished my personal website on GPC.
I thought, I should share my experience so that somebody wishing to create their own personal website shouldn't be wondering how to?, again for the same things which i was wondering once.


I always wanted to host my personal site someday and i was looking in to so many free hosting solutions, none of which was satisfactory in some way or the other. AtLast came google with their free hosting service.

Oh I was one of those most happy fellows out there. Free hosting for 100 megs of data that too Ad free. Great!

Oh no... my happiness lasted not so long...GPC only supports client side scripting and not server side. no FTP too. catch.

So I need to look in to how to add my guest book, gallery and blog...

First, I started with blog...searching..searching..gotcha. Blogger supports templates. I can make my site template and replace it instead of the one provided by blogger. Cool.

Done. But, one thing was annoying..the top navigation bar from blogger. Blogger does not provide you the option to remove it if you are using their blogspot hosting. So I have to add the following script to make it go.

#b-navbar {
height:0px;
visibility:hidden;
display:none
}


I got this script googling. Thank you whomsoever posted that script.

Ok so i got my blog, wat next? Guest book.

Initially i thought of using blogger's own comenting system but some how it was not configurable to achieve a guest book kinda look.
So i was looking for some other commenting system and tried Haloscan and Yaccs.

Haloscan was good but they had their Ads in between.
Finally i settled for Yaccs.
Perfect. No ads and provide user templating system, so that we can add our look and feel. But one catch.

They restrict the no of letters for template code to 3500. Thats kinda trick to get our code to match. But still nice commenting system.

Good. atlast only gallery is left to be done.

It dont need server side scripting to get a photo gallery working. WOW. So i can host my gllery in GPC itself instead of third party.

First i was looking for some ajax gallery and finally settled for this flash one. This one is from XMLPhotoalbum. I tweaked the gallery source code to adapt to my taste.
Used picassa to export the pictures and use it with XMLPhotoalbum.

and there's my complete site with a blog, guest book and a gallery. Looking cool uh?

Friday, July 07, 2006

My home on earth!

Here is my home from wikimapia. Looks cool uh?
Blog powered by Blogger
© Suresh Narayanan
All rights reserved.