I created a list in a sharepoint site (2007). I was trying to access that list from another machine in which WSS is installed. But I am getting the following error.
The Web application at
http://mysite.com/Test/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application
I used the following code
using (SPSite siteCollection = new SPSite("http://mysite.com/Test/"))
{
SPWeb web = siteCollection.OpenWeb();
SPList list = web.Lists["ListName"];
SPListItem oListItem = list.Items.GetItemById(Convert.ToInt32("1"));
lblDocumentName.Text = oListItem["Name"].ToString();
}
Any suggessions, why is error occurs