Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get ASP.NET development server port number

I need to get asp.net development server port number in C# method. can you help me?

like image 491
karaxuna Avatar asked Oct 22 '25 09:10

karaxuna


1 Answers

You can get it from Request:

Request.Url.Port

And this is not strictly port of Development web server, this is a port of currently used web server.

like image 176
Antonio Bakula Avatar answered Oct 24 '25 21:10

Antonio Bakula



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!