Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET run-time error: ASP.NET ADO User Registered Failure

Reply
Thread Tools

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

 
 
Matthew Louden
Guest
Posts: n/a
 
      10-11-2003
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


 
Reply With Quote
 
 
 
 
steve
Guest
Posts: n/a
 
      10-11-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
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
Cannot migrate Anonymous to registered user Vincent Ye ASP .Net 3 02-28-2006 01:37 AM
Translating Oracle Package Call from ADO to ADO.Net dmiratsky@yahoo.com ASP .Net 0 02-14-2005 10:39 PM
Transfer ADO Code to ADO.NET ronaldlee ASP .Net 1 12-17-2004 04:08 PM
Accessing an ADO Recordset or Record from ADO.NET nita ASP .Net 1 11-20-2004 07:06 AM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM



Advertisments