icflorescu / iisexpress-proxy

A simple local proxy for accessing IIS Express from remote machines.
ISC License
741 stars 82 forks source link

permissions denied #27

Closed tamerin-tech closed 4 years ago

tamerin-tech commented 5 years ago

I'm getting this error (windows 10):

C:\WINDOWS\system32>iisexpress-proxy 5003 to 8099 IIS Express Proxy 1.4.9 Proxying http://localhost:5003 to network interfaces: VMware Network Adapter VMnet1: 192.168.88.1:8099 VMware Network Adapter VMnet8: 192.168.60.1:8099 Wi-Fi: 192.168.178.20:8099 vEthernet (Default Switch): 172.17.216.49:8099 Error: listen EACCES: permission denied 0.0.0.0:8099 at Server.setupListenHandle [as _listen2] (net.js:1262:19) at listenInCluster (net.js:1327:12) at Server.listen (net.js:1414:7) at Object. (C:\Users\ronta\AppData\Roaming\npm\node_modules\iisexpress-proxy\index.js:72:13) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) Listening... [press Control-C to exit] C:\Users...\AppData\Roaming\npm\node_modules\iisexpress-proxy\index.js:77 res.writeHead(500, { ^

TypeError: Cannot read property 'writeHead' of undefined at Server. (C:\Users...\AppData\Roaming\npm\node_modules\iisexpress-proxy\index.js:77:7) at Server.emit (events.js:198:13) at emitErrorNT (net.js:1306:8) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:834:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Tried also using console with admin rights

kellyethridge commented 4 years ago

For me the issue was that the regular IIS was already using port 80 for the default website. Once I stopped the website IISEXPRESS-PROXY began working as normal.

icflorescu commented 4 years ago

Gonna close this, as I believe Kelly is right. Just make sure nothing else is listening on the proxy port before starting it.