Reputation: 1
I'm from the Devops team. We created a dotnet subsite in IIS:
Requirement:
RouteConfig.CS looks like this:
routes.MapRoute("TaxSupport", "TaxSupport/{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
Output:
Output of www .site.com/subsite
Probe:
Upvotes: 0
Views: 174
Reputation: 1514
To deploy an application in an Azure Virtual Machine (VM) running IIS, you can follow below steps:
Azure Portal > Create > Select Server OS.
Use FTP to upload your application code to the VM.
Open the Internet Information Services (IIS) Manager and create a new website or web application in IIS.
Configure the website or web application to point to the location of your application code on the VM.
Configure any necessary IIS settings, such as the application pool and virtual directories.
To deploy a subsite under a site in IIS (Internet Information Services)
Create a Sample Web App and an API for Subsite.
And publish the application as shown below.
Copy these files and paste in the VM of Azure.
Open the IIS Manager on the server where you want to create the subsite.
In the left pane, expand the server node, and then expand the Sites node.
Right-click the site under which you want to create the subsite, and select "Add Virtual Directory".
In the "Add Virtual Directory" wizard, enter a name for the virtual directory and browse to the physical path of the content for the subsite. Click OK to create the virtual directory.
Right-click on the virtual directory and select "Convert to Application"
In the "Add Application" wizard, select the Application pool you want to use for the subsite and click OK.
If you want to configure the subsite with custom bindings, you can do so by right-clicking on the subsite and selecting "Edit Bindings".
Once the subsite is created, you can use the IIS Manager to manage and configure the subsite, such as setting up authentication, creating custom error pages.
And the web.config is using the same DB connection
<connectionStrings configSource="parentSite.config" />
Upvotes: 0