Welcome Guest Search | Active Topics | Members | Log In | Register

Crash when selecting SQL-Server Options · View
tmanthey2
Posted: Wednesday, February 17, 2010 7:09:22 AM
Rank: Newbie
Groups: Member

Joined: 2/17/2010
Posts: 2
Points: 6
Location: Frankfurt
I cannot connect to any SQL-Server. Even if i manually put in the address no connections can be made. Maybe it is not a good idea to browse the network for servers by default.

If if select any SQL-Server type in "Database type selection" the following error message will occur.

Index and length must refer to a location within the string. Parameter name: length

- Operating system: Win32NT
- Version: Microsoft Windows NT 5.1.2600 Service Pack 3
- Service pack: Service Pack 3

Index and length must refer to a location within the string.
Parameter name: length

System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at NConstructBuilderPro.WizardPages.UserControls.Sql2005DatabaseSelection.GetServers()
at NConstructBuilderPro.WizardPages.UserControls.Sql2005DatabaseSelection.FillData()
at NConstructBuilderPro.WizardPages.UserControls.Sql2005DatabaseSelection..ctor(DatabaseConnectionPage page)
Thomas
Posted: Wednesday, February 17, 2010 10:03:49 AM
Rank: Advanced Member
Groups: Member

Joined: 7/30/2007
Posts: 59
Points: 177
Hi thmanthey2,

That's a good suggestion, thanks. Are you able to continue with NConstruct Lite wizard or does this exception block it?


Regards
Thomas


NConstruct Support Team
support@nconstruct.com
http://www.nconstruct.com

tmanthey2
Posted: Wednesday, February 17, 2010 12:25:12 PM
Rank: Newbie
Groups: Member

Joined: 2/17/2010
Posts: 2
Points: 6
Location: Frankfurt
Thomas wrote:
Hi thmanthey2,

That's a good suggestion, thanks. Are you able to continue with NConstruct Lite wizard or does this exception block it?


I can continue to Application Settings after I click OK

I think I know whats going on.

I see 3 bugs:

First is my previous post. This environment has a lot of domains with all kinds of servers and versions. But all SQL-Server permissions are based on SQL-Server not Windows-Users. The solution is to simulate the SQL-Server Management Studio connection dialog. It browses the network only on demand. Maybe you can simulate this if you disable the "Guest" account on your testing SQL-Server.

2,3 are in the Application Settings Dialog.

I enter the SQL-Server manually and uncheck "trusted user" (I like the SQL-Server Management Studio term "Windows Authentication" more). Now I get "Failed to connect to server" error message (see exception 2) as it tries to login with user "Guest". You should not connect to the server if check/uncheck "trusted user". I click OK and again on trusted user. This time it gets unchecked without connection attempt. (I assume the bug is hidden in the validator of the Search button.)

Next is I enter Username and Password and click on the triangle of the "Database Name" combo box to get the list of databases on the server. Bug 3 is that nothing happens now. I enter the database manually and now I can click on next and this time it connects properly.


Exception 2

- Operating system: Win32NT
- Version: Microsoft Windows NT 5.1.2600 Service Pack 3
- Service pack: Service Pack 3

Failed to connect to server PC2049.

Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server PC2049. ---> System.Data.SqlClient.SqlException: Login failed for user 'PC2049\Guest'.
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.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
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 Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect(WindowsIdentity impersonatedIdentity)
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
at Microsoft.SqlServer.Management.Common.ConnectionManager.get_ServerVersion()
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetServerVersion()
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_ServerVersion()
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetDbComparer(Boolean inServer)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitializeStringComparer()
at Microsoft.SqlServer.Management.Smo.AbstractCollectionBase.get_StringComparer()
at Microsoft.SqlServer.Management.Smo.SimpleObjectCollectionBase.InitInnerCollection()
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.get_InternalStorage()
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.InitializeChildCollection(Boolean refresh)
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.GetEnumerator()
at NConstructBuilderPro.WizardPages.UserControls.Sql2005DatabaseSelection.RefreshDatabases()
Thomas
Posted: Wednesday, February 17, 2010 4:32:33 PM
Rank: Advanced Member
Groups: Member

Joined: 7/30/2007
Posts: 59
Points: 177
Hi tmanthey2,

Thanks again, it's very useful what you've posted. We have added another setting in the Application Options which may be used for enabling or disabling automatic SQL servers/databases searching. Automatic searching is enabled by default.



We have also corrected server searching as there was indeed a bug (reported as bug #1 in your post).

Issue #2 comes from Microsoft.SqlServer.Management.Smo.SqlSmoObject library so we have just handled reported exception. It seems the code in this library browses for SQL servers using guest account indeed.

We didn't change anything for the issue #3 - if someone disables automatic SQL server/database searching both server and database name must be entered manually.

You can expect new NConstruct Lite version very soon (presumably tomorrow).




Regards
Thomas


NConstruct Support Team
support@nconstruct.com
http://www.nconstruct.com

Thomas
Posted: Friday, February 19, 2010 11:08:12 AM
Rank: Advanced Member
Groups: Member

Joined: 7/30/2007
Posts: 59
Points: 177
Hi tmanthey2,

I hope NConstruct Lite 2.5.2 solves your problems. I'd like to hear your feedback.




Regards
Thomas


NConstruct Support Team
support@nconstruct.com
http://www.nconstruct.com

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.6 (NET v2.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.044 seconds.