Log SQL Connections and Locks 25. June 2007 Vishwa SQL Server (1) You might have come across situation when you wanted to log SQL Connections and Locks for a particular day or period. In the following example, by using two tables and one stored procedure, you can log these activities and analyze at a later time. This stored procedure can be turned into a SQL Job for any given interval so that you do not have to manually run it. [More]
Calculate the table size and number of rows 1. June 2007 Vishwa SQL Server (2) At some point you might need to know, how many tables you have in database, number of rows in each table, size of table and indices. Following is a simple SQL Script which can provide you a snapshot of all such details. [More]
Server Error: HTTP Error 500.19 - Internal Server Error 26. May 2007 Vishwa .NET (23) You might have come across this error while working on a WCF project on Vista, IIS 7.0 with Visual Studio 2005. Actually Microsoft has tightened the security on VISTA and most of the time it is annoying when it asks your permission. Following is the detail error message I received while trying to run a WCF project, however I found a simple solution to fix it. [More]
AJAX Error: 'Sys' is undefined 7. May 2007 Vishwa .NET (16) If you are using AJAX enabled web site or project, you may come across this error message. I got this error message too and spent few hours to fix this problem. I tried finding all possible solutions on Google and finally concluded with following three steps. [More]
ADO.NET – Best Practices for Data Access 29. March 2007 Vishwa .NET (2) This article will first talk about top 5 best practices you should use while accessing database and then demonstrate how to properly use SqlConnection, SqlCommand and SqlDataAdapter objects while working with data using stored procedure or inline SQL for optimal performance. [More]
XML String, Dataset and Class Manipulation 27. February 2007 Vishwa .NET (1) I have written some useful ready to use functions in a Helper Class which can be used in XML string manipulation. These functions include following abilities :Get XML data string from/to a class Set/Remove CDATA in XML String Clear All/Limited Special Characters from XML string Set/Remove Root Node to XML String Get Inner XML/Text on Relative Path Get XML Document to/from an object Get Custom Dataset from/to XML string [More]
Dynamic Gridview Generation at run time 7. February 2007 Vishwa .NET (10) In this example, a Gridview is generated at run time with customer list with bound field columns. It also creates a HTML table dynamically. Most of the properties can be easily controlled at run time. I am using Customer Business Object which I created for my earlier posts. [More]
Error : Internet Explorer cannot download ... 16. January 2007 Vishwa .NET (0) If you see Error message : Internet Explorer cannot download "filename" from "Servername" Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again Then, this error usually occurs sometime while downloading a document which can be in form of PDF file, Doc file, XLS or text file. There are at least 4 possible reasons which can cause this error. I have also found their solutions. My assumption is - you are running your web site on IIS. [More]
IIS 6 File Upload/Download Issue 7. January 2007 Vishwa .NET (3) When trying to upload files over 200KB on IIS 6 the file may never upload and you either get an error or are sent to a blank screen. By default Windows 2003 server limits file uploads to about 200KB in size. To overcome this limit you must edit the IIS metabase.xml file. [More]
Managing Users and Roles 5. January 2007 Vishwa .NET (10) The following example will demonstrate as how to manage registered users, activate or deactivate them assign or remove role(s) in ASP.Net. My assumption is, you already have a page which allows users to register and now you would like to activate the user and assign a role so that they can login to your web site. I have created two page, which resides in Admin area of web site. You will be required to make some changes such as Master Page File, Namespace, Base Page and Content Place Holder ID etc. in order to properly compile and work with you project. The first page will allow you to search and find one or more registered users and second page will allow you to activate and assign a role. [More]