cannot complete this action
From: Robert Phillips (robert.phillips_at_myfloridahouse.gov)
Date: 11/16/04
- Next message: Michael Krause: "Re: Subsites in Companyweb"
- Previous message: Roger: "Re: Subsites in Companyweb"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 14:52:46 -0500
I'm getting the infamous "cannot complete this action" error in a console
application. It only happens on my production server, which is a web farm
setup. I cannot get the simplest example to work. Everything is working
fine Sharepoint wise, as are my custom web services. So I don't think it is
a server setup issue.
The blog referenced below talks about the same error, but this seemed to be
in the context of a web app. I actually have the same code working fine in
a web app, it's the console application that will not work.
http://weblogs.asp.net/dburke/archive/2004/06/09/151660.aspx
When use the code below using the string URL to the site, I actually get the
error "could not find global configuration data..." I switched this code to
use the site's guid from the database and I get the "cannot complete this
action..." error.
SPSite siteCollection = new SPSite("http://Server_Name");
SPWebCollection sites = siteCollection.AllWebs;
foreach (SPWeb site in sites)
{
SPListCollection lists = site.Lists;
Console.WriteLine("Site: " + site.Name + " Lists: " +
lists.Count.ToString());
}
Console.WriteLine("Press ENTER to continue");
Console.ReadLine();
- Next message: Michael Krause: "Re: Subsites in Companyweb"
- Previous message: Roger: "Re: Subsites in Companyweb"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|