We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ASP.NET Multitenant Applications Succinctly Code Sample 17 - Where/how to implement??

Hi

I'm trying to follow the scenario in ASP.NET Multitenant Applications Succinctly for a better grasp on the multitenant concept.

I'm having trouble figuring out where to put/ how to implement the code sample 17 on page 33.
Is it in the TenantsConfiguration class, in the constructor, a method or what??

I'm only implementing the HostHeader and QueryString TenantIdentifierStrategy

1 Reply

KV Karthikeyan Viswanathan Syncfusion Team March 27, 2017 12:12 PM UTC

Hi Morten,     
   
Thanks for contacting Syncfusion support.   
   
Please find the response in below:   
   
Query: “I'm having trouble figuring out where to put/ how to implement the code sample 17 on page 33.”   
   
 You need to add the code sample 17 in Application_Start method in Global.asax file. In code example 17 we have explained just to refer. We explained detailly in following code examples.   
Please refer to the below code snippet:   
   
<code>   
public class Global : HttpApplication   
    {   
        void Application_Start(object sender, EventArgs e)   
        {   
            // Code that runs on application startup   
            RouteConfig.RegisterRoutes(RouteTable.Routes);   
            BundleConfig.RegisterBundles(BundleTable.Bundles);   
            TenantsConfiguration.DefaultTenant = "abc.com";   
            TenantsConfiguration.TenantIdentifier =TenantsConfiguration.Identifiers.HostHeader;   
               
        }   
    }   
</code>   
<code>   
public static class TenantsConfiguration   
    {     
        public static String DefaultTenant { getset; }   
    //rest goes here      
           
}   
</code>   
   
   
Query : “Is it in the TenantsConfiguration class, in the constructor, a method or what??”   
   
TenantsConfiguration is a class. It contains the properties and methods for multitenant.   
   
Query: “I'm only implementing the HostHeader and QueryString TenantIdentifierStrategy   
   
 DefaultTenant member is added in code example 21. Please follow the code example one by one   
   
Regards,   
Karthikeyan V. 


Loader.
Live Chat Icon For mobile
Up arrow icon