DB connection issue

Topics: Installing BugNET
Mar 21, 2014 at 5:57 PM
I tried to install bug.Net on my SQL Server 2008 R2 instance (NOT SQLEXPRESS). So I modified the connection string so:
<add name="BugNET" connectionString="Data Source=.\MSSQLSERVER;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
where MSSQLSERVER is the instance name of SSqerver on my computer. If I try to open the /install/install.aspx page, I get these errors:
  1. 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: 25 - Connection string is not valid)
  2. Error: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.
The first one repeated twice.

So, I'd like to know what's wrong in my connection string... Your help is appreciate!

The asp.net v4 app pool identity has the right permissions on the BugNet folder.

P.S. - Sorry for my english... :(
Mar 21, 2014 at 6:29 PM
Should I create a new database? And how to call it?
Or I've to manually attach the database.mdf located in the App_Data folder?
Mar 22, 2014 at 6:15 PM
You should create a new database at your sql server instance. There are no special difference between EXPRESS or STANDARD versions of MS SQL.
Then you should check permissions and connection string at your web.config

Check installation instructions for details (Installing Using SQL Server chapter)
Marked as answer by wally75 on 3/24/2014 at 2:48 AM
Mar 24, 2014 at 10:48 AM
Hi, I solved the issue before of reading your post and the linked page, by attaching manually the mdf database in app_data and naming it BugNet. To avoid to edit permissions I copied it into the MSSQL data folder.
I edit also the ConnectionString in this way:
        <add name="BugNET" connectionString="Data Source=localhost;Initial Catalog=BugNet;Integrated Security=True;" providerName="System.Data.SqlClient" /> 
Although I didn't find it in MSDN or other official Microsoft documentation, I read on many forums that attachDbFileName in connectionstrings is allowed only in the EXPRESS version of SqlServer. For example you can find it here:

I don't know if this is right or wrong, but attaching manually the DB and modifying the connectionstring as above my installation works fine! :)
However... thank you for your response! ;)
Marked as answer by wally75 on 3/24/2014 at 2:48 AM