Thursday, July 2, 2009

Windows XP Explorer Right click menu does not popup or slow

I had this strange problem with right click on any file other than .cmd, .exe causing windows explorer to hang for like 45 seconds. After much searching on the web, came across this solution.
I used Reg Scan utility from Nirsoft, searched for registry values beginnning with \\ which denotes network path. Most the registry keys tied to these values where Shell, Open command for some registered file types and classes. When I pinged the IP address or network path, it was not going , so deleted all these entries. Bingo!!! Right click is now faster.

Also, the New menu under the right click context menu was taking some time. Some newly installed programs were causing this issue. If you don't recognize an entry in it, it is better to delete it. You can do this by using Nirsoft's Reg scan utility or shellexview from Nirsoft.

Thursday, June 4, 2009

Unspecfied Error OledbException

System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at

Cause:
You use Microsoft.JET OleDB Provider to open connection to Excel file or Access using windows forms or console application in .net/C# and you get this error.You most probably use a windows service account for running the application that uses above code.

Solution:
The Microsoft JET writes temporary files to the folder identified by TEMP user environment variable.For service accounts, due to server policies, this folder may be removed periodically.
The solution is to progammatically create this folder first if it doesn't exist so that this dreaded error doesn't come.

System.Environment.GetEnvironmentVariable("temp") will get you the variable identified by temp. Create this folder using this code piece.

if(!System.IO.Directory.Exists(System.Environment.GetEnvironmentVariable("temp")))
{
System.IO.Directory.CreateDirectory(System.Environment.GetEnvironmentVariable("temp"));
}

Hope this helps.

Wednesday, April 1, 2009

SVN - Unable to retrieve folder information from the server

If you have SVN installed, Web projects on VS.Net 2003 may not open correctly.
This is because SVN maintains source control information in a hidden folder called .svn.

This problem can be resolved.
Go to SVN settings and choose _svn instead of .svn directories.
Tortoise SVN may scare you saying you may lose working copies of existing projects.It will also require a system restart.There is a work around for not losing exising source control information.Here is what you should do.You can search for existing .svn directories using windows search and rename them manually to _svn. SVN will automatically reflect uncommited files by changing its image.

Once this is done, go to System Root\ Document and Settings \ User Name. Remove the folder called VSWebCache.This is a temporary folder which Visual studio creates for faster loading of web projects. Nothing will be lost on deleting this folder.

Now, if you open the web project, it will open correctly.