473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

"Requested registry access is not allowed" creating OleDb connecti

Using IBM iSeries client access OLEDB provider to connect to DB2 on AS/400,
but cannot create connection using .NET web app. Using following code:

Dim cnTest As New OleDbConnection("Provider=IBMDA400; Data Source=S10324NM;
User ID=THEUSER; Password=THESECRET")

Works fine in console app, but fails in web app with:

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

Any help would be appreciated.

Nov 19 '05 #1
3 2484
http://support.microsoft.com/?id=329291
"bfprog" <bf****@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Using IBM iSeries client access OLEDB provider to connect to DB2 on
AS/400,
but cannot create connection using .NET web app. Using following code:

Dim cnTest As New OleDbConnection("Provider=IBMDA400; Data
Source=S10324NM;
User ID=THEUSER; Password=THESECRET")

Works fine in console app, but fails in web app with:

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

Any help would be appreciated.

Nov 19 '05 #2
I had already tried modifying the registry in accordance with the
instructions in this article, but I still get the error. By the way, I am
currently attempting to run this under IIS5 - WinXP SP2.

Any other ideas?

Thanks.

"Grant Merwitz" wrote:
http://support.microsoft.com/?id=329291
"bfprog" <bf****@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Using IBM iSeries client access OLEDB provider to connect to DB2 on
AS/400,
but cannot create connection using .NET web app. Using following code:

Dim cnTest As New OleDbConnection("Provider=IBMDA400; Data
Source=S10324NM;
User ID=THEUSER; Password=THESECRET")

Works fine in console app, but fails in web app with:

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

Any help would be appreciated.


Nov 19 '05 #3
Thanks.

I tried that, and I still get the same error. Following is the complete
stack trace:

SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Data.Common.ADP.ClassesRootRegistryValue(St ring subkey, String
queryvalue) +219
System.Data.OleDb.OleDbConnectionString.ValidatePa rse() +371
System.Data.Common.DBConnectionString..ctor(String connectionString,
UdlSupport checkForUdl) +144
System.Data.OleDb.OleDbConnectionString.ParseStrin g(String
connectionString) +98
System.Data.OleDb.OleDbConnection.set_ConnectionSt ring(String value) +11
OrderTying.Testcn.Page_Load(Object sender, EventArgs e) in C:\Documents
and Settings\urac\My Documents\OrderTying\OrderTying\Test\Testcn.aspx.v b:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
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.Htt pApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +87

It appears that this was just a problem with registry authorization. I
granted full control for ASPNET to registry key HKEY_CLASSES_ROOT\IBMDA400,
and that fixed the problem.

"Grant Merwitz" wrote:
Try follow the second approach there.

Instead of modifying the registry, they also offered a different solution
whereby you create a project inheriting from the Installer class.
Once that is run, with a given EventLog source, you can then log events to
the EventLog under this source.
I tried it with IIS6 and it worked fine.

I've attached my project that i made, hope that can help.
But read the article more on how to implement it (running it from command
prompt or something)

But i basicly ran this code, and was then able to log to the eventlog
through my ASP.NET application but only under the source i specified.
Also notice, if you run this installed class twice in a row, it will error,
as this source will have already been created

Good luck
http://support.microsoft.com/?id=329291

"bfprog" <bf****@discussions.microsoft.com> wrote in message
news:4A**********************************@microsof t.com...
I had already tried modifying the registry in accordance with the
instructions in this article, but I still get the error. By the way, I am
currently attempting to run this under IIS5 - WinXP SP2.

Any other ideas?

Thanks.

"Grant Merwitz" wrote:
http://support.microsoft.com/?id=329291
"bfprog" <bf****@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
> Using IBM iSeries client access OLEDB provider to connect to DB2 on
> AS/400,
> but cannot create connection using .NET web app. Using following code:
>
> Dim cnTest As New OleDbConnection("Provider=IBMDA400; Data
> Source=S10324NM;
> User ID=THEUSER; Password=THESECRET")
>
> Works fine in console app, but fails in web app with:
>
> System.Security.SecurityException: Requested registry access is not
> allowed.
>
> Any help would be appreciated.
>


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Lutz | last post by:
Hi All, I have a Windows Service that runs well. The service hosts a remote object. The purpose of the object is so that I can "peak" into the service to see what it's doing. I wrote a small...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
1
by: HK | last post by:
I am exceuting the following command in C# using Microsoft.Win32; RegistryKey key = Registry.LocalMachine.OpenSubKey(KeyName); I keep getting the exception "Requested registry access is not...
4
by: LP | last post by:
Hi, My webservice is currently deployed on WIndows 2000 server and runs pretty fine. I am trying to run my webservice on a Windows 2003 server. My webservice tries to write to a eventlog. The...
0
by: Michael Fay in SB | last post by:
I built my application with Access 2003 and made a distribution using the Microsoft Office Access 2003 Developer Extensions. (I also install Jet 8 as a follow-on action at the end of the...
0
by: Michael Fay in SB | last post by:
A month ago I posted: "I built my application with Access 2003 and made a distribution using the Microsoft Office Access 2003 Developer Extensions. (I also install Jet 8 as a follow-on action at...
7
by: Peter Ritchie | last post by:
I'm writing a Web Service and I would like to add performance counter data for monitoring performance of the Web Service's operations over time and load. The problem is, I get the "Requested...
0
by: Flinker | last post by:
When attempting to read the System event log on a remote system, I receive a "Requested registry access is not allowed" exception. I temporary added myself as an administrator to the remote system...
0
by: swatitalati | last post by:
Hello when i invoke a method of web service i m getting error like Server was unable to process request. --> Requested registry access is not allowed. syntex for invoking method is as below ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.