This project is read-only.

Problems installing slickticket

May 10, 2011 at 7:10 AM

Hello.

I am trying to install Slickticket in my home. I follow all the instructions in the wiki pages but when I arrived to AD setup (active_directory.aspx) I got the following error.

Server Error in '/' Application.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:

Line 22:         if (!IsPostBack)
Line 23:         {
Line 24:             foreach (security_level s in (from p in db.security_levels where p.id > 1 select p))
Line 25:                 ddlLevels.Items.Add(new ListItem(s.id.ToString() + " " + s.security_level_name, s.id.ToString()));

 

What am I doing wrong? I assigned the bd  user the db_owner, db_reader and db_writer profiles.

 

Thank you.

May 10, 2011 at 1:54 PM
Edited May 10, 2011 at 7:58 PM

As the error says (and numerous posts on this board) this is a sql connection problem.  Check your connection string and check it again - log into ssms with the creds until you have the proper rights, this is exactly what the error says it is.

Sep 22, 2011 at 9:35 AM

I just got more or less the same problem and managed to fix it.

in web.ui\setup\active_directory.aspx method Page_load(object sender, EventArgs e) there is a call on line 21:

db = new stDataContext();

the default, parameterless stDataContext constructor is as follows:

public stDataContext() :base(global::SlickTicket.DomainModel.Properties.Settings.Default.SlickTicket, mappingSource)

The problem is that the DomainModel settings do contain a slickticket setting with the default connectionstring as default, so aslong as you use the local sqlexpress database, it works.

If you however configure your own db connection, different from the default one, then it will find it for the db setup but not for the active directory setup (active_directory.aspx)

This can be solved by either changing the parameterless stDataContext constructor to:

public stDataContext() :base(ConfigurationManager.ConnectionStrings["SlickTicket"].ConnectionString, mappingSource)

or by changing the call to the stDataContext in the active_directory.aspx page_load method to include the connectionstring there:

db = new stDataContext(ConfigurationManager.ConnectionStrings["SlickTicket"].ConnectionString);

Both should work.

Dec 4, 2011 at 12:15 AM

Thank you gemakie, the trick worked for me

I did the second solution and it worked

Dec 4, 2011 at 4:45 PM

Sorry, I did not realize that, I will get that fixed.