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.
>