Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Thursday, March 29, 2012

Can't Connect

Win 2000, sqlServer 2000 Personal edition
Trying ot connect using .asp Vb Script
1. Sql server set to use Windows Authentication
2. Log onto Windows 2000 as Jim Bunton {no password)
3 Server 'Study' running ok
4. sql query analyser
i. "SELECT User_Name > dbo
ii. [using database NorthWind]
"SELECT * FROM Customers" > gives expected result
5. VB script
** BEGIN CODE connect.asp ***
<%
@. LANGUAGE="VBSCRIPT"
%>
<%
Option explicit
response.expires = 0
%>
<!-- #include file="adovbs.inc" -->
<html>
<head>
<title></title>
</head>
<body>
<%
dim Cn, CnStr
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.ConnectionTimeOut = 1
Cn.provider="sqloledb"
response.write "Conn Provider is " & Cn.provider
CnStr="Data Source=Study;Initial Catalog=Norhwind;User
Id=sa;Password=;"
' Tried all sorts of user id's and paswords
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id = 'Jim
Bunton';Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
=dbo;Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
JimBunton;Password=;"
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
='Study\Jim Bunton';Password=;"
%>
<p>--</p>
<%
response.write "Cnstr = " & CnStr
'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
Cn.open CnStr
%>
<p>--</p>
<%
response.write "The End - ran ok"
%>
</body>
</html>
**** END CODE *****
? what to do?
? am I missing something 'obvious' out ?
Jim Bunton
If you are using windows authentication (also known as a
trusted connection) to connect, you don't supply a user
name, password in the connection string. Instead, you
indicate this by using Integrated Security=SSPI
in your connection string.
You also want to make sure the database is correct. In your
examples, you want to make sure you use Northwind (you have
Norwind listed).
You can find sample connection strings using the SQL Server
OLE DB provider at:
http://www.carlprothman.net/Default...erForSQLServer
-Sue
On Mon, 19 Sep 2005 11:44:58 GMT, "Jim Bunton"
<jBunton@.BlueYonder.co.uk> wrote:

