Archive

Archive for July, 2009

Issue with Firefox 3.5 and firebug

July 31st, 2009 No comments

If you’re using FF 3.5 to view any website and have firebug enabled,
you may encounter an annoying javascript error:

“onreadystatechange FAILS Error: Permission denied for XXXX to create
wrapper for object of class UnnamedClass Error”

This is a FF3.5/Firebug issue and is not a bug of the website
Unfortunately, there is no real good workaround if you need to have
firebug on except that disabling the Net tab may help reduce the
chances of getting the error. But if you don’t have to use firebug,
simply turn it off.

System.BadImageFormatException on 64 Bit CPU RTC Api

July 9th, 2009 No comments

If you are using RTC API and and you are installing your bot on 64 BIT CPU, You may get this exception

System.BadImageFormatException: Retrieving the COM class factory for component
with CLSID {7A42EA29-A2B7-40C4-B091-F6F024AA89BE} failed due to the following
error: 800700c1.

This means that you have compiled your code for ANY CPU or 64x cpu and whenever you run your code on 64 bit machine then OS will try to run your application as 64 bit. Bot RTC API is 32 Bit CPU based api, so it will not be supported in 64bit cpu environment.

To solve this issue compile your code for x86 machine(i.e. 32 bit cpu). Now install your application on 64 bit machine. You application should run successfully.

Also verify that in Task Manager 32* is appearing ahead your application name. This will confirm that your application is running in 32 bit environment.

Google Wave

July 7th, 2009 No comments

Google Wave is a new tool for communication and collaboration on the web, coming later this year. Watch the demo video below, sign up for updates and learn more about how to develop with Google Wave.

Official Blog: http://googleblog.blogspot.com/2009/05/went-walkabout-brought-back-google-wave.html

Google Page Speed for FireFox

July 6th, 2009 No comments

Web page load time is an important factor in we design and development, not only web developes but bloggers and site owners need to optimize their web pages so they load faster or else retaining users will be difficult. There are many tools which analyze web pages and show you ways to improve load times. Firebug for Firefox is a useful addon for analyzing web page css, js and other stuff.

Google has released a Firefox addon called Page Speed today that is integrated with Firebug, that means you need Firebug for Firefox and of course Firefox before you can install this addon. The Page speed addon when installed adds tabs to Firebug console.

You can analyze web page performance using this addon, click on “Analyze Performance” button in the page speed tab in firebug. It gives optimization tips upon examining the web pages. The tips ranges from highly recommended, moderate to least. These tips will provide short description and clicking on the link will take you to page speed documentation where you can read more on how to optimize your site.

The Show Resources link will show you the objects loaded in the web page with the type of the object, file size and transfer size. You might find some scripts and images that are too heavy here, better to get rid of them or minimize them.

Yahoo long has a similar addon called YSlow for Firebug that analyzes web pages and suggests improvements for performance of web pages.

Install

mailto: Hyperlink with Subject & Message

July 3rd, 2009 No comments

You can use following html code to generate mailto: link with pre-filled Subject and Mail Message:

<a href="mailto:someone@someone.com?subject=MessageSubject&body=MessageBudy">
Mail To Example<a>

This anchor tag will open your default e-mail client with to, subject and message body.

VB Script to Create Office Communication Server Enabled Users in Active Directory

July 3rd, 2009 No comments

Following is a VB Script to create Office Communication Server Enabled users in Active Directory.


Option Explicit
Dim strUser, strPassword, strName, strDomain, strADRoot
Dim strUCPool, strDC, intStart, intEnd
Dim objRootLDAP, objContainer, objNewUser

strUser = "ocsuser"
strName = "OCS User"
strDomain = "asinghal.com"
strPassword = "pass2004"
strADRoot = "LDAP://cn=Users,DC=asinghal,dc=com"
strUCPool = "<OCS-Pool-Name>"
strDC = "DC=asinghal,DC=com"
intStart = 53
intEnd = 150

const ADS_UF_DONT_EXPIRE_PASSWD = &H10000

' Bind to Active Directory, Users container.
Set objRootLDAP = GetObject("LDAP://rootDSE")
Set objContainer = GetObject(strADRoot)

