Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Error running as Windows service; runs fine from console
From: Hajo Kirchhoff (mailinglists_at_[hidden])
Date: 2010-10-26 07:42:52


AFAIK Windows services by default do not have network access rights.
They run in a special "local" service account that does not allow access
to the network.

What I don't know is if "network" means any network including tcp/ip
here, or if "network" means only windows networking.

Try running your service under an interactive account and see if the
problem persists.

I'm sure there's more info in the appropriate windows newsgroups on this
topic.

Regards

Hajo

On 15.09.2010 06:10, Evan Burkitt wrote:
> I have a Windows application that uses ASIO to implement a server that
> listens on a TCP port. When I run it from the console it starts and
> operates without error. When I start the same application as a Windows
> service (it's written to be run either way) my call to
> boost::asio::ip::tcp::acceptor::async_accept() immediately calls the
> passed accept handler to report error 995: "The I/O operation has been
> aborted because of either a thread exit or an application request". This
> occurs even when I run the service under the same account as the
> logged-in user.
>
> I know I'm a bit sketchy with the details of my implementation, but I
> think this is at least as likely to be some Windows weirdness as an ASIO
> problem per se. I'm hoping someone else has encountered and fixed this
> problem before.
>
> Thanks.
>
> -evan
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net