>Win 2000, sqlServer 2000 Personal edition
>Trying ot connect using .asp Vb Script
>1. Sql server set to use Windows Authentication
>2. Log onto Windows 2000 as Jim Bunton {no password)
>3 Server 'Study' running ok
>4. sql query analyser
> i. "SELECT User_Name > dbo
> ii. [using database NorthWind]
> "SELECT * FROM Customers" > gives expected result
>5. VB script
>** BEGIN CODE connect.asp ***
><%
> @. LANGUAGE="VBSCRIPT"
>%>
><%
> Option explicit
> response.expires = 0
>%>
><!-- #include file="adovbs.inc" -->
><html>
><head>
><title></title>
></head>
><body>
><%
> dim Cn, CnStr
> Set Cn = Server.CreateObject("ADODB.Connection")
> Cn.ConnectionTimeOut = 1
> Cn.provider="sqloledb"
> response.write "Conn Provider is " & Cn.provider
> CnStr="Data Source=Study;Initial Catalog=Norhwind;User
>Id=sa;Password=;"
> ' Tried all sorts of user id's and paswords
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id = 'Jim
>Bunton';Password=;"
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
>=dbo;Password=;"
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
>JimBunton;Password=;"
> 'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
>='Study\Jim Bunton';Password=;"
>%>
><p>--</p>
><%
> response.write "Cnstr = " & CnStr
> 'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
> Cn.open CnStr
>%>
><p>--</p>
><%
> response.write "The End - ran ok"
>%>
></body>
></html>
>**** END CODE *****
>? what to do?
>? am I missing something 'obvious' out ?
|||Thanks for your clear response Sue.
Unfortunately I still have a problem:
The following works:-
<%
dim Cn, SqlStr,rsCustomers
Set Cn=Server.CreateObject("ADODB.Connection")
Cn.Provider = "sqloledb"
Cn.Properties("Data Source") = "Study\StudySQLServer"
Cn.Properties("Initial Catalog") = "NorthWind"
Cn.Properties("Connect Timeout") = "3"
Cn.Properties("User ID") = "sa"
Cn.Properties("Password") = "mypassword"
Cn.open
. . . code which displays Customer info
The folowing does NOT:-
<%
dim Cn, CnStr, SqlStr,rsCustomers
Set Cn=Server.CreateObject("ADODB.Connection")
CnStr="Provider=sqloledb;" & _
"Data Source=Study\StudySqlServer;" & _
"Initial Catalog=NorthWind;" & _
"Integrated Security=SSPI"
response.write "cnStr = " & cnStr
' response.end
Cn.open CnStr
It fails at Cn.open CnStr
Error Type:
(0x80040E4D)
/MyWebs/Connect_wAuth.asp, line 15
response.write "cnStr = " & cnStr gives:-
cnStr = Provider=sqloledb;Data Source=Study\StudySqlServer;Initial Catalog=NorthWind;Integrated Security=SSPI
In Query Analyser (login using Windows Authentification)
select user_Name() >> dbo
select * from Customers >> a list of customers
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message news:5tuui1l8ku9a5fl6r704knccn7jfun1kf4@.4ax.com...
> If you are using windows authentication (also known as a
> trusted connection) to connect, you don't supply a user
> name, password in the connection string. Instead, you
> indicate this by using Integrated Security=SSPI
> in your connection string.
> You also want to make sure the database is correct. In your
> examples, you want to make sure you use Northwind (you have
> Norwind listed).
> You can find sample connection strings using the SQL Server
> OLE DB provider at:
> http://www.carlprothman.net/Default...erForSQLServer
> -Sue
> On Mon, 19 Sep 2005 11:44:58 GMT, "Jim Bunton"
> <jBunton@.BlueYonder.co.uk> wrote:
>
|||Then it's likely the authentication settings on the IIS side
of it. Try adding the IUSR account as a login in SQL Server
with the appropriate permissions as needed for your code.
Also, turned on failed login audits in SQL Server and
restart the instance. That will help you track down what
login is failing.
-Sue
On Tue, 20 Sep 2005 10:17:50 GMT, "Jim Bunton"
<jBunton@.BlueYonder.co.uk> wrote:
[vbcol=seagreen]
>Thanks for your clear response Sue.
>Unfortunately I still have a problem:
>The following works:-
><%
>dim Cn, SqlStr,rsCustomers
> Set Cn=Server.CreateObject("ADODB.Connection")
> Cn.Provider = "sqloledb"
> Cn.Properties("Data Source") = "Study\StudySQLServer"
> Cn.Properties("Initial Catalog") = "NorthWind"
> Cn.Properties("Connect Timeout") = "3"
> Cn.Properties("User ID") = "sa"
> Cn.Properties("Password") = "mypassword"
> Cn.open
> . . . code which displays Customer info
>The folowing does NOT:-
><%
>dim Cn, CnStr, SqlStr,rsCustomers
> Set Cn=Server.CreateObject("ADODB.Connection")
> CnStr="Provider=sqloledb;" & _
> "Data Source=Study\StudySqlServer;" & _
> "Initial Catalog=NorthWind;" & _
> "Integrated Security=SSPI"
> response.write "cnStr = " & cnStr
> ' response.end
> Cn.open CnStr
>It fails at Cn.open CnStr
>Error Type:
>(0x80040E4D)
>/MyWebs/Connect_wAuth.asp, line 15
>response.write "cnStr = " & cnStr gives:-
>cnStr = Provider=sqloledb;Data Source=Study\StudySqlServer;Initial Catalog=NorthWind;Integrated Security=SSPI
>In Query Analyser (login using Windows Authentification)
>select user_Name() >> dbo
>select * from Customers >> a list of customers
>
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message news:5tuui1l8ku9a5fl6r704knccn7jfun1kf4@.4ax.com...

Can't Connect

