The techie in me RSS 2.0
 Saturday, April 10, 2010

String.Replace is not case insensitive, so what is the best way to do it. There are several ways, if I think of the quickest one it is using regex.

using System.Text.RegularExpressions;string 
string str = "The quick brown Fox jumps over the lazy dog";
string strReplace = "cat";
string result = Regex.Replace(str, "fox", strReplace, RegexOptions.IgnoreCase);

-Rujith

 

Saturday, April 10, 2010 10:18:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Coding
 Monday, February 08, 2010

I had lot of trouble in my last project due the html body onload event. The aspx pages were relying lot on this event ( I agree its not the best way, but we don't have the budget and time for to rebuild the entire site). These sites were AJAXyfied recently using Telerik RadControls, and were not working in FireFox. I must admin Telerik controls are really good, its makes your job very easy in AJAX world. Though I don't like their quarterly release idea. YES, they release a new version every quarter...

So the problem in AJAX is, the page can be loaded asynchronously, so when the onload event on the body is fired the controls may not be ready, so you get null exceptions.

The best way I found is to use the built in ‘pageLoad()’ method(this is a reserved method). This will be called once all AJAX load events are finished. Remember you can use this only in AJAX pages. Also this is consistent in different browsers. (If you are going with FireFox you have to use window.load=function() instead onload=function())

Coding is fun

-Rujith

Monday, February 08, 2010 12:32:00 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding
 Sunday, February 07, 2010

Maximum request length matters when you want to allow upload/download of large files.

This is one of the major change in IIS7. In previous version the default is 4MB, in IIS7 its 28.6MB. So when you deploy your ASP.NET application you will see that it will work for files larger than 4MB, but will give as soon as you cross the 28MB.

In IIS 7, the attribute has been changed to maxAllowedContentLength and it has to appear in <system.webServer> section (as for all IIS 7 settings). The complete attribute will look something like this…

<system.webServer>
<
security > <requestFiltering> <requestLimits maxAllowedContentLength="3072000000" /> </requestFiltering> </security>

 

Sunday, February 07, 2010 12:18:00 AM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Coding | WCF
 Tuesday, January 12, 2010

I ran into trouble during deploying a WCF service on IIS7 with https.

There's a great resource on all things WCF Security related here

http://www.codeplex.com/WCFSecurity

This helped me a lot.

Tuesday, January 12, 2010 7:50:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
WCF
 Sunday, January 10, 2010

When you are working with Active Directory the following may be useful,

Import and export directory objects – CSVDE & LDIFDE
ex: from the command prompt try CSVDE -f C:\Exportfile.csv
more help is available in this KB article.

Another useful utility while working with Active directory and LDAP(Light Weight Directory Access Protocol) is ADSI Edit (adsiedit.msc). Nice link if you want to know in detail.

Also found this interesting link with attributes and its description for AD Users. see here. And check this script to list all User object attributes in active directory schema.

Sunday, January 10, 2010 10:23:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding
 Friday, December 04, 2009

ADO.NET data provider for Oracle is dying. ADO.NET team has decided to kill(deprecate) it in .NET 4.0. How sad isn’t it? Read more about the story on ADO.NET team blog

Though sometimes I feel its unnecessary to have a duplicate copy of Oracle data provider. Most of the people use ODP.NET or some other third party client. Nice comparison here (and that is why people don’t use .NET Oracle client :))

One very bad thing I noticed about these providers is both of them need Oracle client installed. For the MS provider(System.Data.OracleClient) the minimum requirement is Oracle 8i Release 3 (8.1.7) Client or later. Check the requirement in detail here System Requirements (Oracle).
For the ODP.NET Oracle client version 9.2 or later.

Its not always possible to install a large application like Oracle client in some scenario, so there is an alternative without installing the Oracle client, use Oracle Database Instant Client. Just put Oracle Instant Client in the same folder as your executable file.

-Rujith

Friday, December 04, 2009 3:58:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding | Database
About me
Name : Rujith Anand Send mail to the author(s)
Archive
<April 2010>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678
Blogs I read
Disclaimer

Disclaimer
Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.

© Copyright 2012
Rujith Anand

Statistics
Advertisement
All Content © 2012, Rujith Anand