cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jwalters
Engaged Sweeper
I'm having problems in trying to browse to the Lansweeper Console, I keep getting errors saying it can't find the specified SQL server. I'm using Microsoft SQL Server 2005 and IIS 6.0. The database I created for Lansweeper is spelled exactly as "Lansweeper" and the user "lsuser" has local administrative rights. This test server I'm using it on isn't connected to a domain. I am running the LSservice instead of LSwinap.

Errors I get when I try to browse to the Lansweeper Console:
System.Data.SqlClient.SqlException: Specified SQL server not found: localhost\Lansweeper
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Specified SQL server not found: localhost\Lansweeper
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Specified SQL server not found: localhost\Lansweeper
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()

web.config file:
<configuration>
<appSettings>
<add key="MM_CONNECTION_HANDLER_Lansweeper" value="sqlserver.htm" />
<add key="MM_CONNECTION_STRING_Lansweeper" value="Persist Security Info=False;Data Source=localhost\Lansweeper;Initial Catalog=Lansweeper;User ID=lsuser;Password=password" />
<add key="MM_CONNECTION_DATABASETYPE_Lansweeper" value="SQLServer" />
<add key="MM_CONNECTION_SCHEMA_Lansweeper" value="" />
<add key="MM_CONNECTION_CATALOG_Lansweeper" value="" />
</appSettings>
</configuration>

LSservice.exe.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="ConnectionString" value="integrated security=SSPI;data source=localhost\Lansweeper;;persist security info=False;initial catalog=Lansweeper" />
<add key="ConcurrentThreads" value="10" />
</appSettings>
</configuration>

What am I missing? I have no errors in my windows event logs so I have no idea what it might be. Any help would be greatly appreciated!
14 REPLIES 14
dierdre
Engaged Sweeper
I am having trouble with the web console. LSSERVICE starts, LSWINAP runs by using 127.0.0.1, not localhost or (local). SQL Server 2005 Express is configured for Mixed Authentication as well as Remote and Local connections. I can log into SQL with sa, lsuser and lsscanner, but I still can't get the web console to run. Please help. What am I missing? 😞 Here are the errors I get:

System.Data.SqlClient.SqlException: Login failed for user 'sa'.
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)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Login failed for user 'sa'.
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)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Login failed for user 'sa'.
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)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
jwalters
Engaged Sweeper
From the error I got saying "Login failed for user 'lsuer'" I checked my Windows event log and it was saying "Login failed for user 'lsuser'. [CLIENT: 127.0.0.1]" with a source "MSSQLSERVER". That sent me off on the tangent that the problem was definitely with SQL.

SQL is set to "SQL Server and Windows".

I set the web.config file to login with the sa account and it worked with no problems (as expected). I compared the settings of sa vs lsuser to see how they were different. I had added lsuser as a user to the database Lansweeper | Security | Users in addition to having the user, lsuser, in Databases | Security. I removed lsuser from the Security section of Lansweeper and left lsuser in Databases | Security. Then I configured lsuser (in Databases | Security) in Login Properties | Server Roles as "sysadmin" and in User Mapping as the Default Schema as "dbo" and the section "Database role membership for: Lansweeper" as "db_owner" and "public". I then tried connecting to SQL using SQL Server Authentication with lsuser and it worked. I had been trying initially to use the local administrator user, ServerName\lsuser, I had created to connect to the database with, with no success; it didn't seem to like using Windows Authentication.

My config files look like the following:

web.config file:
<configuration>
<appSettings>
<add key="MM_CONNECTION_HANDLER_Lansweeper" value="sqlserver.htm" />
<add key="MM_CONNECTION_STRING_Lansweeper" value="Persist Security Info=False;Data Source=localhost;Initial Catalog=Lansweeper;User ID=lsuser;Password=password" />
<add key="MM_CONNECTION_DATABASETYPE_Lansweeper" value="SQLServer" />
<add key="MM_CONNECTION_SCHEMA_Lansweeper" value="" />
<add key="MM_CONNECTION_CATALOG_Lansweeper" value="" />
</appSettings>
</configuration>

LSservice.exe.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="ConnectionString" value="integrated security=SSPI;data source=localhost;;persist security info=False;initial catalog=Lansweeper" />
<add key="ConcurrentThreads" value="10" />
</appSettings>
</configuration>

As of now I can properly connect to the Lansweeper Console with no errors, now I just need to get inventorying other PCs working.
Hemoco
Lansweeper Alumni
First you got : "Specified SQL server not found", now you got "Login failed for user 'lsuser'" so were getting closer

My guess:
check your sql server security settings
Authentication should be "sql server and windows", yours is probably only windows

If this is ok : make sure that the password and login for lsuser are correct
jwalters
Engaged Sweeper
1) Yes, my lsservice starts, it has no problems running as the user "lsuser". The webserver is on the same machine as the SQL server.
2) I don't know what a named instance is, but I tried using "localhost" instead of "localhost\Lansweeper" anyway, and I got the following error when trying to browse to the Lansweeper Console:

System.Data.SqlClient.SqlException: Login failed for user 'lsuser'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Login failed for user 'lsuser'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Login failed for user 'lsuser'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------

3) Localhost is in my host file as "localhost" with its associated IP of 127.0.0.1, so it rules that out.

I find it strange that I'm now getting a "login failed for user 'lsuser'" error, but if that's the proper setting for my LSservice.exe.config file, then it seems likely I have incorrect SQL settings somewhere for the user.
Hemoco
Lansweeper Alumni
1) does your lsservice start? Is the webserver located on the same machine as the sql server?
2) Localhost\lansweeper is used when you use a named instance. If you don't use a named instance, just use locahost
3) it's possible that "localhost" is not in your your host file (unlikely). try with 127.0.0.1

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now