Monday, September 19, 2011

How to configure ASP.net with IIS

Having problem with IIS to configure the simple application

Code project: have the best project how to configure application pool. Click here

How to configure ASP.net with IIS

Having problem with IIS to configure the simple application

Code project: have the best project how to configure application pool. Click here

Saturday, September 17, 2011

Session in ASP.net

Code Project Example:
Very details description with example: Here
Here is a simple example how to enable session:

Friday, September 16, 2011

Database Configuration: MySql with Visual studio 2010

Database solution:
To configure the mysql database with asp.net from a remote pc here are the things you need to do:

1. Make sure the user have remote access privileged in that databse.
2. import the using MySql.Data.MySqlClient; from Project --> Add Referecne --> select Mysql data and click ok
3. Add the line using MySql.Data.MySqlClient;
4. Now use following connection string

string MyConString = "SERVER=localhost;" +

"DATABASE=mydatabase;" +
"UID=testuser;" +
"PASSWORD=testpassword;";
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
command.CommandText = "select * from mycustomers";
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read()){ string thisrow = "";
	for (int i= 0;i	 	thisrow+=Reader.GetValue(i).ToString() + ",";

}
connection.Close();
		}