Converting a C # Silverlight application to the AZURE CLOUD framework?

Scenario

I followed the Brad Abrams Silverlight Tutorial on his blog ....

I've tried using Brads "How to Deploy an Application in the Cloud" but I'm struggling with it even though it's in the same context as the first tutorial ....

Question

Is the application structure essentially the same as the original "cloud-based version" !? If not, which parts are different? (I understand that a Cloud Service project has been added to the solution), but what else ?!

Connection string error

In my non-Cloud application, I am using ADO.Net Entity Framework to communicate with my database. The connection string in my web.config file looks like this:

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

      

However

However, the connection string I get from SQL AZURE looks like this:

 Server=tcp:k12ioy1rsi.ctp.database.windows.net;Database=master;User ID=simongilbert;Password=myPassword;Trusted_Connection=False;

      

So how do I merge those two when I move the "no cloud app" to THE CLOUD ?!

Any help related to converting a Silverlight application to a cloud service and deploying it would be greatly appreciated

+2


source to share


2 answers


The simple answer to your first question is, yes, your project structure is exactly the same as the "non-based version" from the point of view of your web application.

The only addition to the cloud scenario is that you have an additional cloud project that acts as a role that hosts your web application.



I have not tried Entity Framework with SQL Azure, but this article indicates that it is possible and explains how to do it.

Hope it helps.

+2


source


Just create the structure on your local SQL server and use the AZURE SQL Migration Wizard

to import your database into SQL Azure. When you create the Entity framework model, use your local SQL server and then change the connection string in your web.config file to Azure SQL connection.

You need to slightly modify your connection string to work with Azure sql. Just remove that bit "; MultipleActiveResultSets = True" from your connection string and you're done.



If you still can't set it up, just let me know, I'll post it step by step.

Hope it helps.

0


source







All Articles