0

I have web Application when I´m implementing Recovery Password, so I send vía mail link to recover Password like this:

 string page = "<a href ='../SPA/cuenta/cambiarContrasena.html' >RecoveryPassword</ a >";

I get Google Advice:

The page you are trying to target is an invalid URL (http://../SPA/cuenta/cambiarContrasena).

Problem is that no redirects to my web page, how can I do to get exactly route I want? Regards

Luis
  • 47
  • 5
  • 1
    It should be absolute url. – Shyju Mar 29 '17 at 19:39
  • 1
    It should be a full URL, including the domain, and ideally, the protocol (http,https). If you are trying to build it via code, you will probably need to set the domain name as a string in some kind of configuration that you append the rest of the path to. – Bradley Uffner Mar 29 '17 at 19:42
  • How can I change it to absolute Url? just adding full path? it can´t be dinamyc? there is not a function to call url? because what happen if I´m in production or I´m testing in local, url should be different no? @Shyju – Luis Mar 29 '17 at 19:45
  • 1
    you can write code to get the base url of the site and use that to build the absolute url. See this http://stackoverflow.com/questions/1288046/how-can-i-get-my-webapps-base-url-in-asp-net-mvc – Shyju Mar 29 '17 at 19:46
  • It works Thankyou ! @Shyju – Luis Mar 29 '17 at 20:03

0 Answers0