Win 2000, sqlServer 2000 Personal edition
Trying ot connect using .asp Vb Script
1. Sql server set to use Windows Authentication
2. Log onto Windows 2000 as Jim Bunton {no password)
3 Server 'Study' running ok
4. sql query analyser
i. "SELECT User_Name > dbo
ii. [using database NorthWind]
"SELECT * FROM Customers" > gives expected result
5. VB script
** BEGIN CODE connect.asp ***
<%
@. LANGUAGE="VBSCRIPT"
%>
<%
Option explicit
response.expires = 0
%>
<!-- #include file="adovbs.inc" -->
<html>
<head>
<title></title>
</head>
<body>
<%
dim Cn, CnStr
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.ConnectionTimeOut = 1
Cn.provider="sqloledb"
response.write "Conn Provider is " & Cn.provider
CnStr="Data Source=Study;Initial Catalog=Norhwind;User
Id=sa;Password=;"
' Tried all sorts of user id's and paswords
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id = 'Jim
Bunton';Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
=dbo;Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
JimBunton;Password=;"
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
='Study\Jim Bunton';Password=;"
%>
<p>--</p>
<%
response.write "Cnstr = " & CnStr
'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
Cn.open CnStr
%>
<p>--</p>
<%
response.write "The End - ran ok"
%>
</body>
</html>
**** END CODE *****
? what to do'
' am I missing something 'obvious' out ?
Jim BuntonIf you are using windows authentication (also known as a
trusted connection) to connect, you don't supply a user
name, password in the connection string. Instead, you
indicate this by using Integrated Security=SSPI
in your connection string.
You also want to make sure the database is correct. In your
examples, you want to make sure you use Northwind (you have
Norwind listed).
You can find sample connection strings using the SQL Server
OLE DB provider at:
http://www.carlprothman.net/Default...derForSQLServer
-Sue
On Mon, 19 Sep 2005 11:44:58 GMT, "Jim Bunton"
<jBunton@.BlueYonder.co.uk> wrote:

