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