Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ADODB.NET and "Access Denied"

Reply
Thread Tools

ADODB.NET and "Access Denied"

 
 
ASP.Confused
Guest
Posts: n/a
 
      06-02-2004
I have an ASP.NET page writtein in VB that uses ADODB. I just had to
force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
this, and I wanted to be compatible with them.) I had to manually install
all of the ODBC drivers and the rest of the DLL's, and now I am getting
"Access is Denied" errors on any page that uses ADODB.

How do I fix it? I already gave the ODBC drivers in the folders in
"c:\program files\common files\system\" full access rights for both IUSR
accounts and the ASPNET account.


Here is the output of the error:

Access is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

Source Error:

Line 1: <script language="VB" runat="server">
*** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
Line 3: </script>
Line 4: <%


 
Reply With Quote
 
 
 
 
Raterus
Guest
Posts: n/a
 
      06-02-2004
Any reason you using ADO and not ADO.NET?

"ASP.Confused" <anonymous@> wrote in message news:(E-Mail Removed)...
> I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
> this, and I wanted to be compatible with them.) I had to manually install
> all of the ODBC drivers and the rest of the DLL's, and now I am getting
> "Access is Denied" errors on any page that uses ADODB.
>
> How do I fix it? I already gave the ODBC drivers in the folders in
> "c:\program files\common files\system\" full access rights for both IUSR
> accounts and the ASPNET account.
>
>
> Here is the output of the error:
>
> Access is denied.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.UnauthorizedAccessException: Access is denied.
>
> ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user.
>
> To grant ASP.NET write access to a file, right-click the file in Explorer,
> choose "Properties" and select the Security tab. Click "Add" to add the
> appropriate user or group. Highlight the ASP.NET account, and check the
> boxes for the desired access.
>
> Source Error:
>
> Line 1: <script language="VB" runat="server">
> *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> Line 3: </script>
> Line 4: <%
>
>

 
Reply With Quote
 
 
 
 
ASP.Confused
Guest
Posts: n/a
 
      06-02-2004
I'm using ADO because I just need to do a simple login script, and taking
time to set up a dataset to do such a trivial task would be pointless.
Plus, we are in the process of migrating our ASP 3.0 web pages over to
ASP.NET, and this eases the transition.

I just noticed something about 5 minutes ago. If I go to an ASP page on my
development computer (the one that is having all the issues with "Access
Denied", it works. But if I use an ASP.NET page using ADO, it gives me the
error.

"Raterus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Any reason you using ADO and not ADO.NET?

"ASP.Confused" <anonymous@> wrote in message
news:(E-Mail Removed)...
> I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
> this, and I wanted to be compatible with them.) I had to manually install
> all of the ODBC drivers and the rest of the DLL's, and now I am getting
> "Access is Denied" errors on any page that uses ADODB.
>
> How do I fix it? I already gave the ODBC drivers in the folders in
> "c:\program files\common files\system\" full access rights for both IUSR
> accounts and the ASPNET account.
>
>
> Here is the output of the error:
>
> Access is denied.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.UnauthorizedAccessException: Access is denied.
>
> ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5

or
> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user.
>
> To grant ASP.NET write access to a file, right-click the file in Explorer,
> choose "Properties" and select the Security tab. Click "Add" to add the
> appropriate user or group. Highlight the ASP.NET account, and check the
> boxes for the desired access.
>
> Source Error:
>
> Line 1: <script language="VB" runat="server">
> *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> Line 3: </script>
> Line 4: <%
>
>



 
Reply With Quote
 
Raterus
Guest
Posts: n/a
 
      06-02-2004
What do you mean by "taking time to set up a dataset", I can tell you that using old ADO in .NET is going to take much more time than using ADO.NET, anytime you access COM within .NET causes overhead. .NET and ADO.NET are like peanut butter and jelly, they just are meant to go together. ADO.NET was meant to replace ADO in .NET applications, its not just for the "big stuff"

"ASP.Confused" <anonymous@> wrote in message news:uP%(E-Mail Removed)...
> I'm using ADO because I just need to do a simple login script, and taking
> time to set up a dataset to do such a trivial task would be pointless.
> Plus, we are in the process of migrating our ASP 3.0 web pages over to
> ASP.NET, and this eases the transition.
>
> I just noticed something about 5 minutes ago. If I go to an ASP page on my
> development computer (the one that is having all the issues with "Access
> Denied", it works. But if I use an ASP.NET page using ADO, it gives me the
> error.
>
> "Raterus" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Any reason you using ADO and not ADO.NET?
>
> "ASP.Confused" <anonymous@> wrote in message
> news:(E-Mail Removed)...
> > I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> > force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
> > this, and I wanted to be compatible with them.) I had to manually install
> > all of the ODBC drivers and the rest of the DLL's, and now I am getting
> > "Access is Denied" errors on any page that uses ADODB.
> >
> > How do I fix it? I already gave the ODBC drivers in the folders in
> > "c:\program files\common files\system\" full access rights for both IUSR
> > accounts and the ASPNET account.
> >
> >
> > Here is the output of the error:
> >
> > Access is denied.
> > Description: An unhandled exception occurred during the execution of the
> > current web request. Please review the stack trace for more information
> > about the error and where it originated in the code.
> >
> > Exception Details: System.UnauthorizedAccessException: Access is denied.
> >
> > ASP.NET is not authorized to access the requested resource. Consider
> > granting access rights to the resource to the ASP.NET request identity.
> > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5

