web page and URL

G

Guest

In asp.net 1.1, when i use to run the web page. I could change the localhost
to my computer name and web page use to run, so for example if the web page is
http://localhost/app/default.aspx

I can change it to http://mycomputername/app/default.aspx

but now in asp.net 2.0

http://localhost:3223/app/Default.aspx

if I change localhost to my computerName like

http://mycomputername:3223/MSCCTrackerDemo/Default.aspx


I get an error that "page cannot be displayed". Is it possible to run the
web page by changing the local host to my computer name in asp.net 2.0

Thanks
 
M

Mike Placentra II

if I change localhost to my computerName like

http://mycomputername:3223/MSCCTrackerDemo/Default.aspx

I get an error that "page cannot be displayed". Is it possible to run the
web page by changing the local host to my computer name in asp.net 2.0

That's probably because Microsoft tries to prevent us from using the
development server as a production server, which I guess someone might
try. Changing the host name could route the request through your
router and back to your computer, instead of your computer handling it
alone with localhost. The development server can be obtained for free
with Visual Web Developer Express, but the only practical option for
an ASP.net production server (in most cases) would be IIS which
Microsoft will make profit off of more directly.

-Michael Placentra II
 
M

Mark Fitzpatrick

You can still do this in ASP.Net 2.0. The only thing that has changed is VS
2005 includes a built-in web test web server. This is good for people
without IIS, but if you have IIS it's better to use that since there are
some differences between the two.

I believe that the test server may not be capable enough to check the
computername first. Keep in mind, localhost is a universally understood
loopback to the non-routable 127.0.0.1 IP address. If I remember correctly,
being able to the machinename takes an extra mechanism that isn't supported
by this test web server.

If you have IIS, definitely use it instead.Under the project properties
(this is with the Web Application Project, don't know if it's there for the
Web Site project) there's a tab called Web. Under that tab there's an option
to use the built-in VS test server, or to use IIS instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top