How to make Web Publish from nested applications to IIS?

Asked

Viewed 106 times

1

I am developing a project consisting of a portal and an administration interface.

In Visual Studio I have two ASP.NET projects, where one is the Portal and the other is the administration interface.

On my local IIS I have an application called Portalweb and within this application I have a (sub-)application called Portaladmin. This way, it is only necessary to ignore the route /Admin in the main application (Portalweb) and whenever I access the application address /Admin is called the application Portaladmin.

To illustrate, the IIS applications look like this

Portal a Portal.Admin no IIS

I want the applications on my server to look exactly like this. But I want to do this using IIS Webpublish. Currently, I can send the parent application (Portal) via Webpublish, but in the application Admin there is no option to configure it.

1 answer

1


I think the solution is simpler than you think...

First, run a profile of Web Deploy of the system Portal.

After that, a file similar to this should be generated (edited in Sublime Text).

<?xml version="1.0" encoding="utf-8"?>
<publishData>
  <publishProfile
    publishUrl="https://SERVER/msdeploy.axd"
    msdeploySite="PATH"
    destinationAppUrl="URL_OPEN"
    mySQLDBConnectionString=""
    SQLServerDBConnectionString=""
    profileName="Default Settings"
    publishMethod="MSDeploy"
    userName="USER" />
</publishData>

In this archive that is one of the places to do the magic. Where is the msdeploySite, change the value to Portal/Admin (Port address plus the suffix of your Sub Application, in your case /Admin).

This can also be done when importing the profile or publishing the system, just add the Sub Application in this place:

inserir a descrição da imagem aqui

Done this, just publish normally.

Just be careful not to give one override in Sub Application when publishing the Portal. In summary, do not delete files that do not belong to the Portal.

For those who don’t know how to set up Web Deploy, see this tutorial.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.