I am trying to create Lists in Sharepoint site from my ASP.NET code using the webservice (http://test.sharepoint.com/_vti_bin/Lists.asmx).The code i use is as follows.I am sure i have enough access to that sharepoint site.
sharepoint.enhanced1.Lists wsLists = new SharePoint_Test.sharepoint.enhanced1.Lists();
wsLists.PreAuthenticate = true;
wsLists.Credentials = System.Net.CredentialCache.DefaultCredentials;
wsLists.AddList("Test_Code", "testing", 103);
This Code gives me the error:- The request failed with HTTP status 401: Unauthorized. Can anyone help me with this.