Share via


Run once in an WSS/SPS site/area...

There are many times when you need to so somethign to a WSS site just after it has been created ... and before the users have get their sticky little hands on it.

Some of these might include setting up site groups, provisioning users into groups etc...

A nice way to do this is to use the ExecuteURL in the ONET.xml file of the site definition. This allows you to specify that a page be loaded right after the user clicks the OK button after they have picked the site template to use. This page (hint: create an ASP.Net page with some code to do your stuff) can sit in the _layouts directory somewhere and can programatically set your site up etc...

Here is the MSDN reference for it:

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tscamlexecuteurl_SV01113237.asp

Comments

  • Anonymous
    October 06, 2005
    Haven't tried it, but I would assume that the custom response won't be called if the site is created programmatically rather than via the site interface. (For instance, sites created by a custom app, Project Sever project workspaces, document/meeting workspaces created from within Office, etc.)

  • Anonymous
    December 02, 2005
    I have tried this.. and have made mods to the ONET.xml file in the SPSites directory. My aspx page never fires... and thoughts as to why?
    morna@biglimas.net

    Is there a way to debug this?