Having Trouble testing the Upload Control Locally?

Having Trouble testing the Upload Control Locally?

One of our mentoring clients has been having trouble testing the Upload control on his local machine. It would also return an error, that indicated that no files were selected/returned. Once published the exact same code worked perfectly. After fighting it for a couple of hours we wrote it off as just one of those weird windows security issues that are so hard to find.

This week a second mentoring client ran into the same problem, as well as having issues with using a few advanced JavaScript libraries. So it was time to get to the bottom of this issue. Our client actually gets the credit for finding the solution.

Did you know that starting with v24.0063 (Update 2), when you install WebDev on a development machine, if it doesn’t detect an existing webserver, it installs IIS Express as a dedicated server, instead of the normal IIS? Sure it right there in the online help   I will confess this is the first I have ever heard of IIS Express.

As most of you know, we are not exactly IIS fans, and NEVER use it for production work, but when PCSOFT got the IDE installer to the point that it would automatically install and configure IIS on my development machine, which I believe happened with v22 or v23, I did switch over to using IIS on my development machine. For development I don’t need to worry about virtual hosts, SSL, redirects, etc. etc. and I just let WebDev automagically handle what it needs to do. For production, we prefer Apache as we are much more comfortable with configuring advanced setups, etc.

Anyways …. Since I already had IIS on my development machine, as I suspect most of you that have been around for a few versions also do, when I upgraded to v24 and now v25, it configured itself to use the existing IIS installation and I had no issues. But for folks that are just now finding the joys of WebDev the IDE is installing IIS Express instead.

According to the PCSOFT help page, I linked to above, IIS Express does not have a configuration interface, you have to make any changes via the XML config file. Apparently, there is something in that configuration or inherent in the IIS Express itself that causes issues with the Upload control and some other advanced things. With my “vast” IIS knowledge I decided to not even attempt to figure that out. A much easier solution was to just switch the development machine to use regular IIS instead of IIS express.

So where and how do you do that? From the WebDev Application Server Admin program, which is found on the tools ribbon bar of the IDE. Tip: You have to have a WebDev configuration open for this to be visible, if you are using WinDev with WebDev integrated, instead of WebDev as a standalone IDE and if you aren’t why the heck aren’t you?

2020-05-01 09_00_31-Desktop

From the Advanced tab, click on the server button and you will see the option for the two IIS options as well as Apache and other.

2020-05-01 09_03_46-Desktop

If IIS Express is selected and you are having issues with the Upload control, switching to IIS has resolved the issue for our two clients (not exactly a scientific sampling but a 100% success rate is still great!)

When you switch it might go through and start installing and configuring IIS. Before we could get completely operational again, we had to also return to the Advanced tab and go through the Diagnostics. Let it test both the General Server and a specific site, and if you get any red X’s instead of green Checks, use the correct button to correct them.

2020-05-01 09_09_08-Desktop

We had to go through this a couple of times, as well as closing and reopening WebDev and recompiling our project before everything was completely happy, but eventually, we go back to the point where we could press the Go button and test the site. And guess what? The Upload control now worked perfectly when testing on the development machine.

I have shared this with PCSOFT support, hopefully they will be able to confirm that it is a configuration issue with IIS Express and provide a solution in the future.




Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s