Hello, it seems that the REQUEST.GetVirtualPath() doesn't work on the web ( Webconnection 6.2 )
THIS.cVirtualPath = LOWER(REQUEST.GetVirtualPath())
THIS.cServer = REQUEST.GetServerName()
It's ok on localhost
Are you running on IIS?
If not you have to set the Virtual=
for each of the applications in the yourapp.ini
file as most other Web servers don't provide the virtual base path info.
Yes IIS on Windows Server 2012 for the Web and IIS on Win 10 for the localhost test
Are you sure the URL is correct on the server? Your screen shot cuts off. You sure you didn't install the app into the root folder? In IIS the Application level node determines the virtual root of the application. Make sure it's an Application and not a Virtual in the IIS management console for the actual application sub-folder.
+++ Rick ---
Ok tks I misunderstand what a virtual path is but anyhow the way it works is not ok for my use.
Greenshop was setup manualy on the site level for the production Web Server so Greenshop is the root ( no virtual path.. ), on the dev computer the setup was done with the WC setup and created below the Default Web Site...
Not sure what you mean.
A virtual path is... well... a virtual path that depends on the Web site executing. It's not something you control, the Web Server determines the virtual once the application executes. For a root site the virtual path is /
for a subsite it's /greenshop/
in your case.
If you built your application without hard coding root paths to your applcation (ie. using ~/somepage.wwd
type links instead of /greenshoot/somepage.wwd
) this all works transparently. This is something I highly recommend and mention in the docs. You should make your applications as movable as possible without having to refactor paths both in terms of OS paths and virtual paths.
+++ Rick ---
My mistake was that I consider that the virtual path was the entry point of the site witch is correct on the dev machine installed with your setup
But this was not correct on the production server setup manually
So it's ok for me I use now REQUEST.GetServerName() to identify to calling web site
You can create an Application below your GreenShop
Web site to get the virtual if you want to match your dev site which gives you http://greenshop.com/greenshop/
and /greenshop/
as the Virtual. I think that's what you're looking for? However, I think it's much better to be running at the root without a subvirtual as the entry point as you are doing now - it's just much cleaner.
FWIW, if you want to your dev setup to match you can also create a new Web site on your dev machine and add a site with a host header ie. bound to dev.greenshop.com
. You can then add that domain into your HOSTS
file and map it to 127.0.0.0
. You then test your site with http://dev.greenshop.com
and a virtual of /
which will match both dev and live. Or you can just use IIS Express which generally runs under the root folder.
Lots of options... to do exactly what you want.
+++ Rick ---