ASP.NET Custom role provider

Easy guide to write your custom role provider

Merge splitted .mkv files

Learn how to merge splitted .mkv files (.mkv001,.mkv002...)

How to Zoom in and Zoom out your sql execution plan ?

Tool to tune your sql query

send .exe files with gmail

How to send files having blocked extension with Gmail ?

Multiple home pages in Internet explorer

How to set multiple home pages in internet explorer ?

5/30/2009

How to reset user session in IIS when using AJAX updatepanel extensively on the page ?

I guess every ASP.net developer might be using Updatepanel control these days which lets us to do partial postbacks on the page .If you are using Updatepanel control once on your page , you wont come across any issues . But if you are using it extensively obviously you will run into many issues.

In a traditional ASP.net web application the users session timeout counter will be reset everytime a user requests a page from the server, thus by preventing the user’s session from getting timed out. However,In AJAX ASP.NET application which uses XMLHTTP request to update part of a page , the users session counter on IIS will not be reset . So How to prevent Timeout in AJAX Asp.net Application which uses updatepanels ? How can we reset user Session in IIS when so activity happens in updatepanel ? The solution is here . Read on .
  • Create a new WebForm - KeepAlive.aspx in your application.
  • Now go to the code behind of the webform by hitting F7.
  • In the page_load method of the webform (KeepAlive.aspx) add the following lines of code
Response.ContentType = "text/html";
Response.Write("Technade");
  • Now go to the page where you are using the updatepanel extensively and add the following javascript to the markup.
function sessionKeepAlive(sender, args) {
//Create a New web Request and make a call to KeepAlive
var SubRequest = new Sys.Net.WebRequest();
SubRequest.set_url("KeepAlive.aspx");
SubRequest.set_httpVerb("POST");
SubRequest.add_completed(sessionKeepAlive_Callback);
SubRequest.set_body();
SubRequest.get_headers()["Content-Length"] = 0;
SubRequest.invoke();
}

//This function processes the return values
function sessionKeepAlive_Callback(executor, eventArgs)
{
// If you want to check any returned value from server ,you can use this else skip it
//else leave as it is
}
//Raised after an asynchronous postback is finished and control has been returned to the
// browser.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(sessionKeepAlive)

  • What we are doing above is that, whenever you make a asynchronous postback call to the server , we are requesting the KeepAlive.aspx from the server using a new web request which inturn will reset the user session in IIS.
This solution has been tested and it works. So you dont need to worry that your updatepanel activity is not resetting the session in IIS.I hope this one helps the developers.Please post your doubts and views as comments.This one also might help you
How to remove 'sys' is undefuned ?

For more ASP.NET solutions , Subscribe here or click here to get updates via email .

5/23/2009

Banned by Adsense

Yes ,I am banned by adsense . On the day I received a mail from adsense that they had banned my account , I was stunned as usual . As we all know adsense never let people know the exact reason behind banning a website. I finally entered some form requesting google to reinstate my account . But nothing happened.

So Why am I banned by Google adsense ?

The only reason I can think of is I am not updating my blog . Yes guys , if you have a high revenue generating blog/website and you are not updating it regularly , Google will consider it as Made For Adsense website (MFA) and they will ban the respective account .

Apart from this , there are lot of reasons why Google might ban your adsense account .
Please check here to find the reasons why Google ban your adsense account .
For more updates from techworld , Subscribe here or click here to get updates via email .

5/14/2009

Meet me @ Tech.ed 2009 , Hyderabad

Join me @ Microsoft tech.ed 2009 , one of the most exciting events for Microsoft developers from 13-15th of May in Hyderabad . I will be posting updates on Technade.Stay tuned .

4/05/2009

Beware of Microsoft Powerpoint Flaw

Microsoft has warned that Hackers are targetting a unpatched flaw in Microsoft office Powerpoint to attack users PC 's .

Versions Vulnerable : Microsoft Office 2003 SP3,Office 2002 SP3 and 2000 SP3 .

Hackers will launch attack by making you open a powerpoint file which has been crafted already . When you open the file powerpoint will try to access a invalid object in the memory which in turn allows the hacker to execute code remotely on your system .

As per Security advisory , attacks are not spread yet heavily but they expect some limited number of expects targetted at some users .Right Now Microsoft did not come up with any patch for this flaw but they might do it in next patch.

So What should I do to protect myself against powerpoint vulnerability ?

