-2

I send a mail which includes activation link. When i open the program , this localhost changes everytime how can i get the address of localhost or fix it?

htmlBody = string.Format(" Hi " + userName + "\n Thank you for creating an account with RSS MANAGEMENT SYSTEM \n </ br>" + "Please click the below link to activate your account <br />" + "<a href='http://localhost:2386/ActivateUser.aspx?userName{0}&Id={1}'>Activate {0} </a>", UName, user_name);
leventkalay92
  • 573
  • 3
  • 11
  • 28

1 Answers1

2

If you are just testing your app is not much of a problem, you can either go to the properties of the project -> web tab -> set the Specific Port to a fixed number => thats it.

Or you can set up the iis and have the app running on a particular virtual directory and avoid the port number at all Configuring IIS

But... if you are running on a server to have the app public you will have to go with the second option to have a definitely URl

Eduardo Crimi
  • 1,551
  • 13
  • 13