I'm trying to upload a file from a local folder to a Sharepoint Document Library using an ASP .NET web service.The code i used to connect to the site is given below.
using (SPSite sharePointtopLevelSite = new SPSite("http://localhost:414"))
When i try to run the service i get a File Not Found Exception as shown below.
System.IO.FileNotFoundException: The Web application at http://localhost:414 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.
at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
at UploadFileService.Service1.UploadFileToDocmentLibrary() in
I am getting the same exception when I try to create a WebSite also.While creating the website I mentioned the Location as FileSystem and saved it in the virtual directories folder.I'm unable to give the location as HTTP due to some backward compatibility issues with IIS6.Could this be the reason for the exception?
On an Aside,I'm able to upload a file using Console and Windows form appli
View Complete Post