ForumForumMainstream Foru...Mainstream Foru...General Discuss...General Discuss...Multi-tenantMulti-tenant
Previous Previous
New Post
 8/14/2020 6:15 PM
 Modified By Nicke  on 8/14/2020 6:23:16 PM
OK, I figured out from the factory that I had to update the web.config:
add key="SplendidProvider" value="HostingDatabase" /
add key="SplendidHostingProvider" value="System.Data.SqlClient" /
add key="SplendidHostingConnection" value="Data Source=Mini***;initial catalog=sites;user id=SplendidCRM;password=***********" /"

In the sites db, I have 2 rows in the DBOvw view:
Hosting_Site / Splendid_Provider / Connecting_String / Expiration_Date
Greenvalley / HostingDatabase / " .. catalog=greeenvalley..." / 01/01/2025
Redvalley / HostingDatabase / "... catalog=redvalley ..." / 01/-1/2025

The tenant db's are created and the connection strings have been tested.

First run, login screen is displayed as when it can't connect to a db.
I can't find the error log. How can I see what went wrong.
How would I select only 1 of the 2 entries in the SPLENDID_HOSTING_SITES?


New Post
 8/14/2020 11:12 PM
I am new on this Forum, and I just figured out that a paste that you did of the web.config appsettings was blank, the only way I could see it was with "quote". Sorry for so many questions.

I am making progress with what you gave me. The login page now reports
Unsupported factory HostingDatabase

I think I have the CONNECTION_STRING right, but I am not sure what goes in the SPLENDID_PROVIDER column. I simply put 'HostingDatabase'.

Also, in the HOSTING_SITE column, I put the domain url:, with the ip configured for the app root. This is set up as the host for this tenant in IIS and works with web.config set for System.Data.SqlClient and connect string in appsetings.

If there is a document that explains the factory options, that would be great, otherwise I am still stuck with the above error. Let me know!
New Post
 8/18/2020 3:18 AM
Looks like you are almost there. SPLENDID_PROVIDER column in the database should be set to System.Data.SqlClient.

Yes, the HOSTING_SITE is the domain.

There is no documentation for this feature as it is typically a feature that only we use. But hopefully we have given you enough answers to get it working.

New Post
 9/8/2020 4:27 PM
Thanks for your help. This works perfectly. Corent offers a SaaSification solution of which multi-tenancy is a key feature. This architecture that allows multiple database access methods through a web.config settings is great.
New Post
 9/15/2020 8:37 PM
Ok, I am successful with case: "HostingDatabase" Thanks!!!!!

I want to simplify by extracting only the URL subdomain as the initial catalog db and build the connect string as sConnectstring (in Factories).

http:\\ where the Nicke db exists in server.

So SplendidCRM selects the database associated with the subdomain without having to lookup from db view. Below is example code to grab the subdomain as 'domains[0]'

Any guidance would be appreciated.

Uri fullPath = new Uri("http://subdomain.domain.topleveldomain/index.html");
string hostname = fullPath.Host; // returns "subdomain.domain.topleveldomain"
char[] separators = new char[]{'.'};
// returns {"subdomain","domain","topleveldomain"}
string[] domains = hostname.Split(separators);
string subdomain = domains[0];
string domain = domains[1];
string tld = domains[2];
Previous Previous
ForumForumMainstream Foru...Mainstream Foru...General Discuss...General Discuss...Multi-tenantMulti-tenant