In web apps we generally press F5 or attach the process for debugging but what to do when it comes to Windows services ???
You"ll come across docs which tell you to do loads of steps for that, but I prefer the most easy way ;)
The process of attaching debugger can be done in just ONE simple line. Use
System.Diagnostics.Debugger.Launch()
The Launch() is a static method of Debugger class. It initializes the debugger.
Now where to put this line ?? Well I prefer in the OnStart() of the Windows service which acts as a starting point of the service.
So you are all set with debugging the Windows service. Happy Debugging :)
Monday, January 4, 2010
How to disable the default progress image of Infragistics webgrid
Hi, today I faced a unique challenge and that was to disable the default progress image on the Infragistics webgrid. Now if you try to sort the column by clicking on its header you see a small image in the middle of the grid...thats the progress image am talking about.
In my case the requirement was to show a custom progress-bar image, so I had to disable the default one.
Heres what I did.
1. Call a method from the InitializeLayout() of the grid on the server-side
Eg:- e.Layout.ClientSideScript.InitializeLayoutHandler =
2. Now the method signature in this case takes two arguments by default, thats comes pre-defined from Infragistics. The first parameter is the grid-name and the second is the columnID. So if your method name is DisableImage, then its signature in the javascript file will look like this
function DisableImage(gridName, colID)
{ }
3. Now what code should I use ??? This is the most important part. Use the code below as-is and your problem is solved
var oGrid = igtbl_getGridByID(gridName);
oGrid.DisableProgressIndicator();
Wholla done !!!!
In my case the requirement was to show a custom progress-bar image, so I had to disable the default one.
Heres what I did.
1. Call a method from the InitializeLayout() of the grid on the server-side
Eg:- e.Layout.ClientSideScript.InitializeLayoutHandler =
2. Now the method signature in this case takes two arguments by default, thats comes pre-defined from Infragistics. The first parameter is the grid-name and the second is the columnID. So if your method name is DisableImage, then its signature in the javascript file will look like this
function DisableImage(gridName, colID)
{ }
3. Now what code should I use ??? This is the most important part. Use the code below as-is and your problem is solved
var oGrid = igtbl_getGridByID(gridName);
oGrid.DisableProgressIndicator();
Wholla done !!!!
Friday, December 25, 2009
How to enable connection pool in MS Access
I found out a property in the connection string with which you can enable connection pool while using MS Access as your database
Provider=Microsoft.Jet.OLEDB.4.0;OLE DB Services=-1;Datasource=Filename.mdb
The property in the red color will enable connection pooling. The reason to suggest this is it improves the performance remarkably.
Provider=Microsoft.Jet.OLEDB.
The property in the red color will enable connection pooling. The reason to suggest this is it improves the performance remarkably.
Distributed transaction error in SQL Server 2005
I have seen problems like below popping up in the SQL Server 2005

Now the message sounds a bit confusing, the reason why I say so is you will be able to connect to the database and test the connection as well. But when you execute any query through your app you"ll get this message.... sounds interesting isn't it ??
The actual reason to this scenario is because SQL Server 2005 by default does not allow remote connections. To enable remote connections follow the steps below
1. Start > All Programs > Microsoft SQL Server 2005 > Configuration Tools> Surface Area Configuration
2. Select Surface area Configuration for Sercies and Connections
3. Click Root Sql Express > Database Engine > Remote Connection .
Select Local and Remote Connection
Select Using both TCP/IP only
Click OK/Apply
Now the message sounds a bit confusing, the reason why I say so is you will be able to connect to the database and test the connection as well. But when you execute any query through your app you"ll get this message.... sounds interesting isn't it ??
The actual reason to this scenario is because SQL Server 2005 by default does not allow remote connections. To enable remote connections follow the steps below
1. Start > All Programs > Microsoft SQL Server 2005 > Configuration Tools> Surface Area Configuration
2. Select Surface area Configuration for Sercies and Connections
3. Click Root Sql Express > Database Engine > Remote Connection .
Select Local and Remote Connection
Select Using both TCP/IP only
Click OK/Apply
Tuesday, November 25, 2008
Drawbacks in webservices (.Net) asmx files
Hi,
Heres some crisp analysis about web services implemented on .Net platform. Over a period of time using this technology, I found these observations
1. An ASMX page contains a complete set of information that describes how the data will be formatted, how to wrap the data in a SOAP header, and how to prepare it to be sent. However, it doesn’t tell you how to deliver it over the transports and to use a specific type of security.
2. ASMX provides the way for interoperability but doesn’t fulfill some of the basic requirements; for example, it does not provide or guarantee end-to-end security or reliable communication
3. Another limitation of ASMX is the tight coupling with the HTTP runtime and the dependence on IIS to host it.
4. ASMX service is instantiated on a per-call basis
Heres some crisp analysis about web services implemented on .Net platform. Over a period of time using this technology, I found these observations
1. An ASMX page contains a complete set of information that describes how the data will be formatted, how to wrap the data in a SOAP header, and how to prepare it to be sent. However, it doesn’t tell you how to deliver it over the transports and to use a specific type of security.
2. ASMX provides the way for interoperability but doesn’t fulfill some of the basic requirements; for example, it does not provide or guarantee end-to-end security or reliable communication
3. Another limitation of ASMX is the tight coupling with the HTTP runtime and the dependence on IIS to host it.
4. ASMX service is instantiated on a per-call basis
Subscribe to:
Posts (Atom)
