POST POST

OCT
25
2021

Using ngrok for ASP.NET

ORIGINALLY POSTED TO: https://blog.simontimms.com/2021/10/25/ngrok-aspnet

If you try to just use ngrok like this

1
ngrok http 1316

You're likely going to run into an issue when you browse to the website via the ngrok supplied URL that there are invalid host headers. This is because the local server is expecting headers for localhost and instead it is getting them for something like https://3fe1-198-53-125-218.ngrok.io. This can be solved by running with

1
ngrok http 1316 -host-header="localhost:1316"

Simon Timms

Email Email
Web Web
Twitter Twitter
GitHub GitHub
RSS

Looking for someone else?

You can find the rest of the Western Devs Crew here.

© 2015 Western Devs. All Rights Reserved. Design by Karen Chudobiak, Graphic Designer