RaouL_BennetH
23-12-2010, 11:54
Ciao a tutti :)
Ho fatto un'applicazione composta da due progetti, che utilizza Entity Framework.
Dal mio pc, tutto funziona correttamente.
Ho creato il progetto di setup e ho eseguito l'installazione su un altro pc.
Su questo pc gira la stessa versione di Sql Server 2008 che uso io in locale.
Il database è stato importato correttamente.
Il problema che ho è con il file app.config.
Pur cambiando il nome del server in detto file, ottengo sempre questo errore:
The specified named connection is either not found in the configuration,
not intended to be used with the EntityClient provider, or not valid.
I file di configurazione sono questi:
//Sul mio PC
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="EmpManagerEntities" connectionString="metadata=res://*/EntityManager.EntityEmployeeModel.csdl|res://*/EntityManager.EntityEmployeeModel.ssdl|res://*/EntityManager.EntityEmployeeModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=INPBOG200\SQLEXPRESS2008;Initial Catalog=empmanager;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
//e questo è per l'altro pc
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="EmpManagerEntities" connectionString="metadata=res://*/EntityManager.EntityEmployeeModel.csdl|res://*/EntityManager.EntityEmployeeModel.ssdl|res://*/EntityManager.EntityEmployeeModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=OL871\SQLEXPRESS2008;Initial Catalog=empmanager;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
Non riesco a trovare una soluzione neanche con i link trovati su msdn.
:help:
RaouL.
Ho fatto un'applicazione composta da due progetti, che utilizza Entity Framework.
Dal mio pc, tutto funziona correttamente.
Ho creato il progetto di setup e ho eseguito l'installazione su un altro pc.
Su questo pc gira la stessa versione di Sql Server 2008 che uso io in locale.
Il database è stato importato correttamente.
Il problema che ho è con il file app.config.
Pur cambiando il nome del server in detto file, ottengo sempre questo errore:
The specified named connection is either not found in the configuration,
not intended to be used with the EntityClient provider, or not valid.
I file di configurazione sono questi:
//Sul mio PC
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="EmpManagerEntities" connectionString="metadata=res://*/EntityManager.EntityEmployeeModel.csdl|res://*/EntityManager.EntityEmployeeModel.ssdl|res://*/EntityManager.EntityEmployeeModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=INPBOG200\SQLEXPRESS2008;Initial Catalog=empmanager;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
//e questo è per l'altro pc
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="EmpManagerEntities" connectionString="metadata=res://*/EntityManager.EntityEmployeeModel.csdl|res://*/EntityManager.EntityEmployeeModel.ssdl|res://*/EntityManager.EntityEmployeeModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=OL871\SQLEXPRESS2008;Initial Catalog=empmanager;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
Non riesco a trovare una soluzione neanche con i link trovati su msdn.
:help:
RaouL.