473,756 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADODB.NET and "Access Denied"

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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%
Nov 18 '05 #1
6 4140
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%

Nov 18 '05 #2
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" <ra*****@spam.o rg> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message
news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%

Nov 18 '05 #3
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.Confus ed" <anonymous@> wrote in message news:uP******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <ra*****@spam.o rg> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message
news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%


Nov 18 '05 #4
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.Confus ed" <anonymous@> wrote in message news:uP******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <ra*****@spam.o rg> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message
news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%


Nov 18 '05 #5
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" <ra*****@spam.o rg> wrote in message
news:O4******** ******@TK2MSFTN GP09.phx.gbl...
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.Confus ed" <anonymous@> wrote in message
news:uP******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <ra*****@spam.o rg> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message
news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%


Nov 18 '05 #6
Anybody have any ideas of what I could do?!?
"ASP.Confus ed" <anonymous@> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
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" <ra*****@spam.o rg> wrote in message
news:O4******** ******@TK2MSFTN GP09.phx.gbl...
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.Confus ed" <anonymous@> wrote in message
news:uP******** ********@TK2MSF TNGP10.phx.gbl. ..
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" <ra*****@spam.o rg> wrote in message
news:uC******** ******@TK2MSFTN GP11.phx.gbl...
Any reason you using ADO and not ADO.NET?

"ASP.Confus ed" <anonymous@> wrote in message
news:ux******** ******@TK2MSFTN GP12.phx.gbl...
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.Unauthor izedAccessExcep tion: 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}\ASPNE T 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="tr ue"/>, the identity will be the anonymous user
(typically IUSR_MACHINENAM E) 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.Connectio n = new ADODB.Connectio n()
Line 3: </script>
Line 4: <%



Nov 18 '05 #7

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

Similar topics

8
7669
by: Frances Del Rio | last post by:
I'm getting Getting "Access is Denied" on resizeTo and moveTo methods in IE (IE 6.0..) I saw two posts about this from 7/6 & 7/7.. I suspect, like previous poster said, that this has to do w/MS Windows Updates (Tools --> Windows Update in IE..) because this started happening to me recently (ONLY in IE, works fine in N7), and I updated about two weeks ago (AND: this is happening to me also at work, where I have same OS (W2000 Pro), and...
1
7042
by: Winterminute | last post by:
If I try to make any changes to the ASP.NET Portal Starter kit it fails with an access denied error. This was working when I left last week and is failing today. I don't remember changing anything, but I guess something had to be changed. I have checked NTFS permissions and the ASPNET account has full control on the parent directory of that XML file and on the file itself. I have also checked in IIS, and the Virtual Directory has...
0
3537
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the original question, the subject line is: ADODB.NET and "Access Denied" I have an ASP.NET page writtein in VB that uses ADODB. I just had to
2
2751
by: Loane Sharp | last post by:
Hi there I'm using VB.NET and Office Web Components to access a SQL Server 2005 Express database and draw pictures on the fly in my ASP.NET application. Using .ExportPicture to write the GIF/JPEG/PNG image to disk and then load it into the page using the <IMG /> tag is probably not the tidiest or most secure way of doing this, but it is the easiest and allows the greatest flexibility in terms of positioning. (It also seems to be the most...
0
1783
by: Rico | last post by:
Helolo, I have an ASP.NET application on a Windows 2003 Server machine WITHOUT VS. I am working on an XPPro machine with VS 2003. I have installed the remote debugging components on the server. Aside from having administrative rights, I have also put myself in the Debugger Users group. I have added ASPNET and even IUSR_SERVERNAME to the Debuggers group (don't worry, it's a dev server not a live machine) and I still get "Access Denied"...
2
1966
by: Ron | last post by:
Hi there, We have a web application written in C# that need to deal with MS word 2003. it works fine on developer's machine but when I deployed it on web server, we got error msg says "Access is denied". So i guess the code is OK but web server configuraion has to be changed. I got .Net framework 1.1 installed on webserver and deployed the webapplication. Then i installed Office 2003. and set DCOM(word) permission and web folder...
1
1945
by: Ron | last post by:
Hi there, We have a web application written in C# that need to deal with MS word 2003. it works fine on developer's machine but when I deployed it on web server, we got error msg says "Access is denied". So i guess the code is OK but web server configuraion has to be changed. I got .Net framework 1.1 installed on webserver and deployed the webapplication. Then i installed Office 2003. and set DCOM(word) permission and web folder...
1
5142
by: srivatsans101 | last post by:
Hi, I'm trying to access the IFrame contents on a HTML page as frames.document But in IE, I'm getting Access Denied Error Message. I tried to add the IFrame's Src WebSite (a local/intranet hosted dynamic HTML page) to Trusted Sites list in IE Options.
2
5339
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
Yes, sorry I tried to make it clear in the original question that I want to get the user token of the service - ie. the account the service is running under. I know services don't have user tokens - I suspect users do have tokens, hence "user token", otherwise we might call them "service tokens" or somesuch :-) If you read the question again, you migh see that the fundamental question is, *assuming there is no other approach*: The...
0
9456
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
9275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10034
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...
1
9843
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
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
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
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.