tjanczuk / dante Goto Github PK
View Code? Open in Web Editor NEWDante over WebSockets
Dante over WebSockets
I'm trying to test/learn the iisnode debugger (nodeinspector), but when I go to: https://rpsdante.azurewebsites.net/server.js/debug/
I get an error since it's trying to resolve the url to socket.io/socket.io.js to index-socketio.html.
Any thoughts?
WebSockets are successfully disabled using:
<webSocket enabled="false" />
After running:
c:\windows\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/webSocket
This is running on IIS8 / Windows Server 2012. I've tried turning off the firewall, that did not seem to help. There is nothing in \server.js.logs\0.txt (it is completely empty).
I am trying to browse either locally (http://localhost/dante/server.js) or over the network using Chrome (version 23.0.1271.97 and 24.0.1312.35).
MVC 4 / .net 4.5 is also installed and running fine on this machine.
To simplify things, I removed the web config completely from wwwroot.
Unable to establish WebSocket connection to ws://localhost/dante/server.js/ws WebSocket connection is closed.
I followed the instructions for hosting in IIS 8.0,
https://mysite/dante/server-faye.js
works fine
https://mysite/dante/server-socketio.js
fails with the following error
iisnode encountered an error when processing the request.
HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.The last 64k of the output generated by the node.exe process to stderr is shown below:
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read property 'prototype' of undefined
at Object. (D:\webapps\mysite\websocketsvr\node_modules\socket.io\lib\store.js:35:42)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (D:\webapps\mysite\websocketsvr\node_modules\socket.io\lib\manager.js:16:13)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
My setup...
Windows Server 2012/R2, IIS 8.5
Node.js (v13.12.0)
NPM (v6.14.4)
URL Rewrite (v2.1 - installed from package manager)
IISNode (iisnode-full-v0.2.21-x64.msi - obtained from https://github.com/azure/iisnode/wiki/iisnode-releases)
npm list
[email protected] D:\webapps\mysite\websocketsvr
+-- [email protected]
-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected]
-- [email protected]
+-- [email protected]
| -- [email protected] +-- [email protected] +-- [email protected] | +-- [email protected] | +-- [email protected] | +-- [email protected] |
-- [email protected]
`-- [email protected]
If I navigate to a deployed instance, I only see the html page, no debugger loads.
How can I use node-inspector on this?
I'm absolutely banging my head against a wall with nodejs + socketio in Azure, please help!
I haven't been able to get any chat or socket.io example working on Azure Web Apps yet...All the local stuff works fine in the Emulator and all that, but I have faith yours will work if I can just get it set up correctly.
I cloned the project, everything gets published fine and the page response comes through,
http://rpsnodetest.azurewebsites.net/index-socketio.html
but in the console on Chrome:
Uncaught SyntaxError: Unexpected token <
Looks like the rewrite rule is making the script redirect to the html and the socket script is now coming back as the index-socketio.html as well?
Any ideas? I've been staring at this too long and I just can't seem to make sense of it.
I appreciate the effort you put into making the article and the backing code, but I think you missed supplying readers with one essential bit of information relevant to WebSockets: the maxConcurrentRequestsPerProcess
setting.
WebSocket applications necessarily imply a high number of concurrent, long running tcp connections, and as far as I know, the defaults of IIS (IISNode?) is 1024. We had been experiencing HTTP 503s for months before realizing it was not our application doing this, but IIS.
So I think it might be wise to supply this bit of info to newcomers :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.