A new method is introduced in CSOM is CreateProjectSite()
When we try create to create Project Site using this method, sometimes we get this error "PJClientCallableException: WSSWebAlreadyExists" which means the project site we try to create is already exists.
But when we check this project site in Connected SharePoint Sites it does not exists.
Actually, whenever we create Project Site, that url is also saved in Site and Workspaces. We can check that in Site Settings->In Site Administration ->Click Sites and workspaces.
If the url we try to create is exists in that section then we get this error.
When we clean the environment, then also Sites and Workspaces content is not deleted so we will always manually delete the Project Site.
So, first delete Project Site url from Sites and workspaces section then execute the given below code:
foreach (PublishedProject pubProject in projectContext.Projects)
{
pubProject.CreateProjectSite(pubProject.Name);
projectContext.ExecuteQuery();
}
Hope this information will help you.
Thanks
0 Comment(s)