Get Website Name using asp.net [closed]
i want to get website name using asp.net
i have one website that website contain generic handler page. so my client's website send http request to my site. that time i want to validate whether the request come from my client website or any other site?. so how to find the website name?
I want to create api to send and receive http request. so thats way i need this coding.
Request Example: http://MySite.com/GetRequest.ashx?mobile=9894380156&opt=RA&amt=10"
Response Example: Recharge Accepted
Websites don't have a name
property that you can pickup, but you can check various properties of the Request object and attempt to infer the origin of the request. For what I think you're trying to do you'd probably need to maintain a list of IP addresses/domains for your client sites and code some logic for this yourself.
Hope this helps.
I think what links between you and another website is the URL and you can use the information available in the new Uri("Your Site URL") and it can provide you with some valuable information about the url u are calling.
精彩评论