How do ServiceConfiguration.cscfg and ServiceDefinition.csdef play with WebConfig in Azure?

I have a great Silverlight application that I have successfully converted and added a CloudService project. I uploaded the database to SQL Azure and everything works fine from my webconfig file with connecting to this database on SQL Azure. So, my next step, when I collapsed, was to add the Cloud Service to my solution and install this service as a launch.

So, I assume that I am not adding the connection string correctly in ServiceConfiguration.cscfg / ServiceDefinition.csdef

The error I get: error message for Query LoadUsers: System.ServiceModel.DomainServices.Client.DomainOperationException: load operation failed for request "LoadUserInfo". The remote server returned an error: NotFound .....

My connection string looks like this: webconfig:

<add name="LiveEntities"   connectionString="metadata=res://*/LiveModel.csdl|res://*/LiveModel.ssdl|res://*/LiveModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.;Initial Catalog=Live09092010;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

Do I need to put the same connection string in ServiceConfiguration.cscfg / ServiceDefinition.csdef and what should it look like?

Solution Live
 SilverLight App proj 1
  --files
 Silverlight App proj 2
  --files
 Silverlight App proj 3...
  --files...

 Live.Web
  --My Project
  --Default.aspx
  --Web.config
  --etc..

 LiveCloudServices
  Roles
   --Live.Web
  --ServiceConfiguration.cscfg
  --ServiceDefinition.csdef
+3
source share
2 answers

Serviceconfiguration.cscfg and Service Definition.csdef help determine how Azure Fabric will host your application. Application settings should now sit in these files, if you do not need them to be there.

, - . , ( ), .

, cscfg, - . , , , , ServiceConfiguration.

.cscfg , . , .

+2

Thanx , DevFabric . , Local Local Silverlight. , Azure :)

+1

Source: https://habr.com/ru/post/1764123/


All Articles