I´m trying to connect to SharePoint 2010 site using C# but I receive this error
"The Web application at URL 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."
My code is
using (SPSite mossSagc = new SPSite("server")) [THIS LINE SEND THE EXCEPTION]
using (SPWeb mossWeb = mossSagc.OpenWeb())
mossWeb.AllowUnsafeUpdates = true;