>Win 2000, sqlServer 2000 Personal edition
>Trying ot connect using .asp Vb Script
>1. Sql server set to use Windows Authentication
>2. Log onto Windows 2000 as Jim Bunton {no password)
>3 Server 'Study' running ok
>4. sql query analyser
> i. "SELECT User_Name > dbo
> ii. [using database NorthWind]
> "SELECT * FROM Customers" > gives expected result
>5. VB script
>** BEGIN CODE connect.asp ***
><%
> @. LANGUAGE="VBSCRIPT"
>%>
><%
> Option explicit
> response.expires = 0
>%>
><!-- #include file="adovbs.inc" -->
><html>
><head>
><title></title>
></head>
><body>
><%
> dim Cn, CnStr
> Set Cn = Server.CreateObject("ADODB.Connection")
> Cn.ConnectionTimeOut = 1
> Cn.provider="sqloledb"
> response.write "Conn Provider is " & Cn.provider
> CnStr="Data Source=Study;Initial Catalog=Norhwind;User
>Id=sa;Password=;"
> ' Tried all sorts of user id's and paswords
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id = 'Jim
>Bunton';Password=;"
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
>=dbo;Password=;"
> 'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
>JimBunton;Password=;"
> 'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
>='Study\Jim Bunton';Password=;"
>%>
><p>--</p>
><%
> response.write "Cnstr = " & CnStr
> 'ERROR ALWAYS OCCURS ON NEXT LINEon the next line
> Cn.open CnStr
>%>
><p>--</p>
><%
> response.write "The End - ran ok"
>%>
></body>
></html>
>**** END CODE *****
>? what to do'
>' am I missing something 'obvious' out ?|||Thanks for your clear response Sue.
Unfortunately I still have a problem:
The following works:-
<%
dim Cn, SqlStr,rsCustomers
Set Cn=Server.CreateObject("ADODB.Connection")
Cn.Provider = "sqloledb"
Cn.Properties("Data Source") = "Study\StudySQLServer"
Cn.Properties("Initial Catalog") = "NorthWind"
Cn.Properties("Connect Timeout") = "3"
Cn.Properties("User ID") = "sa"
Cn.Properties("Password") = "mypassword"
Cn.open
. . . code which displays Customer info
The folowing does NOT:-
<%
dim Cn, CnStr, SqlStr,rsCustomers
Set Cn=Server.CreateObject("ADODB.Connection")
CnStr="Provider=sqloledb;" & _
"Data Source=Study\StudySqlServer;" & _
"Initial Catalog=NorthWind;" & _
"Integrated Security=SSPI"
response.write "cnStr = " & cnStr
' response.end
Cn.open CnStr
It fails at Cn.open CnStr
Error Type:
(0x80040E4D)
/MyWebs/Connect_wAuth.asp, line 15
response.write "cnStr = " & cnStr gives:-
cnStr = Provider=sqloledb;Data Source=Study\StudySqlServer;Initial Catalog=N
orthWind;Integrated Security=SSPI
In Query Analyser (login using Windows Authentification)
select user_Name() >> dbo
select * from Customers >> a list of customers
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message news:5tuui1l8ku9a5fl6r704knccn7jfun1
kf4@.4ax.com...
> If you are using windows authentication (also known as a
> trusted connection) to connect, you don't supply a user
> name, password in the connection string. Instead, you
> indicate this by using Integrated Security=SSPI
> in your connection string.
> You also want to make sure the database is correct. In your
> examples, you want to make sure you use Northwind (you have
> Norwind listed).
> You can find sample connection strings using the SQL Server
> OLE DB provider at:
> [url]http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForSQLServer[/url
]
>
> -Sue
>
> On Mon, 19 Sep 2005 11:44:58 GMT, "Jim Bunton"
> <jBunton@.BlueYonder.co.uk> wrote:
>
>|||Then it's likely the authentication settings on the IIS side
of it. Try adding the IUSR account as a login in SQL Server
with the appropriate permissions as needed for your code.
Also, turned on failed login audits in SQL Server and
restart the instance. That will help you track down what
login is failing.
-Sue
On Tue, 20 Sep 2005 10:17:50 GMT, "Jim Bunton"
<jBunton@.BlueYonder.co.uk> wrote:
[vbcol=seagreen]
>Thanks for your clear response Sue.
>Unfortunately I still have a problem:
>The following works:-
><%
>dim Cn, SqlStr,rsCustomers
> Set Cn=Server.CreateObject("ADODB.Connection")
> Cn.Provider = "sqloledb"
> Cn.Properties("Data Source") = "Study\StudySQLServer"
> Cn.Properties("Initial Catalog") = "NorthWind"
> Cn.Properties("Connect Timeout") = "3"
> Cn.Properties("User ID") = "sa"
> Cn.Properties("Password") = "mypassword"
> Cn.open
> . . . code which displays Customer info
>The folowing does NOT:-
><%
>dim Cn, CnStr, SqlStr,rsCustomers
> Set Cn=Server.CreateObject("ADODB.Connection")
> CnStr="Provider=sqloledb;" & _
> "Data Source=Study\StudySqlServer;" & _
> "Initial Catalog=NorthWind;" & _
> "Integrated Security=SSPI"
> response.write "cnStr = " & cnStr
> ' response.end
> Cn.open CnStr
>It fails at Cn.open CnStr
>Error Type:
>(0x80040E4D)
>/MyWebs/Connect_wAuth.asp, line 15
>response.write "cnStr = " & cnStr gives:-
>cnStr = Provider=sqloledb;Data Source=Study\StudySqlServer;Initial Catalog=
NorthWind;Integrated Security=SSPI
>In Query Analyser (login using Windows Authentification)
>select user_Name() >> dbo
>select * from Customers >> a list of customers
>
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message news:5tuui1l8ku9a5f
l6r704knccn7jfun1kf4@.4ax.com...sql

Cant connect

Win 2000, sqlServer 2000 Personal edition

Trying ot connect using .asp Vb Script

1. Sql server set to use Windows Authentication
2. Log onto Windows 2000 as Jim Bunton {no password)
3 Server 'Study' running ok
4. sql query analyser
i. "SELECT User_Name > dbo
ii. [using database NorthWind]
"SELECT * FROM Customers" > gives expected result

