Saturday, September 22, 2018

JetBrains Rider, MacOS and ASP.NET Core Web Application Permission Denied on localhost Port 80

At work, I am on MacOS and using JetBrains Rider as the primary IDE. Switching to MacOS and Rider was not at all easy, still struggling most of the time. Switching between Windows and MacOS is more harder.

I wanted to run ASP.NET Core Web Application in localhost port 80, but it kept giving me permission denied error.
Permission Denied
Using the following command, I checked for any processes that use port 80, but unfortunately, there wasn’t any.
sudo lsof -i ':80'
Checked the firewall as well, and it was switched off. Then I realized, I was not running Rider as admin (sudo in MacOS). Just googled how to start a program as sudo, and there wasn't any straightforward option just like Windows has as Run as administrator. But using the terminal, did able to get to Rider run as sudo.
sudo /Applications/Rider\ 
run as sudo
But once it's started running as sudo, it is a fresh instance, meaning the IDE doesn't have any imported settings which is kind of bad. But it did solve the permission issue, web application successfully started running on port 80.

Thought this might help someone.

Happy Coding.


No comments:

Post a Comment