1

i'm currently trying to add a login control to my program, but the problem is, whenever i try to login/register or use the asp configuration tool and go on the security tab, it won't work. It says it's not connecting to the provider. I am new to programming and don't really know what to do with web.config's and for the membership provider to work. Simply put, I can't utilise an SQL server. whenever i try using the aspnet_regsql.exe, it gives me an error saying it can't access it. And whenever i try to create or connect to one, same error. Please help. Thank you in advance.

edit: I get this error whenever i try registering a user with a blank web.config.


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)


Also, whenever i try adding a new sql server database, it jut gives me an error saying the sql server was not found or inaccessible

I created the login control by following this tutorial http://msdn.microsoft.com/en-us/library/879kf95c(v=vs.100).aspx

Brian Robbins
  • 290
  • 3
  • 17
  • 4
    [7 things to check to resolve “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”](http://www.sswug.org/articlesection/default.aspx?TargetID=44331) – Habib Mar 20 '14 at 15:47
  • are you able to connect to SQL using SSMS? –  Mar 20 '14 at 16:48
  • Nope, I can't connect using SSMS. I don't know what seems to be the problem. – user3442765 Mar 21 '14 at 03:12
  • I tried creating a new sql server database, It just keeps saying Login failed for user. – user3442765 Mar 21 '14 at 07:52
  • i uninstalled sql 2008 express and installed sql 2012, i somehow got to the website administration and looks like it worked, but it still gives me an error 26 whenever i go to the security > add roles section of the tool. – user3442765 Mar 26 '14 at 01:20
  • did you allow mix authentication on sql server login? – angelogogo May 12 '14 at 07:59

1 Answers1

0

Usually this error occurs when you use SQL authentication by providing user name and password within the connection string, instead of windows authentication. But SQL authentication was not enabled at SQL server level.

Please refer following post SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified to enable SQL authentication at server.

Community
  • 1
  • 1