Proper Target configuration for IIS

Is it possible to have multiple projects within a single host in IIS?

For example, I have a host defined in IIS called ‘sandbox’ that points to the sandbox folder in the inetpub directory on my local hard drive. (C://inetpub/wwwroot/sandbox) So, typing ‘sandbox’ in the browser will hit whatever code is in that folder.

Then, in order to have multiple projects under that host name, in Project Settings under Targets, can I define it like this:

Theoretically, you would type ‘sandbox/northwind’ in the browser to access this project. As far as the Target goes, it seems to be fine with it, as I get a success message when I click Test Connection. But, when I define a server connect and test it with debugging on, I get this error:

Seems the path to the namespace is incorrect, so wondering if there is a setting somewhere that could correct this, or is this not a good idea for other reasons? I was hoping to not have to set up multiple hosts for every single project in my sandbox environment.

If you have your Wappler project in a subfolder in IIS, you need to define an IIS “Application” from this subfolder. See:

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc772042(v=ws.10)?redirectedfrom=MSDN

Yep, makes perfect sense. That’s great information and answered some of the issues.

Here is my Application settings:
image

The server connect works when I test it and the page works within Wappler, but when I open it in the browser, it doesn’t work and has the following errors in the console:


As you can see, ‘northwind’ is missing from the path.
Not sure what I’m missing.

I got it working now, sort of. I deleted the project both from the server and project folder and started over and now it works in the server connect and when published, but won’t work in the Design view.

Any idea what could be causing that or how to debug?

Well, it seemed to fix itself… not sure what I did, except that my computer had some updates and rebooted. Opened Wappler this morning – and it’s all working as expected. So maybe a little hiccup with Wappler that closing and reopening took care of??

Thanks @George for your help! I learned some valuable tips for configuring IIS.

So for the record, besides defining an Application, you can also define a Virtual Directory. This gives you the ability to have a path multiple layers deep. You just need to have the Application defined at the bottom layer.

For example:
image
In this setup, Wappler, ASP and PHP are all Virtual Directories and AdventureWorks and Northwind (in both ASP and PHP Directories) are Applications.

The Wappler Virtual Directory is defined as:
image
Then the ASP Virtual Directory is defined as:
image
And, finally the Northwind Application is defined as:
image
As you can see, I defined the physical folder path with the exact same structure as defined in IIS.
Then in Wappler I defined the Target for my ASP.NET Northwind project as:


Hope this helps someone as much as it did me.