Saturday, December 06, 2008
Visual Studio not Showing Errors
If not read on, recently I came up to a machine which was having Visual Studio error. Visual Studio was showing errors when a project is compiled but the error details (error code line number, error file) which we can use to identify the error are not displayed.
After trying out several things found the cause of it and thought to share it.
The problem was not with the project but with the path the project was kept.
In the machine the failing project was stored under a folder which was having parenthesis or brackets "(".
For example the solution path was like C:\ProjectsA(V1)\MyProj\.
The (V1) part was confusing Visual Studio making it stop displaying the error details.
If you also have the same problem simply remove the brackets by renaming the folder and reload your project to Visual Studio from the new path. The error details will be shown correctly.
Friday, November 21, 2008
Regular Expressions
In the resent past I had to write some simple regular expressions.
So thought of sharing them with you.
An EMail Address Validator
^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}[0-9]{1,3})(\]?)$
This will validate the entered EMail address.
A Password Validator
(?=.{6,})[a-zA-Z]+[^a-zA-Z]+[^a-zA-Z]+[a-zA-Z]+
This will validate the password to have at least 1 alphabetic character and 1 numeric digit, and altogether the password will be more than 6 characters long.
A Telephone Number Valdator
\d{4}\s\d{3}\s\d{6}
This will expect the telephone number to be in international format. For example (0094 777 123456).
A Simple Length Validator
[\s\S]{1,200}
This will allow only only 200 or lesser characters for input.
A Length Validator Which Works With Linefeed (Return, Enter)
^(.\n){0,500}$
This will validate and allow only 500 input even in a multi line field when linefeed (enter) is used in between.
A Date Validator
(0[1-9]1[012])[- /.](0[1-9][12][0-9]3[01])[- /.](1920)\d\d
This will check for the date validness. The date format should be mm/dd/yyyy to correctly validate by this.
If the date format is required as yyyy/mm/dd then use the following.
(1920)\d\d[- /.](0[1-9]1[012])[- /.](0[1-9][12][0-9]3[01])
Following are some good sites that you can refer for regular expression help.
Monday, November 17, 2008
Installing HyperV Integration Services

Thursday, November 13, 2008
Google Video Chat
Now you can video chat using GMail.
http://mail.google.com/videochat
Hyper-V
This is included in Windows Server 2008 as a role and enables you to create and manage virtual servers or machines.
A free version of this also available which is named as Microsoft Hyper-V Server 2008. This is a Windows core having only the Hyper-V functionality enabled.
If interested better visit the following sites.
http://en.wikipedia.org/wiki/Hyper-V
http://www.microsoft.com/windowsserver2008/en/us/hyperv-overview.aspx
http://www.microsoft.com/windowsserver2008/en/us/hyperv-faq.aspx
Monday, November 10, 2008
Enabling Forms Authentication in SharePoint

To change the authentication first you need to login to the Administrator site.
Now select Application Management and click on the link Authentication Providers under Application Security.


In the Edit Authentication page select Forms as the Authentication Type then in Membership Provider Name type AD, which we are to setup later. Then click the Save button.

To do the necessary changes open both Web.Config files. Both files needed to be updated with the same information.









Thursday, October 23, 2008
Correcting the error at User Control
Recently I got an error in an user control which I used to create users in Active Directory. This user control started to fail in SharePoint after deploying it in to a different server. It threw the following error,
- Exception has been thrown by the target of an invocation.
The Inner Exception was
- Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
After a bit of a struggle I found that the error was due to inappropriate setting in Web.Config file.
To correct it set identity impersonate to false.
<identity impersonate="false" />

-
If you are wondering a way to change the column header appearing in the .Net GridView control in run time then this post will help you to ge...
-
Last week I spent few hours to figure out why Samsung Galaxy S2 was not connecting to Samsung Kies through USB cable. I could browse phone c...