Web Connection
Web connection 6.07(now 6.10) and Vis studio 2015 problem
Gravatar is a globally recognized avatar based on your email address. Web connection 6.07(now 6.10) and Vis studio 2015 problem
  BrianWg
  All
  Jan 31, 2017 @ 10:21am

Following last post have loaded 6.10 and still have some weird problems

Removed the current West wind add in to Vs2015 Uploaded 6.10 & installed - seems to test out OK & the add in is added to Vs2015

Create new project "Test" - with "wc" extension - this completes and Test.wc works OK

BUT:

  1. No project file (pjx) has been created - wwwsnap1

  2. the "wc" extension wss not added to the VS text editor file extension list (added that manually)

  3. Then added a new page - Default.wc (into web directory) - wwwsnap2 shows the content of a right click

  4. Selected "Show Foxpro Code" - and got wwwsnap3 as expected

  • but the selected "Yes" to generate the page and got wwwSnap4 - "Exception has been thrown by the target........."

Research indicates that this can be caused by excessive Environmental paths - but this is a recent install and paths are less than 500 chs. 5. Selected "View in Browser" and got wwwsnap5 - "String cannot be of zero length......."

  1. Started up TestMain and ran localhost/Test/Default.wc and got wwwsnap6

  2. wwwSnap7 is the compiled source - which looks as if it has problems

Have uninstalled and reinstalled the addin using the vsix - no change Tried to use webpageparser.prg but couldn't understand how

Have made no changes from the original generated web.config -

</system.webServer>

Gravatar is a globally recognized avatar based on your email address. re: Web connection 6.07(now 6.10) and Vis studio 2015 problem
  Rick Strahl
  BrianWg
  Jan 31, 2017 @ 03:01pm

Hi Brian,

A few issues. It looks like you're mixing up different types of HTML mechanisms which are part of the issues you're seeing.

Scripts vs Pages

You are using a .wc page to try and execute a Page, which won't work. .wc is mapped to a Template so it will parse completely differently than a Page and will not work.

If you want to use Web Control Framework Pages, the easiest thing to do if you want to use Page is to use .wcsx as your extension or change the default Page script mode to 2 (for the mapped custom extension):

*** Default for page script processing if no method exists
*** 1 - MVC Template (ExpandTemplate()) 
*** 2 - Web Control Framework Pages
*** 3 - MVC Script (ExpandScript())
nPageScriptMode = 2

The default is 3 - MVC Script and that will not parse a Web Control Page.

No Project

The shareware version can't generate a project file due to foxpro limitations. It shouldn't matter you can run the main PRG file (and even if there is a project that's the recommended way until you build your distributable final file).

Page Generation from Addin

Not sure what is happening there, but as an alternative you run the page before you edit it. Running it will create the PRG, then you can edit.

FWIW here's what I tried and it works for me:

  • Add a new Web Control Framework Page test.wcsx
  • Open in editor
  • Path pointing at ~\Test_page.prg
  • Right click and choose Open in FoxPro
  • Prompt that file doesn't exist - offer to create - OK
  • Generated page opens in FoxPro

So not sure why this isn't working for you.

Even if this works, I still recommend you run the page first to generate the page. It's less error prone as runnign guarantees that all dependencies are available. The Shell PRG is created the first time you run the page.

Typical steps I recommend are:

  • Create new Page
  • Change the path to the PRG if necessary
  • Run immediately and test in browser

Also you might want to make sure the new addin is installed:

  • Go into VS 2015 and remove the West Wind Web Connection Addin
  • Shut down VS 2015
  • Find c:\wconnect\VisualStudio\WebConnection-Addin.vsix
  • Double click to run and install

Web Control Framework?

FWIW, if you are just starting out I would advise against using Web Control Pages. The recommended way forward is using MVC scripts and templates and is where we are putting our focus.

Web Control Pages will continue to work, but there won't be any major enhancements. While the technology is good, the uptake was very minimal as most people continued on with Code or MVC style development. Also lots has changed since the WCF was released in 2005 with much more focus on JavaScript client side technologies for which the MVC model with its raw HTML output is much better suited. Just something to consider if you are starting out from scratch.

+++ Rick ---

© 1996-2024