Current Request Url give my computer IP address not domain name

0 votes
I have little knowledge of networking, so I asked my sysadmin to host my application on a subdomain on our official website; for instance, downtoearth.com is the official website of my workplace. When I asked him for my computer's IP address, he just replied that my application was already accessible via myapp.downtoearth.com.

I can access my program from that domain, but my present issue is that attempting to get my current URL returns my computer's IP address. What I want is my domain myapp.downtoearth.com, not my IP address, therefore I tried using HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) and HttpContext.Current.Request.Url.Host, but it gave me the same result. Possibilities for resolving it exists?
Nov 3 in Cyber Security & Ethical Hacking by Edureka
• 12,290 points
42 views

1 answer to this question.

0 votes
Your application likely has a load balancer in the background. So, whenever we attempt to acquire Request.Url, the application will obtain the real request Url that webserver received, along with the port number. The Request should not be used. Url since it occasionally does not function as it should. Since the request is being handled locally in your case, Url is your IP. Request can be used in its place. UserHostName.
answered Nov 7 by Edureka
• 10,880 points

Related Questions In Cyber Security & Ethical Hacking

+1 vote
1 answer

How to find IP address of nodes in my network?

The IP address of the nodes connected ...READ MORE

answered Feb 9, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,210 points
1,792 views
0 votes
0 answers

find IP address by domain in go

I am using below code for an ...READ MORE

Feb 16 in Cyber Security & Ethical Hacking by Edureka
• 10,880 points
117 views
0 votes
1 answer

DNS resolution failed: server IP address could not be found

Update the DNS This method has gained a ...READ MORE

answered Mar 2 in Cyber Security & Ethical Hacking by Edureka
• 12,290 points
483 views
0 votes
0 answers

The page cannot be displayed because an internal server error has occurred on server

When  I've deployed the website I installed  ...READ MORE

May 23 in Others by Kichu
• 19,040 points
369 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,120 points
4,637 views
0 votes
1 answer

Is it possible to to create IIS Site and application Pool using Web Deploy

You can try and use the ServerManager ...READ MORE

answered Apr 20, 2018 in DevOps & Agile by ajs3033
• 7,280 points
1,233 views
0 votes
2 answers
0 votes
1 answer

IP address by Domain Name

The code you provided is accurate. Perhaps ...READ MORE

answered Feb 24 in Cyber Security & Ethical Hacking by Edureka
• 10,880 points
72 views
0 votes
1 answer

Can I determine the current IP from a known MAC Address?

ARP may be used to retrieve an ...READ MORE

answered Feb 20 in Cyber Security & Ethical Hacking by Edureka
• 10,880 points
79 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP