473,387 Members | 1,844 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,387 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 1602
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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,...

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.