Wednesday, September 3, 2008

How to remove Bonjour Service


Dont you hate it when are installing some software and later on you find out that it installed something else too without even asking. Way to go Adobe .. grrrrrrrrrr...



Recently I installed Adobe CS3 and a few days later while looking at my service panel, i see a strnage service named "##Id_String2.6844F930_1628_4223_B5CC_5BB94B879762##". Wondering what it is, I looked at its properties and see that it is Bonjour service given a cryptic name. Googling it told me that CS3 uses it for the CUE server. Its objective is to provide zero-configuration connectivity between Version Cue server and the suite’s other applications.



One, I did not like the cryptic name, and two, I did not even install Cue server and why the hell did the installer install this unnecessary service into my ststem. You may also find this service installed on your computer if you have installed Safari or iTunes. Anyways, I find it a totally useless service, so here is how to rename/ remove it.



If you are using Version Cue, you can correct the service name just by running two commands in a command window (Start -> Run -> cmd):



    "%PROGRAMFILES%\Bonjour\mDNSResponder.exe" -remove
    "%PROGRAMFILES%\Bonjour\mDNSResponder.exe" -install



If your program file folder path is different, please update the path accordingly. The commands are to be run with the quotes as there is space in the path to the file. If you do not have space in the path to Bonjour directory, you can omit the quotes in the command. If you are running Windows Vista, ensure that the command window is opened as Adminsitrator, else these command will not work at all.  



Now you will have correct name for the service in the services panel.



In case you do not have Cue server installed like me and wish to remove this service from your system, here is how to do that.



First stop the service if it is running. Now open the command window (Start -> Run -> cmd) and run this command:



"%PROGRAMFILES%\Bonjour\mDNSResponder.exe" -remove



Restart your computer and if everything seems to be working fine browse to the "%PROGRAMFILES%\" and delete the "Bonjour" folder. You are advised to delete the Bonjor folder after restart as if there are any problems becuase of removing this service you can re-install it. And just in case you have deleted it and for some reason you want to reinstall it, you can download it from http://www.apple.com/support/downloads/bonjourforwindows.html and install it again. Personally I have never felt the need to.



 

Tomcat does not start as service


You have installed JDK latest version, and now you installed Tomcat, configfured to run as service but when you try and start it, it fails. Looking into the logs you see an error like his :



[2008-08-06 22:24:50] [info] Procrun (2.0.4.0) started
[2008-08-06 22:24:50] [info] Running Service...
[2008-08-06 22:24:50] [info] Starting service...
[2008-08-06 22:24:50] [174  javajni.c] [error] The specified module could not be found.
[2008-08-06 22:24:50] [994  prunsrv.c] [error] Failed creating java %JAVA_HOME%\jre1.6\bin\client\jvm.dll
[2008-08-06 22:24:50] [1269 prunsrv.c] [error] ServiceStart returned 1
[2008-08-06 22:24:50] [info] Run service finished.
[2008-08-06 22:24:50] [info] Procrun finished.
Tomcat startup eerrro as service 



 And that typo "eerrro" is not my doing Embarassed, it is tomcat only throwing this garbage into the log.



Most of the times, this is caused because of missing "msvcr71.dll". You can get it from http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71



Copy it into your system directory, usually C:\windows\system32 and ensure that file has execute permission set. Tomcat should be able to run as service now.

Tuesday, September 2, 2008

Getting rid of the "This page contains both secure and nonsecure items" warning?


Sometimes while you are visiting a secure site, you may see your IE show this warning message "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"



 



Secure nonsecure




As a user this is not only inconvenient but some may find it a bit scary as well.



As a developer you must ensure that your users do not get any such warning, there are few things you must keep in mind. Most of the time such warnings are generated as result of including a non secure content like an image or stylesheet in the secure page with absolute URL which is using standard http protocol to get the content.



say "http://www.example.com" has an image "image.jpg" included in the page. The secure site, "https://www.example.com" is using the same image but the image source attribute is set as "http://www.example.com/image.jpg". here is your problem content. Copy the logo to the secure site and load it from there. All you need to do here is use "https://www.example.com/image.jpg" as the image source attribute and the user will no longer get the warning message about mixed content.



Sometimes this warning is also generated because of IFRAME tags in your page. If you have an IFRAME in your page, ensure that its source attribute is set. If there is no source attribute set for the IFRAME, or set to null, user will be displayed this warning message. When you set the src, make sure it points to a real file.



If you are unable to find the culprit content, try debugging it in Firefox, using the Web Developer extension or Firebug. These extensions allows you to look at detailed information including the paths of various objects/ contents in the page.