473,289 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

ASP.NET run-time error: ASP.NET ADO User Registered Failure

I guess this is more likely the user problem, but don't know how to fix. For
regular server-side programs without using data access or ADO, there is no
run-time error. I really have no idea why it doesn't work.

any ideas? Thanks!

Exception Details: System.Data.SqlClient.SqlException: User
'MYComputerName\ASPNET' Registered Failure.

Source Error:
Line 35: Dim cs As String = "Data Source=MyComputerName\MySQL; _
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=autoattendant;Trusted_Connection=yes"
Line 36: Dim cn As New SqlConnection(cs)
Line 37: cn.Open()
Line 38: Response.Write("string = " & cn.ConnectionString)
Line 39: End Sub
Nov 17 '05 #1
1 1598
you need to add ASPNET as a user of the sql server database instance you are
trying to access. if you're using msde, you can execute the following to add
the user.

hth,

steve

if not exists (select * from master.dbo.syslogins where loginname =
n'[[INSTANCE_NAME]]\ASPNET')
exec sp_grantlogin n'[[INSTANCE_NAME]]\ASPNET'
exec sp_defaultdb n'[[INSTANCE_NAME]]\ASPNET', n'master'
exec sp_defaultlanguage n'[[INSTANCE_NAME]]\ASPNET', n'us_english'

if not exists (select * from master.dbo.syslogins where loginname =
n'[[INSTANCE_NAME]]\ASPNET'] and uid < 16382)
exec sp_granddbaccess n'[[INSTANCE_NAME]]\ASPNET',
n'[[INSTANCE_NAME]]\ASPNET'

exec sp_addrolemember n'db_datareader', n'[[INSTANCE_NAME]]\ASPNET'
exec sp_addrolemember n'db_datawriter', n'[[INSTANCE_NAME]]\ASPNET'
exec sp_addrolemember n'db_owner', n'[[INSTANCE_NAME]]\ASPNET'


"Matthew Louden" <jr********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I guess this is more likely the user problem, but don't know how to fix. For regular server-side programs without using data access or ADO, there is no
run-time error. I really have no idea why it doesn't work.

any ideas? Thanks!

Exception Details: System.Data.SqlClient.SqlException: User
'MYComputerName\ASPNET' Registered Failure.

Source Error:
Line 35: Dim cs As String = "Data Source=MyComputerName\MySQL; _
Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=autoattendant;Trusted_Connection=yes"
Line 36: Dim cn As New SqlConnection(cs)
Line 37: cn.Open()
Line 38: Response.Write("string = " & cn.ConnectionString)
Line 39: End Sub

Nov 17 '05 #2

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

Similar topics

3
by: leroybt.rm | last post by:
Can someone tell me how to run a script from a interactive shell I type the following: >>>python filename >>>python filename.py >>>run filename >>>run filename.py >>>/run filename >>>/run...
4
by: Ed | last post by:
Hello, I took a course in asp about 2 years ago and I was practicing with IIS 5.0. Then I put it down for a while. Now trying to get back to it. I can't run asp files from subdirectories of...
2
by: Jenna Olson | last post by:
Hi all- I've never seen this particular issue addressed, but was wondering if there's anything to support one way or another. Say I have a class: class ManipulateData { public:...
15
by: mg | last post by:
How can I run an .exe using C# from within the code behind of a WebForm app?
6
by: billr | last post by:
I have developed a small API for taking care of a lot of boiler plate stuff in a multi formed windows application, for example setting up a messaging thread framework. New Forms, in the...
13
by: Bob Day | last post by:
Using vs2003, vb.net I start a thread, giving it a name before start. Code snippet: 'give each thread a unique name (for later identification) Trunk_Thread.Name = "Trunk_0_Thread" ' allow...
9
by: Brett Wesoloski | last post by:
I am new to VS2005. I changed my program.cs file to be a different form I am working on. But when I go to run the application it still brings up the form that was originally declared as new. ...
7
by: Lee Crabtree | last post by:
I remember when I was first getting into .NET Forms programming that there was a rather emphatic rule about not constructing a form before calling Application.Run with it. So this: ...
26
by: Chief | last post by:
Hello i would like to know which syntax do i have to use in order to make a program run other *.exe program and also how to put inputs in it for example i want to to make a program that run...
3
by: traceable1 | last post by:
Is there a way I can set up a SQL script to run when the instance starts up? SQL Server 2005 SP2 thanks!
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.