' Build the actual User.
Dim count
For count = intStart To intEnd
 Set objNewUser = objContainer.Create("User", "cn=" & strUser & count)
 objNewUser.Put "sAMAccountName", strUser & count
 objNewUser.Put "givenName", strName & count

 'Enable following parameter if you want to enable this user for Unified Communication
 objNewUser.Put "msRTCSIP-InternetAccessEnabled", TRUE
 objNewUser.Put "msRTCSIP-ArchivingEnabled", 0
 objNewUser.Put "msRTCSIP-FederationEnabled", FALSE
 objNewUser.Put "msRTCSIP-OptionFlags", 256
 objNewUser.Put "msRTCSIP-PrimaryHomeServer", "CN=LC Services,CN=Microsoft,CN=" &
            strUCPool & ",CN=Pools,CN=RTC Service,CN=Microsoft,CN=System," & strDC
 objNewUser.Put "msRTCSIP-PrimaryUserAddress", "sip:" & strName & count
            & "@" & strDomain
 objNewUser.Put "msRTCSIP-UserEnabled", TRUE
 'UC Properties Ends

 objNewUser.SetInfo
 objNewUser.SetPassword strPassword
 objNewUser.Put "userAccountControl", 512 XOR ADS_UF_DONT_EXPIRE_PASSWD
 objNewUser.SetInfo
Next
WScript.Quit

' End of free sample Create Users VBScript.

Creating virtual host for SSL/HTTPS port in IIS6

July 3rd, 2009 No comments

You can not create the virtual host for SSL port in IIS.  Its a UI bug. But you can achieve the same thing using the command line by using the following steps:

1. Create two websites in IIS and configure HTTPS on both of the websites.
2. At this point you will not be able to start both the websites at the same time, because https is configured on 443 port in both the websites.
3. Stop both the website if running.
4. Go to commands line and cd to C:\Inetpub\AdminScripts folder.
5. Now you have to figure out the website identity of you want to change the host. Type following command to command line. You may want to run this command two times, because first time it may try to set the VB script as default script

C:\Inetpub\AdminScripts>iisweb /query
Connecting to server ...Done.
Site Name (Metabase Path)                     Status  IP              Port  Host

==============================================================================
Default Web Site (W3SVC/1)                    STOPPED ALL             80    N/A
Communicator Web Access (W3SVC/175074822)     STOPPED 127.0.0.1       81    N/A
VMware Management Interface 1.0.4 (W3SVC/2)   STARTED ALL             8222  N/A
reliance (W3SVC/1386234876)                   STARTED ALL             82    N/A

Note: you should get all the sites registered in your IIS server along with their site identities.
6. Modify the virtual host of SSL port using following command

C:\Inetpub\AdminScripts>cscript.exe adsutil.vbs set  W3SVC/<site identifier>/SecureBindings ":443:<host header>"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

SecureBindings                  : (LIST) ":443:<host header>"

7. Make sure host name is properly configured in your DNS server.
8. Start both the websites.
9. You should be able to access both the application using different host on https communication.

More:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/e5bc9d3c-0043-43c9-a5cc-ac390d74849b.mspx?mfr=true
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/8d9f2a8f-cd23-448c-b2c7-f4e87b9e2d2c.mspx?mfr=true

IE 8 compatibility Issue

July 3rd, 2009 No comments

Most of the joomla templates are not compatible with Internet Explorer 8. To solve then issue, edit template html and add following line in HEAD tag.

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″/>

It will solve this issue.

How to add Google Analytics to Joomla

July 3rd, 2009 No comments

Create a Google Analytics account

Go to the Google Analytics website and sign up for account.

Once you’ve followed the registration process you will come to a page where you are given a tracking code to add to each page of your website. If you are given the choice to choose between the new tracking code (ga.js) or the old tracking code (urchin.js) choose the new tracking code.

Keep this webpage open with the tracking code on as we’re going to need it in a few minutes.

Add the Analytics tracking code to your Joomla template

Adding the analytics tracking code to your Joomla website is really easy. We’re going to show you how to do this through logging in to the administrator backend and editing your template’s HTML.

In Joomla 1.0.1x

If you are using Joomla 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14 or 1.0.15 do the following:

* Log on to: www.yoursite.com/administrator/
* In the top menu select: “Site” > “Template Manager” > “Site Templates”
* Then select the template which is marked as default and click “Edit HTML”

In Joomla 1.5

If you are using Joomla 1.5, 1.51 do the following:

* Log on to: www.yoursite.com/administrator/
* In the top menu select: “Extensions” > “Template Manager”
* Now select the template which is marked as default and click “Edit”
* In the template edit page click “Edit HTML”

Adding the code within the template

If you have followed the steps above you should now be looking at your template’s HTML.

* Scroll right down to the bottom of all this code
* On the second to bottom line you should see the tag </body>
* You need to paste your Google Analytics tracking code just before this tag
* Now press “save” and Google Analytics is installed on your website!

Welcome

July 3rd, 2009 No comments

You have reached to the Knowledge-Base managed By Ankit Singhal. You can find many important technical information on Instant Messaging, Enterprise Messaging, XMPP, Office Commuication Server 2007, Office Communication Server 2007 R2, C#, WCF, Web Services etc.