6
I cannot run my system queries on IIS, when running in Visual Studio I can get the result easily.
The mistake I get when I try to do something is this::
System.Data.Entity.Core.Providerincompatibleexception: 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. ---> System.Data.Entity.Core.Providerincompatibleexception: The Provider Did not Return a Providermanifesttoken string. ---> System.Data.Sqlclient.Sqlexception: Network or specific error the instance when connecting to SQL Server. The server was not found or was not accessible. Check that the instance name is correct and SQL Server is configured to allow remote connections. (Preview: SQL Network Interfaces, error: 50 - Error Local Database Runtime. Cannot create an Automatic instance. See the Windows Application Event log for error Details. )
EDIT
This is my string Connection:
<add name="db" connectionString="Data Source=(localdb)\V11.0;Initial Catalog=HomeAutomexdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
If you need more information, please just let us know.
Did you enable TCP/IP communication in SQL Server by SQL Server Configuration? If you can post your connectionString it would be nice, just change user and password to something like ***, and change whatever else you don’t want to be shown with the correct name, thus changing to a "fake name".
– user3628
In SQL Server Configuration TCP/IP is enabled. I added the Connection string
– Filipe Oliveira
Ok, so I believe your problem is the user, since you are Security Integrated. Try putting a user and password. Example:
connectionString="Data Source=(localdb)\V11.0; Initial Catalog=HomeAutomexdb; User Id=Administrator; Password=123456"
.– user3628
Another thing, why give
(localdb)
? Try changing only to(local)\V11.0
, or with the instance name as well:(local)\MSSQLSERVER
.– user3628
The server name also:
Data Source=SERVIDOR\MSSQLSERVER
.– user3628
In SQL Server 2012 I could only log into the local database using the name of the server this way. Switching to local I can not connect.
– Filipe Oliveira
Failed to set a username and password?
– user3628
I didn’t try, I was using windows authentication same
– Filipe Oliveira
The problem with windows appliance in the context of IIS is that it is not you, as in a console appliance or in the local Visual Studio, but it is the service or windows Account of the Application Pool below which the site was configured in IIS. For a quick test, you can set up Application Pool Identity with your windows Account...but any other senator needs a 'service Account' or other system to authorize the user credentials.
– mdisibio