5. VB script
** BEGIN CODE connect.asp ***
<%
@. LANGUAGE="VBSCRIPT"
%
<%
Option explicit
response.expires = 0
%
<!-- #include file="adovbs.inc" --
<html>
<head>
<title></title>
</head>
<body>
<%
dim Cn, CnStr
Set Cn = Server.CreateObject("ADODB.Connection")
Cn.ConnectionTimeOut = 1
Cn.provider="sqloledb"
response.write "Conn Provider is " & Cn.provider
CnStr="Data Source=Study;Initial Catalog=Norhwind;User
Id=sa;Password=;"
' Tried all sorts of user id's and paswords
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
'Jim Bunton';Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id
=dbo;Password=;"
'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =
JimBunton;Password=;"
'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
='Study\Jim Bunton';Password=;"
%>
<p>----</p>
<%
response.write "Cnstr = " & CnStr
'ERROR ALWAYS OCCURS ON NEXT LINE
Cn.open CnStr
'Error Type:
'(0x80004005)
'Unspecified error
'/myweb/mywebs/connect.asp, line 35
%>
<p>----</p>
<%
response.write "The End - ran ok"
%
</body
</html
**** END CODE *****

? what to do??
?? am I missing something 'obvious' out ?

--

Jim BuntonJim Bunton (jBunton@.BlueYonder.co.uk) writes:
> Win 2000, sqlServer 2000 Personal edition
> Trying ot connect using .asp Vb Script
> 1. Sql server set to use Windows Authentication
> 2. Log onto Windows 2000 as Jim Bunton {no password)

You're a brave man!

> 'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id
>='Study\Jim Bunton';Password=;"

That is not likely to be correct. User Id and Password is for SQL
authentication, and SQL logins usually don't have \ in them. To login
with Windows authentication, specify "Integrated Security=SSPI", or
Trusted_connect=Yes.

And spell Northwind correctly. :-)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

cant connect

i am devleoping an ASP.Net website now. i got a problem on connecting. when i try to connect (i manually made thew connection), it wont connect. the error is this:

System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.
Login failed for user 'MANEC\Batman'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

I have other other webpage that uses sqlconenction. they connect fine but they are not manually created. i created their connection through the sqldatasource wizard. i am testing these pages using the built-in server of VWD-Express but when you test it on IIS it gets an error (this is my 2nd problem). i am totally confused.

i am thinking there is something missing in the connection that i manually created. I put the settings in the "web.config" file but it did no good.

