Sunday, 2 April 2017

create a web.config file in the Node.js Tools for Visual Studio 2017

What is the correct way to create a web.config file in the Node.js Tools for Visual Studio 2017? Please use the following scenario specifics to frame your answer.

Note that I do not want to use IIS. I just want Node.js to be the web server at this point.


The Scenario:

When I try to run a Node.js sample app that I downloaded with git clone https://github.com/amirrajan/nodejs-chat and imported into the Node.js Tools For Visual Studio 2017 as File > Add > New Project ... (Other Languages > TypeScript > Node.js) > From Existing Node.js code, I get the message shown in the following screen shot, which indicates that BrowserLink does not work because Debugging must be enabled in web.config.

Next, I googled the problem and got the instructions from Microsoft at this link, which do not seem to correspond to the Node.js Tools for Visual Studio 2017 as described in the remainder of this OP as follows.

I confirmed that there is no web.config file by searching for the file name in Solution Explorer. I then tried to create a new web.config file by Right-Clicking on the NodejsApp1 Solution in Solution Explorer as follows:

But as you can see from the following screen shot of the resulting dialog box, this only resulted in the option to create Solution files:

Next, I Right-Clicked on the Project in Solution Explorer, as shown in the following screen shot:

But Right-Clicking on the project resulted in the following set of options, none of which mentions web config:



via CodeMed

No comments:

Post a Comment