CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 SOLUTION FOR DOTNET ERROR: System.Security.SecurityException: Requested registry access is not allowed.

Print topic Send  topic

Author Message
navcan

Posts: 61
Posted: 11/23/2005, 2:15 PM

IF YOU ARE DEVELOPING A PROJECT IN CCS 3.0 (IN DOTNET 1.1 OR 2.0 ENVIRONMENT) AND EVER COME WITH A PROBLEM/ERROR (MENTIONED BELOW) WHILE RUNNING THE LIVE PAGE IN THE BROWSER, PLEASE FOLLOW THE SOLUTION WHICH IS AT THE BOTTOM OF THE POST.

MY DEVELOPMENT ENVIRONMENT IS

WINDOWS XP SP2 MEDIA CENTER PC (DUAL CORE PROCESSOR)
SQL 2000
CCS 3.0
ASP.NET APPLICATION

I WAS GETTING THE FOLLOWING ERROR WHILE RUNNING THE LIVE PAGE IN THE BROWSER.

Server Error in '/applicationname' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Requested registry access is not allowed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Data.Common.ADP.ClassesRootRegistryValue(String subkey, String queryvalue) +219
System.Data.OleDb.OleDbConnectionString.ValidateParse() +371
System.Data.Common.DBConnectionString..ctor(String connectionString, UdlSupport checkForUdl) +144
System.Data.OleDb.OleDbConnectionString.ParseString(String connectionString) +98
System.Data.OleDb.OleDbConnection.set_ConnectionString(String value) +11
System.Data.OleDb.OleDbConnection..ctor(String connectionString) +159
applicationname.Data.OleDbDao..ctor(ConnectionString connection) +195
applicationname.Configuration.Settings.get_dbconnectionNAMEDataAccessObject() +46
applicationname.pagename.tblNamesDataProvider..ctor() +447
applicationname.pagename.pagenamePage.OnInit(EventArgs e) +397
System.Web.UI.Control.InitRecursive(Control namingContainer) +240
System.Web.UI.Page.ProcessRequestMain() +2112
System.Web.UI.Page.ProcessRequest() +218
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

I TRIED EVERYTHING, CHANGED THE PERMISSIONS ON REGISTRY SETTINGS, UNINSTALLED DOTNET FRAMEWORK, REINSTALLED DOTNET FRAMEWORK, TRIED MS KB ARTICLE 329291, RESEARCHED ON THE TECHNET, MSDN, GOOGLE, GAVE ADMINISTRATOR PERMISSIONS TO ASPNET ACCOUNT ETC ETC -- NO LUCK!!!

WELL FINALLY BEFORE TURNING THE COMPUTER OFF, I GAVE A LAST TRY AND BINGO!!! IT WORKED!!!

SOLUTION IS AS FOLLOW (THIS SOLUTION IS FOR DEVELOPMENT ENVIRONMENT ONLY):

1. Give the ASPNET user permission to read the Security eventlog registry entry.

Run regedt32
Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security
Right click on this entry and select Permissions
Add the ASPNET user
Give it Read permission

2. Change settings in machine.config file

Run Explorer
Navigate to WINDOWS or WINNT folder
Open Microsoft.NET folder
Open Framework folder
Open v1.1.4322 folder (folder name may be different, depending on what dotnet version is installed)
Open CONFIG folder
Open machine.config file using notepad (make a backup of this file first)
Locate processmodel tag (approx. at line 441)
Locate userName="machine" (approx. at line 452)
Change it to userName="SYSTEM"
Save and close the file
Close Explorer

3. Restart IIS

Run IISReset (Start > Run , type IISReset and click OK)

THAT'S IT. HAPPY PROGRAMMING... O:)




View profile  Send private message
Edd


Posts: 547
Posted: 11/23/2005, 5:42 PM

Some people have all the fun :(

Thanks navcan, very very appreciated.

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
Walter Kempees
Posted: 11/23/2005, 8:07 PM

Would you be interested in an article describing uncrippling MediaCentre
edition.
It has the "single domain registration at installation" problem and is
therefore even less than XPHome.
If interested, I'll post.

Walter
navcan

Posts: 61
Posted: 11/24/2005, 4:26 PM

Edd, thanks for your appreciation.

Walter, we all would be interested in your article. Please share it. Knowledge is power if IT IS shared with others:-).

Regards,
navcan
View profile  Send private message
Walter Kempees
Posted: 11/24/2005, 4:48 PM

Watch this space, coming over the weekend.
Walter
"navcan" <navcan@forum.codecharge> schreef in bericht
news:2543865a370f066@news.codecharge.com...
> Edd, thanks for your appreciation.
>
> Walter, we all would be interested in your article. Please share it.
> Knowledge is power if IT IS shared with others:-).
>
> Regards,
> navcan
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees
Posted: 11/25/2005, 1:48 PM

MCE->Professional.
(not for the weak-harted, not recommended therefore interesting).
Windows Media Edition is a crippled Pro, with respect to Domain handling
and /runas capabilities.
Domain handling, the domain registered during installation is the only
domain MCE will connect to, change is not possible.
The RunAs command will not accept the /savecred option.
www.vortex-scratchpad.info shows(-ed) a solution.

A registry change will change MCE's behaviour and change it to XPPro
with Media Capabilties.

Key: HKEY_LOCAL_MACHINE\SYSTEM\WPA\MedCtrUpg, DWORD "is Legacy-MCE"
value 0 ->MCE, 1 -> XP Pro

This value is protected and can not be changed on a running system.
If you don't know how to circumvent, this is probably not for you.

No further info will be supplied here (PM).
Taken from another source.


JA
Posted: 12/27/2005, 12:26 AM

U rocked navcan:-)
Rol
Posted: 12/27/2005, 6:01 AM

8-) The Solution is asFOLLOW ReApply Microsoft.NET Framework 1.1 SP1 and enjoy
Kavitha
Posted: 02/03/2006, 2:50 AM

:-) Simply great.

It was really fantastic. Great job.

Thanks & Regards,
Kavitha


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.