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.
JSON serialization and deserialization
JSON stands for Javascript Object Notation and this is the new lightweight (then XML) standart for transferring data from one point to another over the network. Here you can find a sample web page codebehind to see usage in C#. Static methods in ‘Functions‘ class Happy codings…
SiteMapPath Url Querystring problem
When you are using the SiteMapPath control page Urls with the querystrings, pages don't show the control. Because url can't be matched with url in your Web.Sitemap file. To handle this situation, a little web.sitemap file trick is enough. Write the static part of your Url and define the dynamic querystring parameters at "reliantOn" attribute. […]