Hi,<BR><BR>I created a web service project and connected to a SQL Server database to retrieve the records. But when I click on “invoke the webservice”, I see “Page cannot be displayed error.”<BR>Why do I see this? What is the problem?<BR><BR>Thanks,<BR><BR><BR><BR>[WebMethod]<BR> public Test[] CreateTest()<BR> {<BR> SqlConnection conn = new SqlConnection("Server=SERVERNAME;User=user;Databas e=db");<BR> SqlCommand cmd = new SqlCommand("SELECT * FROM test",conn);<BR> conn.Open();<BR> SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.Default);<BR> ArrayList TestsToReturn = new ArrayList();<BR> int index = 0;<BR> while (reader.Read())<BR> {<BR> Test newTest = new Test ();<BR> newTest.Description = reader ["test_desc"] as String;<BR> if (reader["test_id"].GetType()!= typeof(DBNull))<BR> { <BR> newTest.Id = Convert.ToInt32(reader["test_id"]);<BR> }<BR> else<BR> {<BR> newTest.Id = -1;<BR><BR> }<BR> TestsToReturn.Add(newTest);<BR> index++;<BR> }<BR> conn.Close();<BR> return TestsToReturn.ToArray(typeof(Test)) as Test[];<BR> }<BR> <BR>