Boost logo

Boost Users :

From: Guillaume Baranger (baranger_at_[hidden])
Date: 2007-11-29 04:16:56


Hello,

I need to create a server in dotnet application. I am using boost 1.33.1,
asio 0.3.8 and vc++ 7.1 .

The following code raises an "access denied" exception in a dotnet
application.
I have tested the same simple code in native c++ application, and it works.
Do you have any idea how to resolve my problem? Is there a way to use asio
in a dotnet application?

try
{
    asio::io_service io_service;
    asio::ip::tcp::acceptor acceptor(io_service);
    asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), 35454);
    acceptor.open(endpoint.protocol());
    acceptor.set_option(asio::ip::tcp::acceptor::reuse_address(true)); //
exception thrown here
    acceptor.bind(endpoint); // exception thrown here if previous line in
comment
    acceptor.listen();
}
catch(std::exception& excep)
{
 
MessageBox::Show(excep.what(),S"",MessageBoxButtons::OK,MessageBoxIcon::Erro
r);
}

Regards,
Baranger Guillaume



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