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.
Yep, makes perfect sense. That’s great information and answered some of the issues.
Here is my Application settings:
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:
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:
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:
Then the ASP Virtual Directory is defined as:
And, finally the Northwind Application is defined as:
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: