Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Access denied adding site collection to content database

$
0
0

Hi!

I'm getting the message "Sorry, this site hasn't been shared with you" whenadding a site collection to a content database. Here's the snippet:

                                        SPSite newSite = contentDatabase.Sites.Add(
                                            newSiteCollectionUrl,
                                            siteTitle,
                                            siteDescription,
                                            lcID,
                                            webTemplateCode,
                                            firstAdminLogin,
                                            firstAdminName,
                                            firstAdminEmail,
                                            secondAdminLogin,
                                            SecondAdminName,
                                            SecondAdminEmail);

This works just fine in development environment, but in quality the message is presented. I've read and tried a lot of solutions found on Google, but I couldn't found any that seems to work. Any tips?

Thanks


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>