Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am created many web application in asp.net. i published all the project in my local server (OS type -windows server 2008)through IIS. i am assigning website name like dev.sampleproject.com in the properties. After all work done i am giving dev.sampleproject.com in the browser it will not open the application,it will go to google search.But i am giving with server ip address (for example 233.23.23.233/1000/home.aspx) it will open.

I don't know Where i did the mistake while creating new website in IIS.




Please Help me......
Posted
Comments
Kenneth Haugland 8-Aug-12 7:44am    
Your DNS server?
Timberbird 8-Aug-12 7:58am    
If you intend to use this site for test purposes only, edit %WINDIR%\System32\drivers\etc\hosts file, adding record like
233.23.23.233 dev.sampleproject.com

If this site should be available from web, then, as Kenneth said, you need to register your site wih DNS server
ZurdoDev 8-Aug-12 9:53am    
You should post this as the solution. Very correct.
Sergey Alexandrovich Kryukov 8-Aug-12 15:07pm    
Right.
--SA
Sandeep Mewara 8-Aug-12 10:05am    
did you try:
giving dev.sampleproject.com/1000/home.aspx?

1 solution

The problem is even after you published your site in your local IIS, your computer still doesn't know the IP address corresponding to name "dev.sampleproject.com". Your browser tries to resolve the name, but DNS server obviously knows nothing about it, and there's no local source of this information.

In order to make your site availabe to anyone who knows just its name you need to register your site with DNS server, so that when someone attempts to reach "dev.sampleproject.com" this name gets resolved in your IP address.
But, as I suspect, you only want to test your site in your local environment. This is quite simple to achieve: Windows has a file named "hosts", located at
%WINDIR%\System32\drivers\etc
directory, that contains pairs "IP address - symbolic name". These records are also used by OS to resolve symbolic resource name to an IP address (as far as I know, it is checked even before request to DNS server). So, if you want all your requests to dev.sampleproject.com to be sent to your own machine, open this file and add new record:
[your IP]	dev.sampleproject.com
, for example:
233.23.23.233	dev.sampleproject.com
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900