Reviews US Money Reserve research paper Motivational Quotes  ServicesListed.com Free cell phones   Custom Writing
Try the best slots i found online, you will love it!
Nishanth's Blog | December 2008

Providing write permission to a file in Plesk

by Nishanth 10. December 2008 04:00

Today I uploaded a new module to one of my sites hosted with a third party hosting provider(www.2gbhosting.com). This module reads from and writes to an XML file but once I uploaded the code to the server, I found that the application was not able to write to the XML file. The reason, as I guessed was .NET Security Laughing. By default, all files are assigned read only permission for the ASP.NET worker process. So we need to give write permission on the XML file to the ASP.NET worker process.

2gbhosting uses Plesk(version 8.4.0) and I am describing here the steps required in this scenario to fix this issue in Plesk.

Steps:

1. Login to Plesk.-> File Manager -> Browse to the File -> Click on the Lock icon on the right side of the file.

2. You will reach "Setting up Access permissions" page .

3. Click on "Plesk IIS WP User (IWAM_plesk(default))" user.

4. On the right side, check in allow column against Write permission. 

5. Click on OK and you are done. 

Happy coding and hosting!!!

 

http://www.ajaxload.info/ - Cool site for custom ajax Indicators

by Nishanth 9. December 2008 23:35

I stumbled upon this site http://www.ajaxload.info/ which allows you to create custom Ajax indicators. 

The concept itself is really cool. I can create the indicators using colors matching my site.

Check it out here: http://www.ajaxload.info/  

Tags: , , ,

General Tech | Ajax

Rajni at his best

by Nishanth 2. December 2008 22:37
 http://in.youtube.com/watch?v=gedQImcplz8

Page_Load method being called twice (randomly) in ASP.NET web application

by Nishanth 2. December 2008 21:03

First lets look in to the Architecture of this web application which I was working on:

The user will be redirected to a static HTML landing pagefrom where the user selects products using radio buttons and hits an htmlbutton which is coded as follows: 

<input name="image" type="image" src="../Images/buynow.jpg" class="buynowbutton_and"  id="BuyNow_0" onclick="return Redirect(this);"/>

As you can see, when the button is clicked, the javascriptmethod Redirect() is being called.

In this method, a url is constructed using the selected productids and redirected to the shopping cart page.

  document.forms[0].action= url;

 document.forms[0].submit();

 

Now the missing piece is that we should return a “false”after the redirection statement. This will prevent the page from posting  back again(which we don’t want to happen) aswe already redirected the page.

 Otherwise the browsermight get posted back ‘again’(This is quite random and depends on browser. Wehad issues with IE 7 ) and 2 ‘post backs’ will happen on the same page and itwill cause Page_Load to execute twice  ina multithreaded manner sharing the same session variables. This is a dangeroussituation. It leads to unexpected behavior of the ASP.NET application and itaffects the output.

In my case there was an if else loop in the Redirect()method which was causing the issue.

If(condition){

Do something;

//Missed the return false here.

}else

{return false;}

As you saw above the return false was not in if block, itsonly in else block. This code used to work initially and suddenly started tocreate issues.  

 

If your application has a client side redirect,then make sure that you disable the post back  returning a false in the onclick event toprevent the second post back. From another perspective, if you have two ormultiple unexpected Page_Load events happening on your aspx page and you are clueless(just like me initiallyJ), check whether you are returning the false inyour javascript after its execution(make specific checks on conditional statementsin the JS which might prevent the ‘false’ to be returned 

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen


About Me

Nishanth Nair  

 A die hard fan of Rise of Nations... I write few softwares for McAfee Inc. for a living.

 

Portfolio:

http://morningbellnews.com
TheXorb.com
http://Necab.org
http://SufiKatha.com
http://DeepaRecipes.com
http://ManipalFoundation.in
http://NetraArts.com
http‌://EnWebTech.com 

http://homeopathyinchicago.com/


Contact : Nair.Nishanth@Gmail.com 

 

All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer.

Tag cloud

free counters