0

I get this message after creating an access rule in ASP.NET Configuration security tab:

"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)

When I run the application locally everything work as it should, but when I upload it to my web server, hell breaks loose... The access rule I created is for a sub folder and is taking care that only members are allowed to access it. And as I said, everything work locally. I am using the membership model. When the rule is not active, everything work, except that then the member area is open of course...

Any thoughts?

r5d
  • 579
  • 5
  • 24
  • That is the generic message that basically says "I cannot connect to Sql Server...for ~some reason". It could be the servername/databaseName. It would be the identity trying to talk go the database, it could be a firewall issue. Post more about your connection string for better hints. But your application cannot talk to your database...........that's what the error means. (In a very generic way.....) – granadaCoder Jan 02 '14 at 20:29
  • Thank you @granadaCoder for your comment. When the access rule is created a new web.config file for the membership folder is created, which only contain the authorization keys. It's when I upload this that the message appears... Nothing else is changed. – user3154929 Jan 02 '14 at 20:42
  • Connection string: – user3154929 Jan 02 '14 at 20:48
  • The poor's man's check is to go to Control Panel / Admin Tools / Data Sources (ODBC) .. and create an new System DSN. You can delete it later. But that will tell you if you can connect to the db using your credentials .. outside of "code". – granadaCoder Jan 02 '14 at 21:46
  • Did you configured your sql server for remote access? Make a search for the configurarion steps, and then check again – Juan Jul 30 '15 at 03:15

0 Answers0