“You know, when you have a program that does something really cool, and you wrote it from scratch, and it took a significant part of your life, you grow fond of it. When it’s finished, it feels like some kind of amorphous sculpture that you’ve created. It has an abstract shape in your head that’s […]
ToLowerInvariant() and ToUpperInvariant()
According to business rule all footballer name and surname must be capitalized and not longer than 8 chars length. Very simple to develop. We develop a wrapper method for this job. Seems working fine. Until this morning. Game masters of the http://icanfootball.com noticed that some player names violates this business rule. After my first debuging […]
inherit In Child Applications
You can add the <location> element with the “inheritInChildApplications” attribute to the root web.config. This attribute will prevent child applications inherit some specified configuration from the root web.config. The attribute must be placed in the <configuration> section of the web.config. It looks like this: Referance: SectionInformation.InheritInChildApplications Property
Nice ad.
Linked server authentication problem
I was gettin this error when i try to execute a stored procedure from linked server : Executed as user: XXX\yyy. The OLE DB provider “SQLNCLI” for linked server “LSQL02” reported an error. Authentication failed. [SQLSTATE 42000] (Error 7399) Cannot initialize the data source object of OLE DB provider “SQLNCLI” for linked server “LSQL02”. [SQLSTATE […]
Invalid UserHostAddress
Today we’ve faced a weird problem. While we are debugging noticed that we can not get the IPv4 address of the requester. Instead we were getting IPv6. This code returns “::1” instead of “127.0.0.1”. After a little search this is about the Vista’s hosts file problem. And this is only a development issue for Vista […]
Visual Studio 2008 Apply Cutting To Blank Lines
While we are coding we used to delete blank lines with ‘Shift + Del’. Shift + Del shortcut is same as ‘Ctrl + X’. And if you copy something to clipboard before cutting the blank lines, it will be replaced by the blank line. You can change this behaviour with VS 2008 settings. Tools > […]
Switch bit field value with single T-SQL
You can switch the bit field’s value with single update statement by using exclusive or operator. Happy codding… Referance: ^ (Bitwise Exclusive OR) (Transact-SQL)
How to use a method from class in other namespaces at .aspx pages
You can use using statement to inculde different namespaces in you code behind file. But still you can’t call methods from classes that live in other namespaces (Different from you page class namespace) from you content pages (.aspx). To make this work you must use import namespace directive after you page directive. This can be […]
How to clear all HttpContext Cache items?
“HttpContext.Current.Cache” has a metod to remove items one by one with their key names. If you want to remove all items from the cache you can use this little code snippet to achive this task: Happy coding… P.S.: This techique don’t effect the output cached pages.