Microsoft suggests us not to open files received from untrusted sources, use the Microsoft Office Isolated Conversion Environment (MOICE) to open untrusted files, and use Microsoft Office File Block policy to restrict the opening of Office 2003 and earlier documents.
For more TechWorld updates and security News , Subscribe here or Click here to get updates via email .

3/30/2009

Tata Nano Review - Shall I go for a Nano or Maruti 800 ?

Hmmm this is a million dollar question to be answered .After reading lot of reviews and listening to people i personally built a opinion on this people 's car .So will I buy a nano or not ? What opinion do i have on Nano ?

When I start thinking about Nano ,the first ever question in my mind is Why TATA built this car ?? His Indica is doing good so as his Ace which are priced above 2 lakhs .When I heard his reply to this question , I am so happy that now Indian business echelons are thinking of customers.For your information Indian business people are never conscious of customer satisfaction. Indian customers never question about the quality of the product . Seeing a family travelling on a scooter with a kid standing in the front , a dad driving it and a mom holding a baby in her lap and if possible one more kid between the dad and mom,Mr Tata wanted to build something that will revolutionize these peoples lives.When I started thinking what he can build in a lakh , My thinking can not go beyond a Auto Rickshaw .But I was surprised when 6 feet Ratan came out of our little peppy toy called Nano in Auto Expo last year .


Did you ever hear of something called a operational efficiency ?? Nano is a perfect example of operational efficiency . You can read How Mr Ratan and his team achieved this here !! The Nano team of 500 people did a very brilliant job in building this little car . They achieved price efficiency mainly in material and by taking advantage of low cost Indian labour . They used plastic instead of metal but with no compromise in safety norms . As per TATA motors Nano will satisfy all the safety norms .

As a Indian , I am proud of what Mr Tata as achieved . They showed the world a brutal example of engineering . They proved the world that we the Indians are capable of achieving things rather than jut using things someone else has invented. So what things I consider can be reasons for buying the Nano ?

Pro s of Nano :
* Every one knows the Nano .Having it will be a kind of status symbol in earlier days . People ask you lot of questions about it .
* Cool design . A one lakh car is not expected to be so cool in design but the Indian automaker made it. Its peppy look does force me to buy it .It beats Maurti 800 in this point
* Brand TATA : TATA s products are known for their quality. Tata Vehicles are very low on maintenance so as Will be Nano .
* Price Tag : Not to be mentioned , yes I will certainly buy the Nano for its price tag . Its the lowest priced car in the world .
* Mileage : Nano will offer you more mileage that most of the other cars .Tata Motors say it will give you 20 + .

How is Nano in comparision with other cars ? Read on here .


Con s of Nano :

* In start may be the car might be a status symbol but with its numbers increasing and every one having it , you may not feel so elited of having it .
*A rear mounted engine with roaring sound reminds me of a sports car but its Nano man .This rear mounted engine surely reminds me of a diesel Auto :).
* Speed matters . Its top speed is claimed to be a bit above 100 but I dont think a 600 + cc engine can do it with 4 people on board .
* Its nearest competitor Maruti 800 is among the most reliable vehicles from the Indian car stable . It has been tested through times and its a tough vehicle. I personally own it and there is not doubt about it . It offers me a mileage of around 18 - 20 most of the times .Most of the people are still in a kind of dilemma whether Nano first version may have some glitches like Indica initial release .
* If you think of price tag , The basic nano which is of 1 lakh which will be given only to first one lakh customers and thats also on the basis of a electronic lottery . If I am buying a car for my family , I will surely look for something that has a air conditioner .For a Nano having a air conditioner , I have to pay around 1.7 lakh and I can get a Maruti 800 if I can afford 30 k more .
* Not to forget this , The most annoying thing is the application form and the deposit price. They charge 300 rs for a application and the deposit price is arround 70 k .Tata might had put this one to avoid huge bookings from customers but as a customer its not that much comfortable.
*Its dashboard looks to me much like a auto dashboard . I am not at all impressed with it dashboard did not give me a rich feel of a good car .
When I summarize all the pros and cons I dont see many strong reasons for buying the Nano .But yes , its a new kid on the block . If you like trying new things, you can book one .If you care about each penny you spend , you can save 30 k by going for a nano instead of a Maruti 800 .

For more updates on people car ,
subscribe to my blog or click here to get updates via email.