كيفية الوصول إلى قاعدة بيانات منتشرة مع تطبيق AutoHosted؟

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/63205

سؤال

أنا نشر تطبيق AutoHosted ل SharePoint 2013 (عبر الإنترنت).

في مشروع الويب الخاص بتطبيق الويب الخاص بي، هناك قاعدة بيانات يتم نشرها وبالتالي على الويب البعيد (على Windows Azure) عند نشر تطبيق My AutoHosted.

ولكن أود أن أعرف ما إذا كان من الممكن الوصول إلى قاعدة البيانات هذه من مكان آخر من داخل الويب البعيد من تطبيقي AutoHosted؟

حاليا، لم أتمكن من العثور على أي سلسلة اتصال أو أي شيء آخر يمكن أن يسمح لي بالوصول إلى قاعدة بيانات الويب البعيد المنشورة، هل لدى شخص ما فكرة أو حل حول هذا؟

شكرا جزيلا لمساعدتكم!

هل كانت مفيدة؟

المحلول

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