Pages

Wednesday, May 30, 2012

not able to install IIS / problem in installing IIS/ problem in reinstall iis/ error in reinstall IIS

I got this problem few months ago when I was trying to reinstall IIS and it was giving me same error "not able to install".  I tried few times to reintall it and at last I got succes when i forcefully deleted "C:\Inetpub" folder.

few steps if you are getting problem in uninstalling IIS. 
1. restart system  and try to uninstall it.
2. forcefully delete folder if uninstall is failing. 
3. again try to unistall if it shows you IIS in system
4. restart your system and reinstall IIS. 

[Just one note]
if you have Fiddler in your system and if you are trying to open your websites which you already opened through fiddler. then try to close all browsers and open fiddler and then browsers. 

sometime Internet explorer declines page request somehow with fiddler. 
if you open fiddler first and open your browsers then it starts working again. 
this was the reason i was installing IIS because i thought my IIS is corrupt but in real fiddler was not open and IE was declining page  requests. 





find real ip address coldfusion

find real ip address coldfusion

finding real IP address for client machines, that's not very technical but it was five years ago for me when I was trying to get real ip address for project in company NCR. 
I was always getting ip address of download proxy server or some other proxy server. 

I found this simple code to by pass any proxy server (download/proxy server/ or any one). 

<cfif CGI.HTTP_X_Forwarded_For NEQ ""><!--- Checking proxy address --->
       <cfset real_ipaddress = CGI.HTTP_X_Forwarded_For>
<cfelse>
       <cfset real_ipaddress = CGI.REMOTE_ADDR>
</cfif>
 
 

Tuesday, May 22, 2012

mach-ii dashboard is slow

I came across this in my office today.  one of my teammate suggested me to do this.
It never happened to me but i am posting this for my future reference and for Mach-II users.

when your  mach-ii dashboard is very slow, just delete files in below folder.
C:\ColdFusion8\wwwroot\WEB-INF\cfclasses

Wednesday, May 16, 2012

removing a item from array in javascript


// This function is to remove items from a list
Array.prototype.removeItems = function (s) {
    var i = $.inArray(s, this);
    while (i != -1) {
        this.splice(i, 1);
        i = $.inArray(s, this);
    }
}

---- now u can use removeItems method in javascript for any array