> or
> > Network Service on IIS 6) that is used if the application is not
> > impersonating. If the application is impersonating via <identity
> > impersonate="true"/>, the identity will be the anonymous user (typically
> > IUSR_MACHINENAME) or the authenticated request user.
> >
> > To grant ASP.NET write access to a file, right-click the file in Explorer,
> > choose "Properties" and select the Security tab. Click "Add" to add the
> > appropriate user or group. Highlight the ASP.NET account, and check the
> > boxes for the desired access.
> >
> > Source Error:
> >
> > Line 1: <script language="VB" runat="server">
> > *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> > Line 3: </script>
> > Line 4: <%
> >
> >

>
>

 
Reply With Quote
 
Raterus
Guest
Posts: n/a
 
      06-02-2004
I apologize too, I know I'm not answering your original question, I just think your access problems will go away if you use ADO.NET

"ASP.Confused" <anonymous@> wrote in message news:uP%(E-Mail Removed)...
> I'm using ADO because I just need to do a simple login script, and taking
> time to set up a dataset to do such a trivial task would be pointless.
> Plus, we are in the process of migrating our ASP 3.0 web pages over to
> ASP.NET, and this eases the transition.
>
> I just noticed something about 5 minutes ago. If I go to an ASP page on my
> development computer (the one that is having all the issues with "Access
> Denied", it works. But if I use an ASP.NET page using ADO, it gives me the
> error.
>
> "Raterus" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Any reason you using ADO and not ADO.NET?
>
> "ASP.Confused" <anonymous@> wrote in message
> news:(E-Mail Removed)...
> > I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> > force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses
> > this, and I wanted to be compatible with them.) I had to manually install
> > all of the ODBC drivers and the rest of the DLL's, and now I am getting
> > "Access is Denied" errors on any page that uses ADODB.
> >
> > How do I fix it? I already gave the ODBC drivers in the folders in
> > "c:\program files\common files\system\" full access rights for both IUSR
> > accounts and the ASPNET account.
> >
> >
> > Here is the output of the error:
> >
> > Access is denied.
> > Description: An unhandled exception occurred during the execution of the
> > current web request. Please review the stack trace for more information
> > about the error and where it originated in the code.
> >
> > Exception Details: System.UnauthorizedAccessException: Access is denied.
> >
> > ASP.NET is not authorized to access the requested resource. Consider
> > granting access rights to the resource to the ASP.NET request identity.
> > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5

> or
> > Network Service on IIS 6) that is used if the application is not
> > impersonating. If the application is impersonating via <identity
> > impersonate="true"/>, the identity will be the anonymous user (typically
> > IUSR_MACHINENAME) or the authenticated request user.
> >
> > To grant ASP.NET write access to a file, right-click the file in Explorer,
> > choose "Properties" and select the Security tab. Click "Add" to add the
> > appropriate user or group. Highlight the ASP.NET account, and check the
> > boxes for the desired access.
> >
> > Source Error:
> >
> > Line 1: <script language="VB" runat="server">
> > *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> > Line 3: </script>
> > Line 4: <%
> >
> >

>
>

 
Reply With Quote
 
ASP.Confused
Guest
Posts: n/a
 
      06-02-2004
Well, I have the exact same script running on 3 other servers, so I know the
script is working. I meant that I didn't want to take the time to create a
dataset within Visual Studio.NET's interface (since my SQL tables are not
owned by "dbo", and it's a pain to create them if the table is not owned by
"dbo".)

I'm thinking that when I had to force install MDAC 2.8, it did not set file
permissions properly. I went in to set all of the ODBC drivers to have full
access by ASPNET, IUSR and IWAM accounts, but that did not fix it yet.

Do you know what might need to be set to get this to work, or do you know
how I could force install MDAC through the setup program (I originally had
to do it file by file.)




"Raterus" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
I apologize too, I know I'm not answering your original question, I just
think your access problems will go away if you use ADO.NET

"ASP.Confused" <anonymous@> wrote in message
news:uP%(E-Mail Removed)...
> I'm using ADO because I just need to do a simple login script, and taking
> time to set up a dataset to do such a trivial task would be pointless.
> Plus, we are in the process of migrating our ASP 3.0 web pages over to
> ASP.NET, and this eases the transition.
>
> I just noticed something about 5 minutes ago. If I go to an ASP page on

my
> development computer (the one that is having all the issues with "Access
> Denied", it works. But if I use an ASP.NET page using ADO, it gives me

the
> error.
>
> "Raterus" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Any reason you using ADO and not ADO.NET?
>
> "ASP.Confused" <anonymous@> wrote in message
> news:(E-Mail Removed)...
> > I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> > force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host

uses
> > this, and I wanted to be compatible with them.) I had to manually

