473,769 Members | 6,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security Errors trying to fill dataset

I am developing my first .NET application that connects to a SQL
Server 2000 database and I am having a total nightmare :x :evil:
I am running Windows 2000 with Visual Studio .NET version 7.0.9466,
.NET Framework 1.0.3705 and SQL Server 2000.

I have created a simple table in an SQL database. SQL server includes
ASPNET as a valid login which has unlimited access to all databases,
including the database I have created. The ASPNET account also has
full permissions on the table I have created.

I have then created a simple ASPX that attempts to connect to the
database and fill a dataset with the 3 rows that exist in the SQL
table. The code that should do this is as follows:

Dim objConn As New
SqlConnection(" server=Andy;dat abase=TestDB")
Dim strQuery As String = "SELECT * FROM Specification"
Dim dsApplication As New DataSet("Applic ation")

' Get the data
Dim objCmd As New SqlDataAdapter( strQuery, objConn)
objCmd.Fill(dsA pplication)

When I run this I get the following error on Line 27:

Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the
required permission please contact your system administrator or
change the application's trust level in the configuration file.

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

Source Error:

Line 25: ' Get the data
Line 26: Dim objCmd As New SqlDataAdapter( strQuery, objConn)
Line 27: objCmd.Fill(dsA pplication)

I have searched high and low on the web now for over 2 weeks to try
and resolve this to no avail. Most articles suggest the following:

a) Have you given SQL server sufficient permission. Yes I have.

b) Have you updated the web.config file to impersonate an user with
sufficient permissions. Have tried to set it up with the
administrator account for machine as follows:

[code:1:765c6754 42]
<identity impersonate="tr ue"
userName="ANDY\ Administrator" password="xxxxx xxx"
/>
[/code:1:765c6754 42]
Get the following error:

Parser Error Message: Could not create Windows user token from the
credentials specified in the config file. Error from the operating
system 'A required privilege is not held by the client. '

c) Change the asp.NET user account name in the machine.config
to "SYSTEM". Made no difference.

d) Followed Microsoft's KB article 329291 to Create an event source
under the Application event log in Registry Editor. Made no
difference.

e) Modify the database connection string to explicity name the ASPNET
account, the sa account, the machines Administrator account. None of
them made any difference.
I am completely stuck and if I can't get past this then i'm going to
just dump all the .NET books and Visual Studio .Net and go back to
VB6 and ASP.

Any help or ideas would be very very gratefully received :D [/code]

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 18 '05 #1
0 1159

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

Similar topics

2
1797
by: mpriem | last post by:
I am developing a C# windows application which will act as an frontend for a SQL 2000 database. I am using a laptop with SQl 2000 workgroup edition (sp4). SQL is setup to use windows authentication. When I use my application on my laptop everything works. When I use my application on a SQL server (SQL 2000 enterprise sp4) in my organisation I get the error : "invalid object <tablename>" The database is a database generated by logman.exe...
0
797
by: AndyAFCW | last post by:
I am developing my first .NET application that connects to a SQL Server 2000 database and I am having a total nightmare :x :evil: I am running Windows 2000 with Visual Studio .NET version 7.0.9466, .NET Framework 1.0.3705 and SQL Server 2000. I have created a simple table in an SQL database. SQL server includes ASPNET as a valid login which has unlimited access to all databases, including the database I have created. The ASPNET...
1
1796
by: Dave | last post by:
I have a ASP.net application that work fine with IIS 5.0. I'm trying to put it on IIS 6.0. And getting the following error. ASP is enable It is in a virtual directory - I also follow the direction in Microsoft Knowledge Base Article - 320268
1
4265
by: Keith F. | last post by:
Hi, I have an asp.net web app that is intermittently throwing "Thread was being aborted." errors in my data access component. This seems to occur when the app is under a heavier than normal load. I don't get any of these errors for days, then I get a bunch all at once. I would have thought if the database call was timing out I would get a timeout error. The server is Win 2003 (under VMware), and hosts multiple asp and asp.net web...
3
3253
by: Keith F. | last post by:
Hi, I have an asp.net web app that is intermittently throwing "Thread was being aborted." errors in my data access component. This seems to occur when the app is under a heavier than normal load. I don't get any of these errors for days, then I get a bunch all at once. I would have thought if the database call was timing out I would get a timeout error. The server is Win 2003 (under VMware), and hosts multiple asp and asp.net web...
3
1695
by: Jim in Arizona | last post by:
I'm going insane! I don't know if it's just that the .net 2.0 framework is buggy or if it really is my code. This is pretty hard to explain since I can't even begin to nail down why this is happening. I have two text boxes. One is for the ID number, which when postback occurs, inserts into the related table as the foreign key. The other text box is for notes that go along side the foreign key of the the related table. Basically, the...
13
2311
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the ListBox is edited I came up with this code.) This code works but of course it gives me build...
6
3580
by: | last post by:
I've written a very small ASP.NET page to scrape thousands of pages of content based on database IDs. It loops through a dataset to get the IDs. It worked well in testing but now I am getting an annoying 403 error that causes the script to abort halfway through my download. I am wondering if there is a way in ASP.NET to have my code ignore 403 errors and other network errors, catch the error, and iterate to the next ID in the dataset...
2
1556
by: BillE | last post by:
I am developing locally processed reports with VB2005, displayed in a report viewer on a web form. Unfortunately my environment does not permit integrated security. How can I supply the username and password to the report at run time when the web form opens? I tried populating a dataset and supplying the datatable to the report with LocalReport.DataSources.Add method, but the report requires a datasource
0
9589
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
10216
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
10049
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
9997
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
9865
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...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
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...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
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.