can you give me instruction on how to properly connect from Web? PLS? i have no problem connecting when i am creating desktop applications (using C# & SQLExpress).

PLS HELP. pls.

Seems that the user has an orphaned database assigned to, try to set the deault database of the user to a valid one.

sp_defaultdb

Changes the default database for a Microsoft SQL Server login.

More information in the BOL.


HTH; jens Suessmeyer.

|||

thanks for the reply. i have solved this issue by setting sql authentication to mixed mode and assigned a username/password on the connection string. it connects now.

i can see that the connection is ok but when i am attemting to create a new table to the ASPNETDB.mdf, i get this error message:

System.Data.SqlClient.SqlException: Unable to open the physical file "D:\myDocs\Visual Studio 2005\WebSites\techPad\App_Data\ASPNETDB.MDF". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Unable to open the physical file "D:\myDocs\Visual Studio 2005\WebSites\techPad\App_Data\ASPNETDB_log.ldf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Cannot open user default database. Login failed.
Login failed for user 'xxx'.
File activation failure. The physical file name "D:\myDocs\Visual Studio 2005\WebSites\techPad\App_Data\ASPNETDB_log.ldf" may be incorrect.at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

PLS HELP.

|||OK, strange thing. Seems that you connected with the attachdbfile option a database, but connect with another connection to the sql server express attached database or vice versa. But you have to decide wheter you want to use the service of the direct attachdbfile way.

HTH, jens Suessmeyer.|||

Jens Suessmeyer wrote:

OK, strange thing. Seems that you connected with the attachdbfile option a database, but connect with another connection to the sql server express attached database or vice versa. But you have to decide wheter you want to use the service of the direct attachdbfile way.

HTH, jens Suessmeyer.

you are right. i attached ASPNETDB.net using attachdbfile. that is set on the web.config file.

|||

somehow i have resolved this issue but the problem keeps on coming after another.

from the suggestion of the people from www.asp.net ( http://forums.asp.net/1/904462/ShowPost.aspx#904462 ) here is what i got now:

error after disabling "Write" capability from ACL:
System.Data.SqlClient.SqlException: Failed to update database "C:\INETPUB\WWWROOT\TECHPAD\APP_DATA\ASPNETDB.MDF" because the database is read-only. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

error after ENABLING "Write" capability from ACL:
System.Data.SqlClient.SqlException: Cannot open user default database. Login failed. Login failed for user 'MANEC\ASPNET'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

this makes me think its so hard to study VWD and SQLExpress for a newbie like me. when I run the webpages from the built-in webserver of VWD it may work fine but when on IIS it will not work (or vice-versa). so confusing. maybe bcoz im very new to this.

i find it hard to do all of these setups. i wanna learn this though. PLS HELP.

|||i posted the same issue to the other page here. pls help. pls check this out > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=68698&SiteID=1&PageID=1

Sunday, March 25, 2012

Cant attach database

I've created a database inside my ASP.net project, the database is in the App_Data folder as exepcted.

I can't run the aspnet_regsql until I have attached it using SQL Server Management Studio, but when I try to attach the database it doesn't let me navigate through my folders properly.


The database is in C:\Users\Wardie\Documents\FirstProject\App_Data but SQL SMS only lets me navigate to the folder C:\Users\Wardie and no further for some reason, meaning I can't attach the database and can't use the aspnet_regsql service to create the membership tables.

Does anyone know how to fix this?

I had this problem and discovered that SQL Server Management Studio doesnt navigate long directory paths off windows user directories like "My Documents". I ended up creating all my web projects in a sub directory off C:\ something like C:\My Websites\Web1\App_Data\MyDatabase.MDF will work fine. Sorry, but as far as I'm aware you'll have to move your project directory to a shorter path off the root directory.

|||

I guess i'll just have to do the same then, cheers smc.

A bit of a stupid thing though isn't that really?

|||

I agree. There's probably a logical reason... maybe its to do with virtual paths that are used for user "My Directory" folders not being supported. I.e. the "My Documnets" directory is actually something like "C:\Documents and Settings\UserName\My Documents"

Please mark as answered if I was helpful in someway to you.

Thursday, March 22, 2012

Cant add ASPNET login to SQL Server

Here's the situation:

SQL Server is on one machine.
ASP.net is running on a different machine named THALES, which has the ASPNET account on it.
Both machines are on the same domain.

I am trying to add the THALES\ASPNET as a SQL Server login so that I can connect using Windows Authentication. When I try to add THALES\ASPNET, I get this message:
Error 15401: Windows NT user or group 'THALES\ASPNET' not found. Check the name again.

Any suggestions?You need to create an ASPNET user on the SQL Server machine, and give it the same password as the ASPNET user on the Web Server. By default, the password for the ASPNET user is autogenerated. You will need to change this in the Machin.Config so that it is a known password that you can then use for the ASPNET user on the SQL Server machine.|||Thank you, Douglas, that helped.

Wednesday, March 7, 2012

Cannot start transaction

Hi,
I have this problem with SQL Server 2000.
Opening an ASP page I read this error:
"cannot create new transaction because capacity was exceeded"
The error code is cannot "8004d01d"
Can anyone help me?
Thanks> Hi,
> I have this problem with SQL Server 2000.
> Opening an ASP page I read this error:
> "cannot create new transaction because capacity was exceeded"
> The error code is cannot "8004d01d"
> Can anyone help me?
I assume you did try to search Usenet archives? There is plenty information
about this issue there. See:
http://groups.google.pl/groups?hl=p...sa=N&tab=wg&lr=
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.