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::Error);
}



Regards,
Baranger Guillaume