473,729 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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=IBMD A400; Data Source=S10324NM ;
User ID=THEUSER; Password=THESEC RET")

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

System.Security .SecurityExcept ion: Requested registry access is not allowed.

Any help would be appreciated.

Nov 19 '05 #1
3 2503
http://support.microsoft.com/?id=329291
"bfprog" <bf****@discuss ions.microsoft. com> wrote in message
news:94******** *************** ***********@mic rosoft.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=IBMD A400; Data
Source=S10324NM ;
User ID=THEUSER; Password=THESEC RET")

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

System.Security .SecurityExcept ion: 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****@discuss ions.microsoft. com> wrote in message
news:94******** *************** ***********@mic rosoft.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=IBMD A400; Data
Source=S10324NM ;
User ID=THEUSER; Password=THESEC RET")

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

System.Security .SecurityExcept ion: 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:

SecurityExcepti on: Requested registry access is not allowed.]
Microsoft.Win32 .RegistryKey.Op enSubKey(String name, Boolean writable) +473
System.Data.Com mon.ADP.Classes RootRegistryVal ue(String subkey, String
queryvalue) +219
System.Data.Ole Db.OleDbConnect ionString.Valid ateParse() +371
System.Data.Com mon.DBConnectio nString..ctor(S tring connectionStrin g,
UdlSupport checkForUdl) +144
System.Data.Ole Db.OleDbConnect ionString.Parse String(String
connectionStrin g) +98
System.Data.Ole Db.OleDbConnect ion.set_Connect ionString(Strin g value) +11
OrderTying.Test cn.Page_Load(Ob ject sender, EventArgs e) in C:\Documents
and Settings\urac\M y Documents\Order Tying\OrderTyin g\Test\Testcn.a spx.vb:30
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +67
System.Web.UI.C ontrol.LoadRecu rsive() +35
System.Web.UI.P age.ProcessRequ estMain() +2112
System.Web.UI.P age.ProcessRequ est() +218
System.Web.UI.P age.ProcessRequ est(HttpContext context) +18

System.Web.Call HandlerExecutio nStep.System.We b.HttpApplicati on+IExecutionSt ep.Execute() +179
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean&
completedSynchr onously) +87

It appears that this was just a problem with registry authorization. I
granted full control for ASPNET to registry key HKEY_CLASSES_RO OT\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****@discuss ions.microsoft. com> wrote in message
news:4A******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:94******** *************** ***********@mic rosoft.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=IBMD A400; Data
> Source=S10324NM ;
> User ID=THEUSER; Password=THESEC RET")
>
> Works fine in console app, but fails in web app with:
>
> System.Security .SecurityExcept ion: 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
19713
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 Windows Application that connects to the remote object and prints out status information. Everything works fine when I first start the service. However, after some period, when I attempt to connect to the remote object, I get "Requested Service not...
10
8203
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 obviously change once the program's fully built to actually do something, but for testing, it works). The only code I added to the service is below:
1
3484
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 allowed." If i give EVERYONE full access to the key , then i am able open the
4
46473
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 code is as follows: System.Diagnostics.EventLog Log = new System.Diagnostics.EventLog( EventLogName ); Log.Source = EventLogName; Log.WriteEntry( "PCHistory Service Application started up successfully.",
0
1646
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 installation.) I can install the application on my development PC and on a "bare" PC. Regardless of the PC where I install, in the installed application (but not the development version) File->Export from a Report brings up a dialog box containing...
0
2220
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 the end of the installation.) I can install the application on my development PC and on a "bare" PC. Regardless of the PC where I install, in the installed application (but not the development version) File->Export from a Report brings up a...
7
12099
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 registry access is not allowed." SecurityException when I try and create the performance counter category via PerformanceCounterCategory.Create(). I understand the login used to run the Web Service does not have access to the registry keys...
0
1519
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 and the code worked fine. What permissions need to be assigned to my account on the remote system? If I use the NT 4.0 resource kit utility "elogdmp.exe" i am able to dump event log entries with my account. Here is a segment of the code: ev...
0
1831
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 object results = this.Invoke("authenticate", new object { strUserName, strPassword}); Pls help me to figure out this problem
0
8917
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.