Question

Je déplouve une application autohosted pour SharePoint 2013 (en ligne).

Dans le projet Web de mon application Autohosted, une base de données est ainsi déployée sur la bande distante (sur Windows Azure) lorsque mon application Autohosted est déployée.

Mais j'aimerais savoir s'il est possible d'accéder à cette base de données d'un autre endroit que dans la bande distante de mon application Autohosted?

Actuellement, je n'ai pas été capable de trouver une chaîne de connexion ou autre chose qui pourrait me permettre d'accéder à la base de données du Web distant déployé, faites-vous une idée ou une solution à ce sujet?

Merci beaucoup pour votre aide!

Était-ce utile?

La solution

It is actually possible. If you follow this post http://msdn.microsoft.com/en-us/library/office/apps/fp179902.aspx to include the database in your app, you have to create a SqlAzureConnectionString app setting.

When you publish this app and use it, the connectionstring is replaced with the connectionstring for the sql azure database. If you write this setting to a page, you are able to see the actual connectionstring. It will look something like this:

"Data Source=b2p09toyr4.database.windows.net;Initial Catalog=db_a6d1dee5_4ee6_47f3_ba44_9858f706f141;User ID=db_a6d1dee2_4ee6_47f3_ba45_9858f706f141_dbo;Password=21F4balh/453.Pq"

You are then able to create a connection with SQL Management Studio. (Don't forget to expand the options and connect to your database because you can't connect with the master database)

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top