localhost is redirected to www.localhost.com

Posted by Thiru under Regular Expressions on 3/9/2011 | Points: 10 | Views : 6239 | Status : [Member] | Replies : 10
Dear All,
Thanks to DotNetFunda & Members who are responding/suggesting/guiding us to get solution for our doubts.

My Question is:

While Executing my Asp.Net3.5 project from local host its redirecting
FROM http://localhost:2044/WebSite1/Default.aspx
TO http://www.localhost.com:2044/WebSite1/Default.aspx

and displaying an empty page in FireFox browser
and in ie browser it shows "the page could not be found"

Expecting your valuable reply in this regard

Regards,
Thiru




Responses

Posted by: Raja on: 3/9/2011 [Member] Starter | Points: 25

Up
0
Down
Dear Thiru,

Thanks for appreciation.

There is no reason why in the localhost the page gets redirected to www.localhost unless you have specified a redirect mechanism somewhere. Please have a look at the Application_BeginRequest event under Global.asax if some code is written that does this if not it might have been done in the IIS level.

Hope this helps

Thanks

Regards,
Raja, USA

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 3/9/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Let us see your code

Thank you for posting at Dotnetfunda
[Administrator]

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 3/9/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Thiru,

Create your app domain and check if you have mentioned www.localhost.com in your code.

Thanks
Karthik
www.f5Debug.net

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 3/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down



I THINK U mentioned www.localhost.com . . any were in ur code. . surely

Best Regard's
Prabhakar

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 3/10/2011 [Member] Starter | Points: 25

Up
0
Down
No, there is no code any where in the project matching localhost.

for your information: Even if i open a new project and just write hello in an html
and While Executing my Asp.Net3.5 project from local host its redirecting
FROM http://localhost:2044/WebSite1/Default.aspx
TO http://www.localhost.com:2044/WebSite1/Default.aspx

Any solution to fix - please reply me.

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chvrsri on: 3/11/2011 [Member] [Moderator] [MVP] Silver | Points: 25

Up
0
Down
Did u host your application on IIS? If so there would a default website set there. It could be the problem

Thanks,
Radha Srikanth

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 3/14/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks for your reply Srikanth,

Hope i did not host my application in IIS.
I just created a small project in Microsoft visual studio 2008 and execute it.

Please let me know how to host the same project(existing project) in IIS

Expecting your valuable reply in this regard.

regards,
Thiru

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 3/14/2011 [Member] Bronze | Points: 25

Up
0
Down
please check out this...

http://www.dotnetfunda.com/articles/article1247-how-to-host-aspnet-application-on-the-web-server-iis-.aspx

the above explanation is given by SheoNarayan Sir....i have already tried it, please try this and i hope it will help you.
thanks to SheoNarayan sir for the above tutorial !

Thanks
Akiii

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 3/14/2011 [Member] Starter | Points: 25

Up
0
Down
My OS is XP
in IIS i can able to create new Virtual Directory
there is no option to Add Web site

reply me in this regard - pls.
regards,
Thiru.

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gsolvers on: 3/14/2011 [Member] Starter | Points: 25

Up
0
Down
The issue has nothing to do with IIS. It is related to isseu in ASP.Net development server. Please try registering the asp.net again. Try the followign from .Net command prompt

aspnet_regiis -i



Best Regards,

VG
www.TeacherJi.com

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response