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 9322157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:01:15+00:00 2026-06-19T04:01:15+00:00

Recently two users in our system started getting this error when trying to add

  • 0

Recently two users in our system started getting this error when trying to add them to a role.

System.Runtime.InteropServices.COMException: Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)

What is interesting is that the same error occurs regardless of the configuration, running locally we use an XML store and in the test environment it uses SQL Server.

Here is code where is blows up – AddMemberName() – as you can see this is pretty straightforward stuff and it’s worked well for a while, it’s just these two users all of the sudden

public void AddUserToRole(string roleName, string userName, bool upn)
{
   string uName = userName;

   if (upn)
      uName = getAltUserNames(userName).First();

   AzAuthorizationStore store = new AzAuthorizationStoreClass();
   store.Initialize(2, _provider.StoreLocation, null);
   IAzApplication app = store.OpenApplication(_provider.ApplicationName, null);
   IAzRole role = app.OpenRole(roleName, null);
   role.AddMemberName(uName, null);
   role.Submit(0, null);
   Marshal.FinalReleaseComObject(role);
}

I tried googling various different terms but can’t find much of anything regarding this. I did read this post but it doesn’t seem to be the issue.

Thanks

  • 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-19T04:01:16+00:00Added an answer on June 19, 2026 at 4:01 am

    Check you Active Directory usernames and the underlying OU name especially. Check for duplicates and mismatches.
    I had an issue once where a user got married and her name changed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently two users of our software from the same company started experiencing random closures
Me and two other guys recently started our own web development company. We each
An application I have recently started work on has to register two dll's, because
Recently two of our clients have reported problems with our applets. Looking at the
EDIT: I recently learned that this problem is actually two separate issues: 1) Using
I recently started an MVC project to query and to report the company's users,
I recently posted this question about codes for a gift-card-like voucher that users can
I've recently started learning/using django; I'm trying to figure out a way to have
I've recently started using Hibernate and am trying to get my head around all
I've recently started using Hibernate and am trying to get my head around all

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.