开发者

Sharepoint service to copy subsites from private site to another site

开发者 https://www.devze.com 2023-02-17 00:37 出处:网络
I have this two sharepoint web application that resides on the same server with different site collections and contents. What I wanted to do is to develop a service that will just be scheduled to run

I have this two sharepoint web application that resides on the same server with different site collections and contents. What I wanted to do is to develop a service that will just be scheduled to run on a specific server date and time.

The first web application is an internal site, only internal users are allowed to view the site. While the second web application is a public site, everone is allowed to view the site.

Now I wanted to do a synchronization between the two web applications on the following criterias:

1.) Retrieve information from internal site
-Group name
-Group description
-Group owner
-Group owner email
-Group url
-Discussion forum url

2.) Copy everything to the external site (public site) all the retrieved data that is 
    not found  in the external site
---------------------------------------------------
Example:
http://MyInternalSite.com with subsites 
Subsites:
    -AGroup
    -BGroup 
    -CGroup

And I have thi开发者_如何学编程s external sharepoint site
http://MyExternalSite.com with subsites 
Subsites:
    -AGroup 
    -BGroup

Notice that all subsites are there in both MyInternalSite.com and MyExternalSite except CGroup. I am planning to sync the two sites.

Let us say for example @ 10pm this evening I will copy all subsites found in the PrivateSite which is not found in the PublicSite. So basically at 10pm this evening 1 subsite will be copied to the PublicSite and that is CGroup.

My questions:

1.) Is there some kind of a service that would work or act for this purpose, 
    like maybe a sharepoint-api service?

2.) What are the possible things that I need to consider before I do this?

Thanks! :)


1.) There is no service that will do this for you automatically, but the Sharepoint API is the route you need to go; accessing directly at the code level and not via web services.

2.) You need to consider whether your private and public sites are on the same physical box. If they are on seperate boxes, things are slightly trickier.

As Furqan advises, you will need to consider permissions, as well as SPSite and Web detail.

Another important consideration is that you can't simply 'copy' the contents of SPSite and SPWeb items, etc, as this will cause all kinds of hell with GUIDs and so on, so your approach should be to create new SPSites and webs based on the information you gather programmatically from your source (private) site.

Best of luck!


  1. In 12 HIVE folder, _vti_bin folder is there which has all the services used by SPSite internally, hopefully you can find such service there but you need to investigate it by yourself.

  2. you can do it using sharepoint API and IMHO it would be better this way, the only problem I see in it is the permission granted in the created content, you need to set all permissions programatically as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号