Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8742949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:35:26+00:00 2026-06-13T11:35:26+00:00

I am working with a native library ( libzmq ), which is called by

  • 0

I am working with a native library (libzmq), which is called by a C# wrapper (clrzmq). It is being used by an IIS web application (IIS 7.5, Windows Server 2008 R2, ASP.NET MVC 3).

The native library makes a call to CreateEvent() but this fails when running the web application using the ApplicationPoolIdentity. It works if I use the LocalSystem account instead but I’d rather not do this.

I have tried both with and without the “Global\” prefix for the event name.

Is there a way of giving the ApplicationPoolIdentity the required permissions?

The relevant snippet of code is below:

//  Make the following critical section accessible to everyone.
SECURITY_ATTRIBUTES sa = {0};
sa.nLength = sizeof (sa);
sa.bInheritHandle = FALSE;
SECURITY_DESCRIPTOR sd;
BOOL ok = InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
win_assert (ok);
ok = SetSecurityDescriptorDacl(&sd, TRUE, (PACL) NULL, FALSE);
win_assert (ok);
sa.lpSecurityDescriptor = &sd;

//  This function has to be in a system-wide critical section so that
//  two instances of the library don't accidentally create signaler
//  crossing the process boundary.
HANDLE sync = CreateEvent (&sa, FALSE, TRUE,
    "Global\\zmq-signaler-port-sync");
win_assert (sync != NULL);

It fails on the last line, because sync is null.

For reference:

// Provides convenient way to check GetLastError-style errors on Windows.
#define win_assert(x) \
    do {\
        if (unlikely (!(x))) {\
            char errstr [256];\
            zmq::win_error (errstr, 256);\
            fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \
                __FILE__, __LINE__);\
            zmq::zmq_abort (errstr);\
        }\
    } while (false)

#endif
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:35:27+00:00Added an answer on June 13, 2026 at 11:35 am

    This issue has now been discussed and fixed:

    • https://github.com/zeromq/clrzmq/issues/81
    • https://zeromq.jira.com/browse/LIBZMQ-335
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working in an mobile native application which requires a background scanning of
I have been working on facebook application and you know on facebook native javascript
All, I'm working on an HTML-based web app (i.e., not native app) targeted for
I am working with Node.js to build a web socket server that uses mongodb.
I am working on one feature,which sends some information to server and server sends
I'm trying to derive a native class compiled from iCarousel native library ( used
I'm working on OSGI bundle which uses Java native interface. I use this makefile
I've to start working on a web-app project for which I've Eclipse Indigo and
I am working on an application using MVC 3 and knockoutjs library. Also I
I'm trying to get PowerMockito working with my application. I've added the library to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.