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

N

naveed

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.
 
P

Peter Kelcey

Naveed,

VS 2005 ships with a built in web server called cassini. For security
reasons, this web server only handles requests from the local machine.
So you can only use it for debugging locally. If your application is
not deployed in IIS and you try to run the application from VS2005,
then this local web server takes over automatically. You can use
Cassini for debuging you app, but once you've finished, you will need
to upgrade it it to run under IIS.

You can add a web reference to you new webservice from another
application on the same machine. If you want to do this, you will
probably want to turn off the dynamic ports feature that uses a random
port number each time you run the app. To do this, select the property
grid for your project and you'll see a "use dynamic ports" property. If
you set this to false, you can hard-code a port to launch your app
under so that you can connect to it from another local application.

Hope that helps

Peter
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top