Cannot connect to Web service or ASP.NET website from another mach

G

Guest

I have the simple Hello World web service running in debug mode on my
development machine
(XP Pro SP2). I'm using VS2005. I'm able to access it from my machine. When I
try to access it from another machine (also XP pro SP2), using the URL:
"http://nav:24035/WebServ/Service.asmx?op=HelloWorld", I get a "Cannot find
server or DNS Error" error.

There is no firewall on either machine. Windows firewalls are disabled. I'm
able to access this URL just
fine: "http://nav". I get the same exact errors with
http://nav:24035/webserv/service.asmx

Without the port, I get this error:

Server Error in '/' Application.

--------------------------------------------------------------------------------

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that
it is spelled correctly.

Requested URL: /webserv/service.asmx

I also tried a simple web site and I have the same problem. Why does VS2005
use a port other than 80?

Please help.
 
B

Bruce Barker

you have to open the port number on the windows firewall software on your
machine. look under control panel->services->windows firewall

the port number is not 80, because you configured vs to run the standadlone
test webserver which requests a free port from the portmapper (this means
the port number is not stable. i use iis so not sure if you can configure a
fixed port number for the test webserver).

-- bruce (sqlwork.com)
 
J

Juan T. Llibre

Hello, Naveed.

To specify the Web server for an already-created Web site,
open your local website with VS.NET and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

In the Property Pages dialog box, click the Start Options tab.
Under Server, click Use custom server.

In the Base URL box, type the URL that Visual Web Developer
should start when running the current Web site. You can use localhost.

From that point on, the VS.NET IDE will not use the internal web server,
but will use IIS to open your pages, i.e., if you are working on default.aspx,
it will be opened as : http://localhost/default.aspx

This assumes that you have IIS 5.1 installed on Win XP Pro.
If you don't have it installed, install it before you do this.

Also, now you will only need to open port 80 on the firewall,
instead of having to open all the ports above 1024, since the
internal web server ( which you won't use any more ) runs
on a random port above 1024.
 
N

Naveed Ahmed

Thanks, Juan, that fixed the problem.

Naveed



Juan T. Llibre said:
Hello, Naveed.

To specify the Web server for an already-created Web site,
open your local website with VS.NET and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

In the Property Pages dialog box, click the Start Options tab.
Under Server, click Use custom server.

In the Base URL box, type the URL that Visual Web Developer
should start when running the current Web site. You can use localhost.

From that point on, the VS.NET IDE will not use the internal web server,
but will use IIS to open your pages, i.e., if you are working on
default.aspx,
it will be opened as : http://localhost/default.aspx

This assumes that you have IIS 5.1 installed on Win XP Pro.
If you don't have it installed, install it before you do this.

Also, now you will only need to open port 80 on the firewall,
instead of having to open all the ports above 1024, since the
internal web server ( which you won't use any more ) runs
on a random port above 1024.
 
S

Scott Allen

Also, now you will only need to open port 80 on the firewall,
instead of having to open all the ports above 1024, since the
internal web server ( which you won't use any more ) runs
on a random port above 1024.

I believe the WebDev server drops any connections from a remote host,
so even opening the firewall doesn't help.
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top