Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.Net Session State DB Creation

Status
Not open for further replies.

juice4145

Programmer
Oct 8, 2003
6
0
0
US
Hello,
I am having an issue creating the ASPState database to setup session state using SQL Server. I am running .Net Framework 2.0 and SQL Server 2005. When I run the command line script from the web server:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\aspnet_regsql.exe -ssadd -C "server=[MySQLServer], [PortNumber]; Trusted_Connection=yes;"

I get the following error:

Start adding session state.

.
An error occurred during the execution of the SQL file 'InstallSqlState.sql'. The SQL error number is 15404 and the SqlException message is: Could not obtain information about Windows NT group/user '[Domain\MyLoginID]', error code 0x5.
SQL Server:
Database:
SQL file loaded:
InstallSqlState.sql

Commands failed:

/*****************************************************************************/

EXECUTE sp_addtype tSessionId, 'NVARCHAR(88)', 'NOT NULL'

SQL Exception:
System.Data.SqlClient.SqlException: Could not obtain information about Windows NT group/user '[Domain\MyLoginID]', error code 0x5.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolea
n breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception
, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObj
ect stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cm
dHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, Tds
ParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName,
Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res
ult, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Management.SqlServices.ExecuteFile(String file, String server,
String database, String dbFileName, SqlConnection connection, Boolean sessionSta
te, SessionStateType sessionStatetype)

The weird thing is, if another person logs in to the server and attempts run this command, it gives the exact same error, including passing back my user id, not theirs.

Even though I get the error, when I browse SQL Server's DB's, the ASPState Database is listed. But when I browse to the web page, I get an error to Please install ASP.Net Session state 2.0 or greater.

I have also tried restoring the ASPState database from another server where SQL Server session state is running fine. The database restores successfully, but when I browse to the web page, I get the same error to install ASP.Net Session state 2.0 or greater.

When this command is run in on a different web server against a different database it completes fine.

Any Ideas?

Thanks
Julian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top