Forum


HomeHomePremiumPremiumAdministrationAdministrationUnable to delete the localhost aliasUnable to delete the localhost alias
Previous
 
Next
New Post
9/9/2019 2:44 AM
 

Hi Aderson,

I'm having trouble determining the rooturl on a live site in a module I've developed. 
The module determines the rooturl as follows:
string lUrl = Request.Url.Scheme + "://" + Request.Url.Host; 

When logged in the url is returned as 'localhost' instead of the correct site url.

I have tried deleting locahost from the site aliases in the site settings but it just reappears when I refresh the page.
Can I please ask if this is this normal? Is there some trick to deleting the localhost alias?

Best Regards,

Steve

 
New Post
9/9/2019 3:06 AM
 

Hi Steve,

This is a strange behavior. Check if "Auto Add Site Alias" check box is turned on or off. Make sure it is off. That is the only way I can see a portal alias getting created automatically.

Best regards,

Aderson

 
New Post
9/9/2019 4:12 AM
 

Hi Aderson,

Thank you for your reply.

'Auto Add Alias' was indeed turned on. I turned it off, then deleted the locahost alias, on refreshing it didn't reappear.

Better still, I've be unable to reproduce the issue where my module picked up 'localhost' as the rooturl.

Problem solved! :-)

Thank you once again.

Best Regards,

Steve

 

 

 
New Post
9/9/2019 5:12 AM
 

Great to help Steve!

Sometimes we come across some strange behaviors!

Cheers,

Aderson

 
New Post
9/16/2019 2:34 PM
 

Hi Aderson,

Sorry for a late reply, I was wondering why I wasn't receiving notifications from this forum, turns out the emails were hitting my Spam box, Oooooops.

Great that you're there to point out seemingly odd behaviours.

Thank you again and all the best,

Steve

 
Previous
 
Next
HomeHomePremiumPremiumAdministrationAdministrationUnable to delete the localhost aliasUnable to delete the localhost alias



Try FREE
30 days money back guaranteed