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

  • Home
  • SEARCH
  • 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 6546199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:40:43+00:00 2026-05-25T11:40:43+00:00

I try change identity for application pool on Windows Azure. My project uses this

  • 0

I try change identity for application pool on Windows Azure. My project uses this application pool when works on Windows Azure. By default application pool uses NetworkService identity, but I must use another identity. I try change it in OnStart() event of WebRole by this way:

using (ServerManager serverManager = new ServerManager())
{                       
    string appPoolName =
    serverManager.Sites[RoleEnvironment.CurrentRoleInstance.Id + "_Web"]
    .Applications.First().ApplicationPoolName;

    var appPool = serverManager.ApplicationPools[appPoolName];

    appPool.ProcessModel.UserName = Environment.MachineName + "\\UserName";

    appPool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;

    appPool.ProcessModel.Password = "UserPassword";

    serverManager.CommitChanges();
}

But I get exception with next message:

    System.Runtime.InteropServices.COMException (0x80090016): 
       Keyset does not exist (Exception from HRESULT: 0x80090016)
   at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.CommitChanges()
   at Microsoft.Web.Administration.Configuration.CommitChanges()
   at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
   at Microsoft.Web.Administration.ServerManager.CommitChanges()
   at Project.Web.WebRole.OnStart() in E:\Projects\...\Web\WebRole.cs:line 57

If I change identity in IIS manager I don’t get any error. What is wrong with my code and why do I get this error?

  • 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-05-25T11:40:44+00:00Added an answer on May 25, 2026 at 11:40 am

    ok, here is my answer. This error occurs because NetworkService identity doesn’t have Read access on the iisWasKey key. More information and how to resolve this problem I found here: “Keyset does not exist” error message when you try to change the identity of an application pool

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

Sidebar

Related Questions

When I try to change the default collation of a SQL Server instance using
example i try to change cell.accessoryView from picture1 to picture2 by fadein but my
When I try to change this columns list: Nombre Imagen Descripcion Activo IdLineaProducto into
I try to change the dimensions of the view in interface builder from the
I'm try to change text color and align item in spinner to center of
When I try to change image for WPF trigger 'IsMouseOver' for button, the control
In Delphi 2007, in a mouse move event, I try to change the mouse
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
I'm Developing a small windows application in C#.net in Visual Studio 2010 with framework
I'm doing a web application that utilizes an external web service. This external web

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.