views:

102

answers:

2

Hi,

Is it possible to create a site on demand? So in the response of an event, such as button click. I want users to be able to see one site (all users), but users with assigned to a certain group will see two sites.

Also, when would I want to create a seperate web application?

Thanks

+2  A: 

Let's try to clear this up.

First, yes it's possible to create sites and webs programmatically, and in that sense you can do it in a click of a button event.

The second part of your question is not related to creating a sub site, it's related to permissions. Sub sites in SharePoint can have different permissions for different users.
So yes, users assigned to a certain group can see sub sites that others can't.

The third question can be answered by this Technet article.

Hope this helps.

Magnus Johansson
One point mentioned in the technet link: Provide separate content for anonymous and authenticated users. So if I want to deploy one actual web app (say stackoverflow.com), could I use two web applications so an anon user sees the a different set of pages? Also, why can't I optimise the dbs in the standard web app?
dotnetdev
A: 

Yes, you could use 2 seperate SharePoint web applications to provide access to a single site collection using different authentication providers. Enabling anonymous access for one web app and windows authentication for the other, you could use SharePoint authorisation to setup different permissions on site and pages for anonymous users as noted by Magnus.

JW