I need to get asp.net development server port number in C# method. can you help me?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With