views:

509

answers:

2

The Scenario

I've been following Brad Abrams Silverlight tutorial on his blog....

I have tried following Brads "How to deploy your app to the Cloud" tutorial however i'm struggling with it, even though it is in the same context as the first tutorial....

The Question

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

Connection String Issue

In my "Non-Cloud based application", I make use of the ADO.Net Entity Framework to communicate with my database. The connection string in my web.config file looks like:

<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 that I get from SQL AZURE looks like:

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

So how do I go about merging the two when I move the "non-cloud based application" to THE CLOUD?!

Any help regarding converting a silverlight application to a cloud service and deploying it would be greatly appreciated

+1  A: 

Hey,

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

The only addition in the cloud scenario is that you have an extra cloud specific project that acts as the 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 that helps.

Gavin Osborn
A: 

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

to import your database to the SQL Azure. When you are creating an Entity framework model use your local SQL server and later change the connection string in web.config file to SQL Azure connection.

You have to change the connection string slightly to work with sql Azure. Just remove this bit ";MultipleActiveResultSets=True" from the connection string and you are done.

If you still not able to set it up just let me know, I will draft step by step approach.

Hope this helps.

Supremestar