---
title: "Fix: Requested registry access is not allowed error when creating silverlight project in visual studio 2008"
url: "https://osherove.com/blog/2009/5/27/fix-requested-registry-access-is-not-allowed-error-when-crea.md"
canonical: "https://osherove.com/blog/2009/5/27/fix-requested-registry-access-is-not-allowed-error-when-crea.html"
published: "2009-05-27T04:10:37"
updated: "2009-05-27T04:10:37"
tags: [".NET", "Silverlight"]
author: "Roy Osherove"
description: "This is an issue that had me stumped for a while. I was getting a “Requested registry access is not allowed.” message from visual studio when trying to create a new silverlight application. turns out the culprit is a…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Fix: Requested registry access is not allowed error when creating silverlight project in visual studio 2008

By Roy Osherove May 27, 2009 In [.NET](https://osherove.com/blog/category/net), [Silverlight](https://osherove.com/blog/category/silverlight)

**Historical article** · Originally published May 27, 2009; technical details may be outdated.

This is an issue that had me stumped for a while. I was getting a “Requested registry access is not allowed.” message from visual studio when trying to create a new silverlight application.

turns out the culprit is a few registry entries that somehow don’t have the correct permissions.

To fix this:

- Download the “[SubInACL](http://www.microsoft.com/downloads/thankyou.aspx?familyId=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displayLang=en)” tool from Microsoft and install it
- create a batch file in its install dir (C:\\Program Files\\Windows Resource Kits\\Tools\\)
- the batch should contain:

subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl /grant=administrators=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl /grant=users=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl /grant=system=f

subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl\\CLSID /grant=administrators=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl\\CLSID /grant=users=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl\\CLSID /grant=system=f

subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.2.0 /grant=administrators=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.2.0 /grant=users=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.2.0 /grant=system=f

subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.3.0 /grant=administrators=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.3.0 /grant=users=f
subinacl /subkeyreg HKEY\_CLASSES\_ROOT\\AgControl.AgControl.3.0 /grant=system=f

run the batch file from a command line as administrator, and that should fix the problem. This problem can also occur on other project types, so you may need to fix it by calling out to different registry keys. [like this one for example](http://petesbloggerama.blogspot.com/2008/01/fix-requested-registry-access-is-not.html).

## More in .NET

[All posts in .NET](https://osherove.com/blog/category/net)

- May 31, 2009

    ### [Daily news blogs about .NET and related creatures](https://osherove.com/blog/2009/5/31/daily-news-blogs-about-net-and-related-creatures.html)

- May 27, 2009

    ### [A simpler, conventions based DependencyProperty structure for silverlight using CustomControlBase](https://osherove.com/blog/2009/5/27/a-simpler-conventions-based-dependencyproperty-structure-for.html)

- Apr 27, 2009

    ### [Upcoming travel: SEConf, NDC](https://osherove.com/blog/2009/4/27/upcoming-travel-seconf-ndc.html)

- Apr 2, 2009

    ### [Preview: Placeholder arguments and custom argument checkers](https://osherove.com/blog/2009/4/2/preview-placeholder-arguments-and-custom-argument-checkers.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
