PDA

View Full Version : Suggestion for Iprovement to WebApp Project Wizard



Ianv
10-May-2017, 11:50 PM
The Wizard which creates a new WebApp Project now allows for use of the non-default web-site, which is a great boon. However, it is still necessary to manually set up a Handler Mapping for *.wso. The Handler Mapping can be created by including the following code in the web.config file in AppHtml which the wizard creates.



<handlers>
<add name="CustomHandlerDF19" path="*.wso" verb="*" modules="IsapiModule" scriptProcessor="C:\Program Files (x86)\DataFlex 19.0\Bin\waswsvc.dll" resourceType="Unspecified" preCondition="bitness32" />
</handlers>



If the wizard was modified to do this, it would make life even easier and avoid support requests every time Developers create their first non-default web-site.
Ian
OK: I couldn't find the "m" key for the heading. Please use this one "m"

Harm Wibier
11-May-2017, 02:26 AM
Hi Ian,

I don’t see what you mean. The new WebApp Project wizard does create the handler mappings for you. Also when you select a different website. It was never necessary to do that yourself when creating a virtual directory through the studio or webapp administrator.

Note that they are not created in web.config but in the central applicationHost.config file. Have you checked your IIS Admin to see if they are there?

Regards,

Ianv
11-May-2017, 08:48 PM
Harm,
I created a Workspace (Test) then new web-site, tested that it was accessible from the web using iisstart then created a new WebApp using the Test web site. It failed on the .wso. I then looked in the ApplicationHost.config file and the two Handlers were there, see code below:
If you look at image1 you will see that they do not appear in the list of Handler Mappings (arranged in extension order) but there is a second identical web-site below the main site. Image2 shows that they are present in that web site which can be accessed by http://test.vagg.biz/test

The code in the ApplicationHost.config file is shown below"


<location path="Test/Test">
<system.webServer>
<handlers>
<add name="DataFlex 19.0 Web Services 64bit" path="*.wso" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:\Program Files (x86)\DataFlex 19.0\Bin64\waswsvc.dll" preCondition="bitness64" />
<add name="DataFlex 19.0 WebServices 32bit" path="*.wso" verb="GET,POST" modules="IsapiModule" scriptProcessor="C:\Program Files (x86)\DataFlex 19.0\Bin\waswsvc.dll" preCondition="bitness32" />
</handlers>
</system.webServer>
</location>


By changing the location path to "Test" the Handlers show up in http://test.vagg.biz and it works as expected.

I would suggest the wizard is treating non-default sites like the default site where a web-site needs to be created below the main web-site ("Default Web site"). I do believe the wizard needs some further work.

Ian

Harm Wibier
15-May-2017, 01:48 AM
The default behavior of the wizard is to create a virtual directory under the website. Note that you can leave (or make, since the wizard does suggest a name) the virtual directory name blank and it will take the root of the website.

Ianv
15-May-2017, 11:00 PM
Hi Harm,
Unfortunately, the wizard has a dropdown which forces you to select one of the existing web-sites. It won't allow you to clear the window so it is not possible to do as you suggest. If the dropdown always had an entry "Root" say, then this could be used to create a new website immediately below the root of the web-site.

Further, it does not appear to be creating a stand-alone Application but a virtual (sub)directory. The importance of this is that then you don't have control over the Bindings, for example.

So, there seem to be two alternatives for the wizard (but I'm far from an expert):

Create the Application manually then, when you use the wizard you would choose that Application and it would make whatever changes are required (eg: Handler Mappings) to the existing Application
Create a full new Application below the root with the Bindings, Handler Mappings etc.


As it is, the wizard is of little use if you are using other than the Default Web-site.

Ian

Harm Wibier
16-May-2017, 05:57 AM
It don’t think we completely understand each other.

The wizard cannot be used to create new websites under the Internet Information Service. We do not intent to rebuild the Microsoft management tools into our product. So you have to create the website with the IIS Management tools, set up the binding and point it to the AppHTML folder. Then you can use the wizard to select that website. If you leave the virtual directory blank it will assume you want to configure your webapp under the root of that website and it should add the handler mappings at the root of that website. If you put in a virtual directory name (or leave the default suggested name) it will create that virtual directory as an application under the selected website with the appropriate handler mappings at that point.

Ianv
17-May-2017, 02:23 AM
Thanks Harm,
Yes, we were at cross purposes. I assumed if it was able to make a web-site under the Default Directory then it would also make one under the root. Leaving the Virtual directory field blank achieves what I want. It is possible the wording on the wizard screen could be made more general, at present it is very biased towards creating a virtual directory beneath the Default directory.

Anyway, as ever, thank you very much for your help.
Ian