我正在为SharePoint 2013部署一个自动硬质应用程序(在线)。

在我的自动软件应用程序的Web项目中,有一个数据库,这些数据库在部署了我的自动软件应用程序时部署在远程Web(在Windows Azure上)。

但我想知道是否可以从另一个地方访问这个数据库而不是我的自动软化应用程序的远程网络?

目前我还无法找到任何连接字符串或其他可能允许我访问部署的远程Web的数据库,有人有一个想法还是解决这个问题?

非常感谢您的帮助!

有帮助吗?

解决方案

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)

许可以下: CC-BY-SA归因
scroll top