<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-854021761054153070</atom:id><lastBuildDate>Tue, 17 Sep 2024 05:36:15 +0000</lastBuildDate><category>ite</category><title>Kajax.net</title><description></description><link>http://kajaxnet.blogspot.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>97</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3760782407417963385</guid><pubDate>Mon, 14 Apr 2014 21:59:00 +0000</pubDate><atom:updated>2014-04-14T15:03:27.282-07:00</atom:updated><title>scroll helper</title><description>&lt;script src="https://gist.github.com/kkurni/10682748.js"&gt;&lt;/script&gt;</description><link>http://kajaxnet.blogspot.com/2014/04/scroll-helper.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3557992789491025935</guid><pubDate>Thu, 19 Aug 2010 07:27:00 +0000</pubDate><atom:updated>2010-08-19T00:29:46.509-07:00</atom:updated><title>There was an error processing the request</title><description>If you get that above error.. and you have no idea what's wrong with it just put change "CustomError='Off'"</description><link>http://kajaxnet.blogspot.com/2010/08/there-was-error-processing-request.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-6544937560011597924</guid><pubDate>Tue, 17 Aug 2010 02:51:00 +0000</pubDate><atom:updated>2010-08-16T19:54:17.202-07:00</atom:updated><title>WebForm_... is not Defined error</title><description>If you get this error "WebForm_ is not defined error..."&lt;br /&gt;and previously you never get this problem...&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;you may install a plugin which compress the .axd file...&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;solution:&lt;br /&gt;you need to exclude them on the compression module...&lt;br /&gt;please check your .axd name.. and exclude them on your HTTP compression module&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;it needs this 2 file not to be compressed&lt;br /&gt;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions</description><link>http://kajaxnet.blogspot.com/2010/08/webform-is-not-defined-error.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-8084254198850731620</guid><pubDate>Sun, 01 Aug 2010 12:13:00 +0000</pubDate><atom:updated>2010-08-01T05:16:57.168-07:00</atom:updated><title>Protect yourself from XSS attack with new ASP 4.0 nuggets</title><description>&lt;span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;In ASP.NET 4.0, you can replace your usually habit to use &lt;span style="font-weight: bold;"&gt;&lt;%=%&gt;&lt;/span&gt; with this new nuggets &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;%: %&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;This will automatically protect your applications against cross-site  script injection (XSS) and HTML injection attacks and avoid duplicate encoding.&lt;br /&gt;&lt;br /&gt;So you don't need to worry if you forget to encode your string in the aspx files. or protect it using AntiXSS.&lt;br /&gt;&lt;br /&gt;It's very usefull in combination of MVC framework 2.0&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://kajaxnet.blogspot.com/2010/08/protect-yourself-from-xss-attack-with.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-4893281993806818962</guid><pubDate>Fri, 23 Jul 2010 02:16:00 +0000</pubDate><atom:updated>2010-07-22T19:19:40.199-07:00</atom:updated><title>IsCallBack VS IsPostback</title><description>I just looking in couple framework. and just curious what they use to bind the UI is using&lt;br /&gt;! IsCallback instead of ! IsPostback&lt;br /&gt;&lt;br /&gt;Why ?&lt;br /&gt;&lt;br /&gt;Just making summary out of this&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms178141.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms178141.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IsCallBack will be set to true if you doing a partial postback.&lt;br /&gt;&lt;br /&gt;if you checking using IsCallBack and there is no ajax call , it will not affect anything. Just similar like you don't use the checking which is doesn't improve your performance.&lt;br /&gt;&lt;br /&gt;But there should be a reason behind it, or probably they have a mistype because of Autocomplete provided by VS =p</description><link>http://kajaxnet.blogspot.com/2010/07/iscallback-vs-ispostback.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-7640862138802724088</guid><pubDate>Thu, 15 Jul 2010 06:31:00 +0000</pubDate><atom:updated>2010-07-14T23:33:07.061-07:00</atom:updated><title>Protect your apps from ClickJacking</title><description>Here an interesting video which I recently lookat.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=gxyLbpldmuU"&gt;http://www.youtube.com/watch?v=gxyLbpldmuU&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To protect your apps&lt;br /&gt;&lt;br /&gt;put this code&lt;br /&gt;&lt;br /&gt;if (top != self)&lt;br /&gt;{&lt;br /&gt;   self.location.href = "http://yoursite.com";&lt;br /&gt;}</description><link>http://kajaxnet.blogspot.com/2010/07/protect-your-apps-from-clickjacking.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-8183338581947302766</guid><pubDate>Tue, 13 Jul 2010 00:24:00 +0000</pubDate><atom:updated>2010-07-13T17:47:11.216-07:00</atom:updated><title>CSRF Attack Prevention on .NET</title><description>&lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;In Addition to Rob's AntiXSS, we also need to secure  CSRF Attack in Defence Jobs.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;Here is what I found :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;* Check this video to understand how the CSRF works  &amp;amp; How you check your site if it is secure.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;a title="http://www.securitytube.net/Discovering-CSRF-with-OWASP%27s-CSRFTester-Tool-video.aspx" href="http://www.securitytube.net/Discovering-CSRF-with-OWASP%27s-CSRFTester-Tool-video.aspx"&gt;http://www.securitytube.net/Discovering-CSRF-with-OWASP%27s-CSRFTester-Tool-video.aspx&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;* Prevention&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;    - ViewStateUserKey in  (ASP.NET)&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;            If you use viewstate in ASP.NET. it is  recommended that you include &lt;strong&gt;ViewStateUserKey &lt;/strong&gt;and  &lt;strong&gt;Encript &lt;/strong&gt;them&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;               *(Include this on your base  page)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;                    &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;                    protected override OnInit(EventArgs  e) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;                    {&lt;br /&gt;                              base.OnInit(e);&lt;br /&gt;                             if  (User.Identity.IsAuthenticated)&lt;br /&gt;                                 ViewStateUserKey = Session.SessionID; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;                    }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;                * Encript your viewstate in web.config  (ViewStateEncriptionMode="Always")&lt;br /&gt;                   &lt;a title="http://msdn.microsoft.com/en-us/library/aa479501.aspx" href="http://msdn.microsoft.com/en-us/library/aa479501.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa479501.aspx&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;          &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;Note:  &lt;br /&gt;            However  ViewStateUserKey this is not fully protect you from CSRF. This just to add an  addition security layer to your application.&lt;br /&gt;            &lt;a title="http://keepitlocked.net/archive/2008/05/29/viewstateuserkey-doesn-t-prevent-cross-site-request-forgery.aspx" href="http://keepitlocked.net/archive/2008/05/29/viewstateuserkey-doesn-t-prevent-cross-site-request-forgery.aspx"&gt;http://keepitlocked.net/archive/2008/05/29/viewstateuserkey-doesn-t-prevent-cross-site-request-forgery.aspx&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;* Recommended  Prevention&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;    Because ViewStateUserKey is not completely protect  you from the CSRF Attack, You need to protect your application using  &lt;strong&gt;per-request nonce to hidden form / URL&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;    There are framework which can automatically done  this.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;     * .NET CSRF GUARD &lt;/strong&gt;&lt;a title="http://www.owasp.org/index.php/.Net_CSRF_Guard" href="http://www.owasp.org/index.php/.Net_CSRF_Guard"&gt;http://www.owasp.org/index.php/.Net_CSRF_Guard&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;        &lt;strong&gt;- &lt;/strong&gt;This .NET version  unfortunately only supply protection using URL method. (Nonce token is added on  URL). This version doesn't support the hidden field method.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;    * ANTICSRF for ASP.NET (RECOMMENDED)  &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;a title="http://idunno.org/archive/2008/12/14/announcing-anticsrf-for-asp.net.aspx" href="http://idunno.org/archive/2008/12/14/announcing-anticsrf-for-asp.net.aspx"&gt;http://idunno.org/archive/2008/12/14/announcing-anticsrf-for-asp.net.aspx&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;        This framework &lt;strong&gt;(.NET  HTTPModule)&lt;/strong&gt; will added the per-request nonce to hidden field &amp;amp;  cookies and validate it when post method or  postback triggered.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;========================================================&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Installation of ANTICSRF&lt;/strong&gt; &lt;/span&gt;&lt;a title="http://anticsrf.codeplex.com/" href="http://anticsrf.codeplex.com/"&gt;&lt;span title="http://anticsrf.codeplex.com/"  style="font-size:85%;"&gt;http://anticsrf.codeplex.com/&lt;/span&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;    &lt;span style="font-family:Times New Roman;"&gt;- Add  AntiCSRF.dll to Bin Folder&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-size:100%;"&gt;&lt;strong&gt;    &lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;strong&gt;- Register AntiCSRF HttpModule on web  config     &lt;/strong&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;system.web&gt;&lt;br /&gt; ....&lt;br /&gt; &lt;httpmodules&gt;&lt;br /&gt;   &lt;strong&gt;&lt;add name="AntiCSRF" type="Idunno.AntiCsrf.AntiCsrfModule, Idunno.AntiCsrf"&gt;&lt;br /&gt;&lt;/strong&gt;  &lt;/httpmodules&gt;&lt;br /&gt; ....&lt;br /&gt;&lt;/system.web&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;strong&gt;       &lt;/strong&gt;&lt;span class="798335023-13072010"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;strong&gt;&lt;span style="font-family:Times New Roman;"&gt;- Configure Settings&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;configuration&gt;&lt;br /&gt;   ....&lt;br /&gt;   &lt;configsections&gt;&lt;br /&gt;       ....&lt;br /&gt;       &lt;section name="csrfSettings" type="Idunno.AntiCsrf.Configuration.CsrfSettings, Idunno.AntiCsrf"&gt;  &lt;br /&gt;       ....&lt;br /&gt;   &lt;/configsections&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Times New Roman;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Times New Roman;"&gt;    &lt;csrfsettings cookiename="__CSRFCOOKIE" formfieldname="__CSRFTOKEN" detectionresult="Redirect" errorpage="/AntiCSRFDetected.aspx"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Verdana;"&gt;   &lt;/span&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt; &lt;/span&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;- If you don't want to proptect your page,&lt;br /&gt;        you can add class attribute &lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;strong&gt;[Idunno.AntiCsrf.SuppressCsrfCheck]&lt;br /&gt;        &lt;/strong&gt;or page interface &lt;strong&gt;&lt;%@ Implements Interface="Idunno.AntiCsrf.ISuppressCsrfCheck" %&gt; &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;==================================================================&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;h2 dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;How it works (ANTICSRF)&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;    &lt;strong&gt;*&lt;/strong&gt; &lt;strong&gt;HTTP MODULE &lt;/strong&gt;on &lt;strong&gt;PreSendRequestHeaders&lt;/strong&gt; and &lt;strong&gt;PreRequestHandlerExecute&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;        &lt;/span&gt;context.PreSendRequestHeaders += PreSendRequestHeaders;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;        &lt;/span&gt;context.PreRequestHandlerExecute += PreRequestHandlerExecute;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;  &lt;span style="font-family:Verdana;font-size:85%;"&gt; &lt;strong&gt;*&lt;/strong&gt; &lt;strong&gt;Adding pre-request nonce token&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;        -&lt;span style="font-family:Verdana;font-size:85%;"&gt; Add nonce on hidden field &lt;span style="font-family:Courier New;font-size:100%;"&gt;&lt;strong&gt;__CSRFTOKEN&lt;/strong&gt;&lt;/span&gt; and cokkie &lt;span style="font-family:Courier New;font-size:100%;"&gt;&lt;strong&gt;__CSRFCOOKIE&lt;/strong&gt;&lt;/span&gt; (configurable on settings)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;     * Validate nonce token on hidden field with cokkie&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;        &lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;- &lt;/strong&gt;It will validate the token when &lt;strong&gt;(POST Request or Postback)&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;br /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;strong&gt;        &lt;span style="font-family:Verdana;font-size:85%;"&gt;- Get Request will NOT be validated unless it is Postback&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;        - &lt;span style="font-family:Verdana;font-size:85%;"&gt;It will NOT validate any &lt;span style="font-family:Times New Roman;font-size:130%;"&gt;&lt;strong&gt;SuppressCsrfCheck &lt;/strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;class attribute or any class which inherits &lt;strong&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;Idunno.AntiCsrf.ISuppressCsrfCheck&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;&lt;strong&gt;     &lt;span style="font-family:Verdana;font-size:85%;"&gt;* If Attack detected&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;&lt;strong&gt;        &lt;span style="font-family:Verdana;font-size:85%;"&gt;-When&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Times New Roman;font-size:130%;"&gt;&lt;strong&gt;            &lt;/strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;strong&gt;- &lt;/strong&gt;hidden field or cookkie token are null/empty&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;       &lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;"&gt; &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;- &lt;/strong&gt;hidden field and cookkie token is not match&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;    &lt;span style="font-family:Verdana;font-size:85%;"&gt; -&lt;strong&gt;ACTION &lt;/strong&gt;(based on configuration setting &lt;span style="font-family:Courier New;font-size:100%;"&gt;&lt;strong&gt;detectionResult)&lt;br /&gt;      &lt;span style="font-family:Verdana;font-size:85%;"&gt;- &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;Throw an exception&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;       &lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;span style="font-family:Verdana;"&gt; &lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:Verdana;"&gt;&lt;strong&gt;- &lt;/strong&gt;Or redirect to other page based on configuration setting (&lt;/span&gt;&lt;span style="font-family:Courier New;font-size:100%;"&gt;&lt;strong&gt;errorPage&lt;/strong&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt;&lt;pre&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;==================================================================&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;h2 dir="ltr" align="left"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;Limitations of ANTICSRF&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;div dir="ltr" align="left"&gt;&lt;span class="798335023-13072010"&gt; &lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;li&gt;&lt;span class="798335023-13072010"&gt; &lt;/span&gt;Non-ASP.NET forms are not protected  with this module.&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div dir="ltr" align="left"&gt; &lt;ul&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;li&gt;You, the developer, must ensure your &lt;strong&gt;GET requests are idempotent  &lt;/strong&gt;(i.e. the side-effects of multiple identical requests are the same as  for a single request). GET requests are not protected with this module. See &lt;a class="externalLink" title="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.2" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.2"&gt;http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.2&lt;span class="externalLinkIcon" title="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.2"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class="798335023-13072010"&gt; &lt;/span&gt;&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/ul&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;---------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;"&gt;        * This Framework  will not protect the GET Request (Except if it is postback).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;              For  example&lt;br /&gt;              - when you use AJAX call using GET Request, It will  not validate the token.&lt;br /&gt;              &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;              - But if you want to use AJAX  call using the POST Request,&lt;br /&gt;              You must Suppress the AntiCSRF  validation by what I mention above on the &lt;strong&gt;Intallation. &lt;/strong&gt;by  adding the attribute or page attribute. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;                  Because If you don't  suppress the AntiCSRF validation, it will detect as AntiCSRF Attack, because  they can't find the token located on your hidden field.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;              Please have a read on  &lt;strong&gt;How It Works explanation above.&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span class="798335023-13072010"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;---------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span style="font-family:Times New Roman;font-size:100%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;span class="798335023-13072010"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://kajaxnet.blogspot.com/2010/07/csrf-attack.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-8153031793038549078</guid><pubDate>Mon, 12 Jul 2010 23:31:00 +0000</pubDate><atom:updated>2010-07-12T16:38:31.549-07:00</atom:updated><title>XSS Prevention attack</title><description>Most web developer must know about RequestValidation configuration in .NET&lt;br /&gt;which we can disable the XSS attack.&lt;br /&gt;&lt;br /&gt;But If we want to disable 'RequestValidation' it so we can have flexibility to handle it, We can use Server.HtmlEncode(). to display it.&lt;br /&gt;&lt;br /&gt;However this still not enough. This will expose to XSS attack.&lt;br /&gt;My college (Rob) find a utility which nice to replace Server.HTMLEncode().&lt;br /&gt;&lt;br /&gt;Download AntiXSSLibrary.dll&lt;br /&gt;and replace Server.HTMLEncode() with AntiXss.UrlEncode();&lt;br /&gt; &lt;br /&gt;http://msdn.microsoft.com/en-us/library/aa973813.aspx&lt;br /&gt;http://blogs.msdn.com/b/cisg/archive/2008/08/26/what-is-microsoft-antixss.aspx</description><link>http://kajaxnet.blogspot.com/2010/07/xss-prevention-attack.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-989529340408053803</guid><pubDate>Wed, 23 Jun 2010 01:03:00 +0000</pubDate><atom:updated>2010-06-22T18:05:03.436-07:00</atom:updated><title>Remember clientaccesspolicy</title><description>Remember to have clientaccesspolicy.xml&lt;br /&gt;&lt;br /&gt;to enable your WCF to be consumed by silverlight&lt;br /&gt;&lt;br /&gt;http://videos.visitmix.com/MIX09/T42F&lt;br /&gt;http://community.dynamics.com/blogs/cesardalatorre/comments/9579.aspx</description><link>http://kajaxnet.blogspot.com/2010/06/remember-clientaccesspolicy.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-4807590933036542811</guid><pubDate>Thu, 10 Jun 2010 05:03:00 +0000</pubDate><atom:updated>2010-06-09T22:05:12.698-07:00</atom:updated><title>Calling SP using NHibernate with IDBCommand</title><description>If there is transaction open.&lt;br /&gt;you need to supply the transaction by enlist it in NHibernate&lt;br /&gt;&lt;br /&gt;iSession.Transaction.Enlist(sqlComm);</description><link>http://kajaxnet.blogspot.com/2010/06/calling-sp-using-nhibernate-with.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-8766239700050759469</guid><pubDate>Thu, 10 Jun 2010 00:31:00 +0000</pubDate><atom:updated>2010-06-09T17:36:29.817-07:00</atom:updated><title>inject javascript in bookmark</title><description>Get stuff from GBone..&lt;br /&gt;&lt;br /&gt;it's pretty amazing that we can inject javascript to debug on browser&lt;br /&gt;&lt;br /&gt;put this bookmark..&lt;br /&gt;javascript:&lt;br /&gt;var b=document.body;&lt;br /&gt;if(b)&lt;br /&gt;{&lt;br /&gt;   void(z=document.createElement('script'));&lt;br /&gt;   void(z.src='http://www.company.com/somescript.js');&lt;br /&gt;   void(b.appendChild(z));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;this will run that script on your browser</description><link>http://kajaxnet.blogspot.com/2010/06/inject-javascript-in-bookmark.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-2101224727967620389</guid><pubDate>Wed, 09 Jun 2010 23:57:00 +0000</pubDate><atom:updated>2010-06-09T16:59:29.141-07:00</atom:updated><title>Jquery.Data</title><description>Learning new stuff today..from Rob...&lt;br /&gt;&lt;br /&gt;It's better to use Jquery.Data instead of custom attribute in element.&lt;br /&gt;because it will break some browser for custom attribute which not standard.&lt;br /&gt;&lt;br /&gt;Thanks Rob..&lt;br /&gt;&lt;br /&gt;Here is the example&lt;br /&gt;&lt;br /&gt;    jQuery.data(div, "test", { first: 16, last: "pizza!" });&lt;br /&gt;    $("span:first").text(jQuery.data(div, "test").first);&lt;br /&gt;    $("span:last").text(jQuery.data(div, "test").last);</description><link>http://kajaxnet.blogspot.com/2010/06/jquerydata.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-7201867191402503263</guid><pubDate>Fri, 04 Jun 2010 06:26:00 +0000</pubDate><atom:updated>2010-06-03T23:28:18.659-07:00</atom:updated><title>System.Web.Extension conflicting with the GAC</title><description>Be careful when you upgrade the site into 3.5&lt;br /&gt;if you get this error about ambigous with GAC version.&lt;br /&gt;then you need to take this out from your bin folder.&lt;br /&gt;&lt;br /&gt;because It may be your version in bin folder is different. 1.1&lt;br /&gt;but in GAC version is 3.5.</description><link>http://kajaxnet.blogspot.com/2010/06/systemwebextension-conflicting-with-gac.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3667350434417980428</guid><pubDate>Thu, 03 Jun 2010 02:17:00 +0000</pubDate><atom:updated>2010-06-02T19:29:47.910-07:00</atom:updated><title>Without Postback with disable your browser Javascript</title><description>Postback is very heavy code to load (viewstate,etc).&lt;br /&gt;such as you want to get rid of this from your form &lt;asp:form runat="server"&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So the solution is you can use AJAX.. to handle all this postback to make your page still dynamic or more responsive that before.&lt;br /&gt;&lt;br /&gt;But how about if the client browser disable their javascript..&lt;br /&gt;Your page will be static.&lt;br /&gt;&lt;br /&gt;so you need to consider this as well.&lt;br /&gt;&lt;br /&gt;So the big picture of this solution is to put ajax as common.&lt;br /&gt;but on the event onclick or href.. you can't just call that function to call an ajax.&lt;br /&gt;&lt;br /&gt;for example &lt;br /&gt;href="javascript:CallPostbackFunction();"&lt;br /&gt;&lt;br /&gt;you need to change this to&lt;br /&gt;href="/page/ajax/somePage.aspx" class="AjaxCall"&lt;br /&gt;&lt;br /&gt;then.. in you can check .. if the browser is enabled the javascript..&lt;br /&gt;then you can call your ajax function.&lt;br /&gt;&lt;br /&gt;If the javascript is disabled from your browser then you still can load to the proper page. instead of just do nothing.&lt;br /&gt;&lt;br /&gt;//check if browser enabled their javascript&lt;br /&gt;jQuery(document).ready(function() {&lt;br /&gt;    //perform init and replace to an proper javascript&lt;br /&gt;     var ajaxCalls = $('#ajaxCall');&lt;br /&gt;     ajaxCalls.unbind('click', this.addClick);&lt;br /&gt;     ajaxCalls.bind('click', this.addClick);&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here a good reference for Object Oriented Programming in Javascript&lt;br /&gt;http://devedge-temp.mozilla.org/viewsource/2001/oop-javascript/</description><link>http://kajaxnet.blogspot.com/2010/06/without-postback-with-disable-your.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-5845540468694482780</guid><pubDate>Mon, 29 Mar 2010 05:00:00 +0000</pubDate><atom:updated>2010-03-28T22:03:09.241-07:00</atom:updated><title>response.d in .net 3.5 JSON</title><description>Migrate Json .Net 2.0 to .Net 3.5&lt;br /&gt;&lt;br /&gt;Here need to be note...&lt;br /&gt;================&lt;br /&gt;response.d&lt;br /&gt;&lt;br /&gt;While I wish this unexpected change had been more clearly announced, it’s a good one. Here’s how Dave Reed explained it to me:&lt;br /&gt;&lt;br /&gt;    {"d": 1 }&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;    Is not a valid JavaScript statement, where as this:&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;    [1]&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;    Is.&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;    So the wrapping of the "d" parameter prevents direct execution of the string as script. No Object or Array constructor worries.&lt;br /&gt;&lt;br /&gt;[] is JavaScript’s array literal notation, allowing you to instantiate an array without explicitly calling a constructor. To expand on Dave’s explanation, simply consider this code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=====================&lt;br /&gt;make sure you change web.config to use ScriptService of v 3.5 in HttpHandlers&lt;br /&gt;&lt;br /&gt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"</description><link>http://kajaxnet.blogspot.com/2010/03/responsed-in-net-35-json.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3494061782184017705</guid><pubDate>Tue, 04 Aug 2009 03:39:00 +0000</pubDate><atom:updated>2009-09-08T20:28:40.898-07:00</atom:updated><title>Jquery AJAX impacted on document.write</title><description>just find a solution, when you use jquery ajax, and there is document.write after that, it will clear all your content..&lt;br /&gt;&lt;br /&gt;all u need to do is create a span, where you want to write that content. then.. overwrite document.write function to write into that span instead doing document.write..&lt;br /&gt;&lt;br /&gt;here is the sample&lt;br /&gt;&lt;br /&gt;span id="test" /span&lt;br /&gt;script   document.write = function(text){ jQuery('#test').append(text) }&lt;br /&gt;/script&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;=D&lt;br /&gt;Here is the reference&lt;br /&gt;http://javascript.about.com/library/blwrite.htm&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;Huh.. but this still have a problem.. in IE.. if you overwrite into different holder.&lt;br /&gt;&lt;br /&gt;so the best solution at this moment is using iframe...</description><link>http://kajaxnet.blogspot.com/2009/08/jquery-ajax-impacted-on-documentwrite.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-112643607962334547</guid><pubDate>Mon, 11 May 2009 05:33:00 +0000</pubDate><atom:updated>2009-05-10T22:34:27.004-07:00</atom:updated><title>Change culture without changing deployment Server</title><description>Add globalization tag inside System.web tag in Web.Config&lt;br /&gt;&lt;br /&gt;globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-AU"</description><link>http://kajaxnet.blogspot.com/2009/05/change-culture-without-changing.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-489161249996753784</guid><pubDate>Thu, 02 Apr 2009 03:34:00 +0000</pubDate><atom:updated>2009-04-01T20:36:01.655-07:00</atom:updated><title>1st NHibernate.LINQ Limitation</title><description>Just found Nhibernate Linq limitation.&lt;br /&gt;&lt;br /&gt;It can't translate toLower() on string but luckily, it has compare in case sensitive.&lt;br /&gt;&lt;br /&gt;it throws weird error if you use this.&lt;br /&gt;  q = q.Where(c =&gt; c.firstName.Contains(flter) || c.lastName.Contains(flter) || c.email.Contains(flter));&lt;br /&gt;          &lt;br /&gt;says &lt;br /&gt;----&lt;br /&gt;Index was out of range. Must be non-negative and less than the size of the collection.&lt;br /&gt;Parameter name: index&lt;br /&gt;----</description><link>http://kajaxnet.blogspot.com/2009/04/1st-nhibernatelinq-limitation.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-2377224688614561420</guid><pubDate>Tue, 03 Mar 2009 07:04:00 +0000</pubDate><atom:updated>2009-03-03T14:27:50.588-08:00</atom:updated><title>Restricting Text box (Multiline) using Javascript</title><description>//Restrict Length&lt;br /&gt;function restrictLength(e,ctl,maxLength)&lt;br /&gt;{&lt;br /&gt;    var evt = e ? e : window.event;&lt;br /&gt;    &lt;br /&gt;    //check the length for copy paste&lt;br /&gt;    if (ctl.value.length &gt;= maxLength)&lt;br /&gt;    {&lt;br /&gt;        //only character&lt;br /&gt;        if (e.keyCode == 0)&lt;br /&gt;        {&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }                &lt;br /&gt;    return true;  &lt;br /&gt;}&lt;br /&gt;-- don't for get to called using (RETURN)&lt;br /&gt;javascript:return restrictLength(event,this,10);</description><link>http://kajaxnet.blogspot.com/2009/03/restricting-text-box-multiline-using.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-5807127224409946549</guid><pubDate>Tue, 03 Mar 2009 07:02:00 +0000</pubDate><atom:updated>2009-03-02T23:04:21.957-08:00</atom:updated><title>Sending Email from HTML</title><description>I decide to use File rather then web request coz some server are restricted to loopback.&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;        /// Get Email Body from file &lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;        public static string GetEmailBodyFromFile(string filePath)&lt;br /&gt;        {&lt;br /&gt;            string emailMasterBody = "";&lt;br /&gt;            &lt;br /&gt;            Encoding encode = System.Text.Encoding.GetEncoding("utf-8");&lt;br /&gt;            using (System.IO.StreamReader objReader = new StreamReader(filePath, encode))&lt;br /&gt;            {&lt;br /&gt;                emailMasterBody = objReader.ReadToEnd();&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return emailMasterBody;&lt;br /&gt;        }</description><link>http://kajaxnet.blogspot.com/2009/03/sending-email-from-html.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-2111989784804374100</guid><pubDate>Wed, 03 Dec 2008 05:53:00 +0000</pubDate><atom:updated>2008-12-02T21:54:51.001-08:00</atom:updated><title>PL-SQL Looping</title><description>DECLARE  CursorTemplate CURSOR&lt;br /&gt;FAST_FORWARD FOR       &lt;br /&gt;      SELECT Val1, Val2, Val3 FROM Table1&lt;br /&gt;&lt;br /&gt;OPEN CursorTemplate&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM CursorTemplate&lt;br /&gt;INTO      @Var1, @Var2, @Var3&lt;br /&gt;&lt;br /&gt;WHILE (@@FETCH_STATUS = 0)&lt;br /&gt;BEGIN&lt;br /&gt;      --do something here w/ your data&lt;br /&gt;&lt;br /&gt;      FETCH NEXT FROM CursorTemplate&lt;br /&gt;      INTO      @Var1, @Var2, @Var3&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;CLOSE CursorTemplate&lt;br /&gt;DEALLOCATE CursorTemplate</description><link>http://kajaxnet.blogspot.com/2008/12/looping-in-pl-sql.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-7814260619069609713</guid><pubDate>Thu, 27 Nov 2008 05:20:00 +0000</pubDate><atom:updated>2008-11-26T21:21:40.813-08:00</atom:updated><title>Fix Calendar Extender on IE 6</title><description>add this style&lt;br /&gt;.ajax__calendar_container { z-index : 1004 ; }&lt;br /&gt;&lt;br /&gt;add this javascript&lt;br /&gt;function dateEditor_OnShown(dateControl, emptyEventArgs)&lt;br /&gt;{&lt;br /&gt;           var shimWidth = dateControl._width;&lt;br /&gt;           var shimHeight = dateControl._height;&lt;br /&gt;           &lt;br /&gt;           // Open current popup&lt;br /&gt;           // Create the popup element&lt;br /&gt;           var dateEditorShim;&lt;br /&gt;           dateEditorShim = document.getElementById("dateEditorShim");&lt;br /&gt;           dateEditorShim.style.width = dateControl._popupDiv.offsetWidth;&lt;br /&gt;           dateEditorShim.style.height = dateControl._popupDiv.offsetHeight;&lt;br /&gt;           dateEditorShim.style.top = dateControl._popupDiv.style.top;                                                                        &lt;br /&gt;           dateEditorShim.style.left = dateControl._popupDiv.style.left;&lt;br /&gt;           dateControl._popupDiv.style.zIndex = 999;&lt;br /&gt;           dateEditorShim.style.zIndex = 998;&lt;br /&gt;           dateEditorShim.style.display = "block";&lt;br /&gt;           &lt;br /&gt;}&lt;br /&gt;   &lt;br /&gt;       // Function: dateEditor_OnShown&lt;br /&gt;       // Summary:  Handles the OnShown event of the dateEditor control. &lt;br /&gt;       // Inputs:   dateControl    -&gt; The date control object&lt;br /&gt;       //           emptyEventArgs -&gt; Empty event arguments raised by the date control&lt;br /&gt;       // Remarks:  Make sure to insert a shim of an empty iframe underneath the calendar popup container&lt;br /&gt;       function dateEditor_OnHiding(dateControl, emptyEventArgs)&lt;br /&gt;       {&lt;br /&gt;           var shimWidth = 0;&lt;br /&gt;           var shimHeight = 0;&lt;br /&gt;           &lt;br /&gt;           // Open current popup&lt;br /&gt;           // Create the popup element&lt;br /&gt;           var dateEditorShim;&lt;br /&gt;           dateEditorShim = document.getElementById("dateEditorShim");&lt;br /&gt;           dateEditorShim.style.width = 0;&lt;br /&gt;           dateEditorShim.style.height = 0;&lt;br /&gt;           dateEditorShim.style.top = 0;&lt;br /&gt;           dateEditorShim.style.left = 0;&lt;br /&gt;           dateEditorShim.style.display = "none";&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//add this in code &lt;br /&gt;calDOB.OnClientShown = "dateEditor_OnShown";&lt;br /&gt;calDOB.OnClientHiding = "dateEditor_OnHiding";</description><link>http://kajaxnet.blogspot.com/2008/11/fix-calendar-extender-on-ie-6.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3572037691942453128</guid><pubDate>Wed, 26 Nov 2008 02:48:00 +0000</pubDate><atom:updated>2008-11-25T18:51:57.688-08:00</atom:updated><title>Error in Calendar Extender because the master page has asp tag &lt;%%&gt;</title><description>Today, I just annoyed with this error.&lt;br /&gt;Every form which using Calendar extension works fine before. &lt;br /&gt;and somehow after I change the master page, it start to show an error said :&lt;br /&gt;&lt;br /&gt;=================&lt;br /&gt;System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. ). &lt;br /&gt;=================&lt;br /&gt;&lt;br /&gt;Luckily, with Tom's Help, I found the problem.&lt;br /&gt;It was on the master page on the header java script which use &lt;%= ... %&gt; to get the content from server....</description><link>http://kajaxnet.blogspot.com/2008/11/error-in-calendar-extender-because.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-3816301949601699506</guid><pubDate>Fri, 21 Nov 2008 03:39:00 +0000</pubDate><atom:updated>2008-11-20T19:39:33.060-08:00</atom:updated><title>Pomegranate Phone</title><description>http://www.pomegranatephone.com/default.html</description><link>http://kajaxnet.blogspot.com/2008/11/pomegranate-phone.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-854021761054153070.post-6215134326537815006</guid><pubDate>Thu, 20 Nov 2008 03:58:00 +0000</pubDate><atom:updated>2008-11-19T20:00:56.608-08:00</atom:updated><title>Url Rewriting VS Postback</title><description>To Resolve a problem in postback for url rewriting,&lt;br /&gt;you can use control adaptor and rewrite the form.&lt;br /&gt;&lt;br /&gt;public class FormRewriter : System.Web.UI.Adapters.ControlAdapter&lt;br /&gt;&lt;br /&gt;more information : visit : http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx</description><link>http://kajaxnet.blogspot.com/2008/11/url-rewriting-vs-postback.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item></channel></rss>