0 comments Wednesday, February 28, 2007

Hi,
Have a look this beautiful article which explains about the SQL-Injections .Every developer should take care about this special character to prevent the site hacking.

http://www.criticalsecurity.net/index.php?showtopic=13830

Regards
Pankaj

0 comments

Hi All,
Some time we need to generate random sequence of alphanumeric /nemeric/character for password/key etc. Below is static function which takes integer as parameter for the length of the output.


private static string RandomNumberGenerator(int length)
{
RandomNumberGenerator rng = RandomNumberGenerator.Create();
char[] chars = new char[length];
string validChars = "abcdefghijklmnopqrstuvwxyzABCEDFGHIJKLMNOPQRSTUVWXYZ1234567890"; //based on your requirment you can take only alphabets or number
for (int i=0; i< length; i++)
{
byte[] bytes = new byte[1];
rng.GetBytes(bytes);
Random rnd = new Random(bytes[0]);
chars[i] = validChars[rnd.Next(0,61)];
}
return (new string(chars));
}

Regards
Pankaj

0 comments Tuesday, February 27, 2007

Hi,
I came across an interesting site.which allow you to avoid the default google logo to been seen everday in your browser.Thanks to the guys created the enginepuller site.Not more about to say but still an interesting site.



http://enginepuller.com/engines/1203/Pankaj.aspx

Regards
Pankaj

0 comments

Hi,
Microsoft Windows Live OneCare: All-in-one security and performance for your PC contains

Antivirus
Antispyware
Anti-phishing
Firewall
Performance tune-ups
Backup and restore


Click below link to donload free 90 days trial of this software(Windows Live OneCare)

http://onecare.live.com/standard/en-us/default.htm

Regards
Pankaj

0 comments

Hi All,

Below is the link for asp.net 2.0 tutorial.Its really nice have a look at it

http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm

Regards
Pankaj

1 comments Sunday, February 25, 2007

Hi All,

This code sample shows how to convert a string to a byte array and and byte array to string.

//function to convert string to byte array
public static byte[] ConvertStringToByteArray(string stringToConvert)
{
return (new UnicodeEncoding()).GetBytes(stringToConvert);
}

//function to convert byte array to string
public static string ConvertByteArrayToString(byte[] byteArray)
{
return (new UnicodeEncoding()).GetString(byteArray);
}


Regards
Pankaj

2 comments

Hi All,

This function is used to convert file into byte array. some time we require to convert file into byte to save into database or send to other system using remoting.

private byte [] StreamFile(string filename)
{
FileStream fs = new FileStream(filename, FileMode.Open,FileAccess.Read);

// Create a byte array of file stream length
byte[] ImageData = new byte[fs.Length];

//Read block of bytes from stream into the byte array
fs.Read(ImageData,0,System.Convert.ToInt32(fs.Length));

//Close the File Stream
fs.Close();

return ImageData; //return the byte data
}

Regards
Pankaj

0 comments Tuesday, February 20, 2007

Hi All,

Virtual PC is now released for demo and download please click here

http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx

Regards
Pankaj

0 comments

Hi All,

With MSDN Virtual labs:
§ Evaluate and learn the latest Microsoft technologies
§ No installation or downloads required
§ No test machines required -- work on secure live servers
§ Labs for ASP.NET 2.0, Microsoft Visual Studio Team System, Expression Web, Windows Mobile and lots more
§ Try Express Labs to get a hands-on overview of select Microsoft technologies in just 30 minutes
Log on to
www.virtuallabs.in to get started

Regards
Pankaj

0 comments Thursday, February 8, 2007


Hi All,

Please check out Microsoft virus removal tools. It help’s get confidence and peace of mind with round-the-clock protection and maintenance—virus scanning, firewalls, tune ups, file backups, the whole nine yards. .
Click here to download the trial version :


http://www.windowsonecare.com/install/default.aspx?pc=FreeTrial

Regards
Pankaj