Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
naveed - 19 Oct 2005 21:46 GMT
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.
Peter Kelcey - 20 Oct 2005 21:38 GMT
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
naveed - 20 Oct 2005 22:17 GMT
Peter,

Thanks. That was indeed the problem.

Naveed

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.