WebService with ASP .NET v2

A

Alex Levi

Hi,
I just upgraded Visual Studio 2003 with 2005.
I had a Web Service that worked perfectly in debug and with client version.

Now when I'm running it with debug (within VS2005) it's working good.
However with the debug I can see "ASP.NET Development Server" running.

When I'm trying to run my service from the client (Exe program), with the
"ASP.NET ... Server" running it's working.
But if I stop it, I'm getting an error "Unable to connect to the remote
server".

How can I run my client program (exe) that whould work with my service
without "ASP.NET Development Server" running?
 
J

Josh Twist

You're running your new web service as a File based web project. That's
why it's running under cassini (also known as the "ASP.NET development
server"). This little web server starts up on demand on a random port.
That's why sometimes it's there, sometimes it's not.

Using cassini for development is basically a bad idea as it runs with
the permissions of the user (and since they're a developer that's
usually Administrator) and not the limited permissions that we
applications usually enjoy.

So the best thing to do is to go back to using good old IIS:

- Setup a virtual directory in IIS and point it to your web service's
folder, e.g. http://localhost/myservice/
- Go into your web projects settings by right clicking on the project
and choosing 'Property Pages'.
- Select the Start Options menu item.
- Select 'Use custom server' and enter the url of the virtual directory
you configured into the Base Url field (e.g.
http://localhost/myservice/).

Now, you can debug and VS2005 will attach to IIS and you can hit the
virtual directory at any time.

Josh
http://www.thejoyofcode.com/
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top