문제

SharePoint 2013 (온라인)에 대해 AutoHosted 앱을 배포하고 있습니다.

내 AutoHosted 앱의 웹 프로젝트에서는 자동 호출 된 앱이 배포 된 경우 원격 웹에 원격 웹 (Windows Azure)에 배포 된 데이터베이스가 있습니다.

하지만 AutoHosted App의 원격 웹 내부와 다른 장소 에서이 데이터베이스에 액세스 할 수 있는지 알고 싶습니다.

현재 배포 된 원격 웹의 데이터베이스에 액세스 할 수있는 연결 문자열이나 다른 항목을 찾을 수 없었습니다. 누군가가 아이디어가 있습니까?

당신의 도움을 주셔서 감사합니다!

도움이 되었습니까?

해결책

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 ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top