I tried to create a Document Library by calling a self-coded
Webservice.
The Webservice looked like this:
try
{
SPWeb site = SPControl.GetContextWeb(Context);
SPSite mysite=new SPSite(url);
SPWeb s=mysite.OpenWeb();
s.Lists.Add(library, "", SPListTemplateType.DocumentLibrary);
}
catch(Exception ex)
{
//Error-Code
}
In a C#-Windows-Project, everything works fine. But now I tried to
call the Webservice within an Access-Application and within a
Console-Application (C#). Both failed with the Error "Access denied"
at the Line "s.Lists.Add(...)"
The code of the Console-Application:
sps.DocumentHandler docHandler=new sps.DocumentHandler();
docHandler.Credentials=System.Net.CredentialCache.DefaultCredentials;
docHandler.CreateDocumentLibrary(url, name);
Can anybody help me?
Do you know someone who can help? Share a link to this thread on twitter, or facebook.