[Solved] User activation link points to localhost in IIS

Last Reply 28 days ago By Kibock

Posted one month ago

Hi,

Based on this article: Send user Confirmation email after Registration with Activation Link in ASP.Net

I am having problem to get the correct link of activation. It always points to localhost even if i use internet domain.

string activationLink = "<a href = 'http://www.test.com/SignUpSuccess.aspx?ActivationCode=" + activationCode + "'>Click here to activate your account</a>";
Msg.Body = Msg.Body.Replace("%activationLink%", activationLink.ToString());
<span style="font-family:Georgia; font-weight:bold; font-size:18px; color:#000000;"> %activationLink% </span>

the link received on email always points to the following:

http://localhost:64278/SignUpSuccess?ActivationCode=2e67380d-7ccb-4934-a5dd-7fa73e82060b

I need the following:

http://www.test.com/SignUpSuccess?ActivationCode=2e67380d-7ccb-4934-a5dd-7fa73e82060b

Many thanks in advance

You are viewing reply posted by: Kibock 28 days ago.
Posted 28 days ago

The issue occurs when i tried to publish the website in the wrong way (transfering file and folder to production server manually without using the publish tool for example Visual Studio).

So that is why the localhost link was still remaining.