This project has moved and is read-only. For the latest updates, please go here.

Can't get new install of TicketDesk to work

Oct 8, 2014 at 10:35 PM
I have installed version 2.1.2 from Codeplex and followed the instructions. Everytime I try to execute the application in IIS I get the following response from IE:


Server Error in '/TicketDesk' 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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)
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: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)

I've tried it first attaching the mdf file to the database, and with no database created. Same result. I'm using SQLEXPRESS 2008r2 and can separately connect via ODBC and OLEDB, but not using this app.

What am I doing wrong?
Oct 9, 2014 at 4:12 AM
Edited Oct 9, 2014 at 4:14 AM
This error is very specific. The web server is unable to connect to your SQL server service. It hasn't gotten as far as trying to login or locate the specific database, it can't even find the server.

You can troubleshoot this online as if it were any asp.net application having this problem, but here are the three most common causes:
  1. One of the two connection strings in web.config have the wrong "data source" value. This value should be the network name of your server, followed by a backslash, followed by the name of the SQL instance (for a default instance, you omit the instance name and slash). The standard instance name for SQL Express is "\SQLExpress", but during setup you may have changed this option. The network name can be an IP address, DNS name, or (less commonly) a WINS/Windows Network Name. If the web server is on the same physical machine as the SQL Express service, then the data source is usually set to "localhost\SQLExpress", though "(local)\SQLExpress" and ".\SQLExpress" are also common variations.
  2. You need to enable TCP/IP for the SQL service. Starting with SQLExpress 2008, the default installation does NOT enable the TCP/IP protocol. The simplest instructions for enabling TCP/IP in SQL is found here. You may also have to enable TCP/IP in the configuration manager for the SQL network client as well.
  3. Your firewall may need to be altered to allow connections from the web server to the SQL server. Even if both are installed locally, the firewall can prevent connections in some cases --especially if you are using the ip address or DNS name in the connection string instead of a well known option like localhost or the loopback address 127.0.0.1.