install
> > all of the ODBC drivers and the rest of the DLL's, and now I am getting
> > "Access is Denied" errors on any page that uses ADODB.
> >
> > How do I fix it? I already gave the ODBC drivers in the folders in
> > "c:\program files\common files\system\" full access rights for both IUSR
> > accounts and the ASPNET account.
> >
> >
> > Here is the output of the error:
> >
> > Access is denied.
> > Description: An unhandled exception occurred during the execution of the
> > current web request. Please review the stack trace for more information
> > about the error and where it originated in the code.
> >
> > Exception Details: System.UnauthorizedAccessException: Access is denied.
> >
> > ASP.NET is not authorized to access the requested resource. Consider
> > granting access rights to the resource to the ASP.NET request identity.
> > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5

> or
> > Network Service on IIS 6) that is used if the application is not
> > impersonating. If the application is impersonating via <identity
> > impersonate="true"/>, the identity will be the anonymous user (typically
> > IUSR_MACHINENAME) or the authenticated request user.
> >
> > To grant ASP.NET write access to a file, right-click the file in

Explorer,
> > choose "Properties" and select the Security tab. Click "Add" to add the
> > appropriate user or group. Highlight the ASP.NET account, and check the
> > boxes for the desired access.
> >
> > Source Error:
> >
> > Line 1: <script language="VB" runat="server">
> > *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> > Line 3: </script>
> > Line 4: <%
> >
> >

>
>



 
Reply With Quote
 
ASP.Confused
Guest
Posts: n/a
 
      06-03-2004
Anybody have any ideas of what I could do?!?


"ASP.Confused" <anonymous@> wrote in message
news:%23WR%(E-Mail Removed)...
> Well, I have the exact same script running on 3 other servers, so I know

the
> script is working. I meant that I didn't want to take the time to create

a
> dataset within Visual Studio.NET's interface (since my SQL tables are not
> owned by "dbo", and it's a pain to create them if the table is not owned

by
> "dbo".)
>
> I'm thinking that when I had to force install MDAC 2.8, it did not set

file
> permissions properly. I went in to set all of the ODBC drivers to have

full
> access by ASPNET, IUSR and IWAM accounts, but that did not fix it yet.
>
> Do you know what might need to be set to get this to work, or do you know
> how I could force install MDAC through the setup program (I originally had
> to do it file by file.)
>
>
>
>
> "Raterus" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> I apologize too, I know I'm not answering your original question, I just
> think your access problems will go away if you use ADO.NET
>
> "ASP.Confused" <anonymous@> wrote in message
> news:uP%(E-Mail Removed)...
> > I'm using ADO because I just need to do a simple login script, and

taking
> > time to set up a dataset to do such a trivial task would be pointless.
> > Plus, we are in the process of migrating our ASP 3.0 web pages over to
> > ASP.NET, and this eases the transition.
> >
> > I just noticed something about 5 minutes ago. If I go to an ASP page on

> my
> > development computer (the one that is having all the issues with "Access
> > Denied", it works. But if I use an ASP.NET page using ADO, it gives me

> the
> > error.
> >
> > "Raterus" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > Any reason you using ADO and not ADO.NET?
> >
> > "ASP.Confused" <anonymous@> wrote in message
> > news:(E-Mail Removed)...
> > > I have an ASP.NET page writtein in VB that uses ADODB. I just had to
> > > force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host

> uses
> > > this, and I wanted to be compatible with them.) I had to manually

> install
> > > all of the ODBC drivers and the rest of the DLL's, and now I am

getting
> > > "Access is Denied" errors on any page that uses ADODB.
> > >
> > > How do I fix it? I already gave the ODBC drivers in the folders in
> > > "c:\program files\common files\system\" full access rights for both

IUSR
> > > accounts and the ASPNET account.
> > >
> > >
> > > Here is the output of the error:
> > >
> > > Access is denied.
> > > Description: An unhandled exception occurred during the execution of

the
> > > current web request. Please review the stack trace for more

information
> > > about the error and where it originated in the code.
> > >
> > > Exception Details: System.UnauthorizedAccessException: Access is

denied.
> > >
> > > ASP.NET is not authorized to access the requested resource. Consider
> > > granting access rights to the resource to the ASP.NET request

identity.
> > > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS

5
> > or
> > > Network Service on IIS 6) that is used if the application is not
> > > impersonating. If the application is impersonating via <identity
> > > impersonate="true"/>, the identity will be the anonymous user

(typically
> > > IUSR_MACHINENAME) or the authenticated request user.
> > >
> > > To grant ASP.NET write access to a file, right-click the file in

> Explorer,
> > > choose "Properties" and select the Security tab. Click "Add" to add

the
> > > appropriate user or group. Highlight the ASP.NET account, and check

the
> > > boxes for the desired access.
> > >
> > > Source Error:
> > >
> > > Line 1: <script language="VB" runat="server">
> > > *** Line 2: dim oConn as ADODB.Connection = new ADODB.Connection()
> > > Line 3: </script>
> > > Line 4: <%
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM



Advertisments