Hi all,
Till now we have seen how to implement Multi-Tenancy. Today let's discuss the web client in Multi-Tenancy Environment.
Now what changes do i need to do to run a Web client for a specific Tenant. Suppose i want to run web client for all the Tenants.
Objective of Post -
1) Configure the Web Server for the Service MultiTenancy.
2) Access the web client with all Tenants.
Steps -
1. I will be using a separate Web Server Instance of Web Client Created in Earlier Post.
* How to create a separate instance of Web Server, Refer to Post.
My Web Server Instance Name is MyWebClient2 as shown below.
2. Right Click the Web Server Instance you want to Configure and select Explorer.
Open web.Config File.
3. The Changes that we require are Port No and Service instance Name as shown below.
a) Search for <add key="ServerInstance" and Replace the Name as per your Service Instance Name.
b) Search for <add key="ClientServicesPort" and Replace the Port no of the Service Instance.
4. Save the File and Let's try to browse it. And yes i also end up with an error message.
"A tenant was not specified, but is needed because the system has multiple tenants. Contact your system administrator."
5.So what we need to do is Specify the Tenant ID that we want to use in Web Client.
The Default URL in my case is -
http://localhost:8080/MyWebClient2/WebClient/default.aspx
Which is something like -
http://ServerName:PortNo/WebServerInstance/WebClient/default.aspx
6. Now for MultiTenancy we need to change it to -
Generic Format -
http://ComputerName:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID
My case -
FOR IT Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=IT
FOR FB Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=FB
FOR Test Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=Test
7. I will access Tenant IT in web browser and From File Menu Send Shortcut to Desktop.
8. I will copy and Paste The Shortcut Two Times (For two other Tenants) and change the properties of shortcut as shown below.
I just changed the Last Parameter in shortcut i.e Tenant ID.
**** OTHER URL FORMATS ***********
For Specific Company -
http://Servername:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID&company=CompanyName
For Specific Page -
http://ServerName:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID&page=ID
For Specific Report -
http://ServerName:Port/WebServerInstance/WebClient/report.aspx?tenant=TenantID&report=ID
Hope you find the Post useful.
Regards,
Saurav Dhyani
Till now we have seen how to implement Multi-Tenancy. Today let's discuss the web client in Multi-Tenancy Environment.
Now what changes do i need to do to run a Web client for a specific Tenant. Suppose i want to run web client for all the Tenants.
Objective of Post -
1) Configure the Web Server for the Service MultiTenancy.
2) Access the web client with all Tenants.
Steps -
1. I will be using a separate Web Server Instance of Web Client Created in Earlier Post.
* How to create a separate instance of Web Server, Refer to Post.
My Web Server Instance Name is MyWebClient2 as shown below.
2. Right Click the Web Server Instance you want to Configure and select Explorer.
Open web.Config File.
3. The Changes that we require are Port No and Service instance Name as shown below.
a) Search for <add key="ServerInstance" and Replace the Name as per your Service Instance Name.
b) Search for <add key="ClientServicesPort" and Replace the Port no of the Service Instance.
4. Save the File and Let's try to browse it. And yes i also end up with an error message.
"A tenant was not specified, but is needed because the system has multiple tenants. Contact your system administrator."
5.So what we need to do is Specify the Tenant ID that we want to use in Web Client.
The Default URL in my case is -
http://localhost:8080/MyWebClient2/WebClient/default.aspx
Which is something like -
http://ServerName:PortNo/WebServerInstance/WebClient/default.aspx
6. Now for MultiTenancy we need to change it to -
Generic Format -
http://ComputerName:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID
My case -
FOR IT Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=IT
FOR FB Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=FB
FOR Test Tenant -
http://localhost:8080/MyWebClient2/WebClient/list.aspx?tenant=Test
7. I will access Tenant IT in web browser and From File Menu Send Shortcut to Desktop.
8. I will copy and Paste The Shortcut Two Times (For two other Tenants) and change the properties of shortcut as shown below.
I just changed the Last Parameter in shortcut i.e Tenant ID.
**** OTHER URL FORMATS ***********
For Specific Company -
http://Servername:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID&company=CompanyName
For Specific Page -
http://ServerName:Port/WebServerInstance/WebClient/list.aspx?tenant=TenantID&page=ID
For Specific Report -
http://ServerName:Port/WebServerInstance/WebClient/report.aspx?tenant=TenantID&report=ID
Hope you find the Post useful.
Regards,
Saurav Dhyani
Comments
Post a Comment