zoukankan      html  css  js  c++  java
  • Configure Apps for SharePoint 2013

    Configure Apps for SharePoint 2013

    Microsoft has published a very comprehensive set of guidelines for installing, configuring and managing Apps for SharePoint 2013. These guidelines are available on the TechNet site here: http://technet.microsoft.com/en-us/library/fp161232.aspx. Without duplicating those details however, I wanted to capture the few necessary steps for those who wanted to quickly get apps for SharePoint 2013 going on a dev. farm. Please note that the examples assume you are using the VM downloaded from my earlier blog post:

    1. Configure DNS entries: First a little background on why we need to do this - Each installation of an app has a unique URL in your environment. You determine the template for that URL (by determining a domain name and an app prefix), and then app URLs are automatically generated based on that template. Paths for the apps are based on the URL for the site where they are installed. When you install an app to a site, a SubWeb of that site is created to host the app content. The SubWeb for the app is hierarchically below the site collection, but has an isolated unique host header instead of being under the site’s URL. It is recommended to configure a separate DNS for your apps. The difference in domain names provides a layer of isolation for the apps. The use of a different domain name from the SharePoint sites prevents cross-site scripting between the apps and sites and unauthorized access to users’ data. Once you have configured the DNS, you will want to create a wildcard DNS so any app URLs that SharePoint creates can be serviced. The screen shot below shows a “*.apps” wildcard CNAME record:
      DNS
    2. Enable Services on the server:Browse to “Central Administration –> System Settings –> Manage Services on server” and ensure that the “App Management Service” and “Microsoft SharePoint Foundation Subscription Settings Service” services are started:
      Services
    3. Configure the Subscription Settings service application and proxy:  You can do so by running the following commands in the SharePoint 2013 Management Shell (PowerShell) – examples below assume you are using the VM downloaded through my blog post:
      1. $account = Get-SPManagedAccount “<farm account>”
        • Where: <farm account> is the name of the Farm administrators account in the SharePoint farm
        • Example: $account = Get-SPManagedAccount “sp_farm”
      2. $appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
      3. $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName <SettingsServiceDB>
        • Where: <SettingsServiceDB> is the name that you’d like to give to the new Subscription Settings Service database that the above command will create
        • Example: $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName App_SubscriptionSettingsService
      4. $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
    4. Configure the App Management service application and proxy:  You can do so by running the following commands in  SharePoint 2013 Management Shell (PowerShell) - again, examples below assume you are using the VM downloaded through my blog post:
      1. $account = Get-SPManagedAccount “<farm account>”
        • Where: <farm account> is the name of the Farm administrators account in the SharePoint farm
        • Example: $account = Get-SPManagedAccount “sp_farm”
      2. $appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
      3. $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName <AppServiceDB>
        • Where: <AppServiceDB> is the name that you’d like to give to the new App Management Service database that the above command will create
        • Example: $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName App_AppManagmentService
      4. $proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
    5. Configure the app URLs in Central Admin: Browse to “Central Administration –> Apps –> Configure App URLs” and enter the wildcard CNAME entry that you created above (in step 1) along with an app prefix as depicted below:
      APP URLs

    That’s all you would need to do to get started. Now, a few issues that I faced in my environment (and how to overcome them):

    1. Access denied error when trying to configure the Subscription Settings service application: You are most likely going to face this issue if you are using the VM created by me. The underlying cause for this issue is that for some reason, the SQL server installation did not configure permissions correctly on the “Data” directory. This results in a failure when PowerShell tries to create the database for the service application. To overcome the issue you will manually need to grant the “SQLServerMSASUser$SP2013$MSSQLSERVER” Read and Write access to the data directory:
      DataDirectoryPermissions
    2. 401.1 error: The second issue that I faced was the http 401.1 error that I received after adding an app from the SharePoint App Store and browsing to this newly added app. There are 2 workarounds for this issue that Microsoft describes in this KB article. I am going to duplicate the recommended approach described in this KB:
      1. Open the registry editor (regedit.exe)
      2. Browse to the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
      3. Add a new Multi-String Value and call it: BackConnectionHostNames
      4. Edit the value and enter *.gauravmahajan.net and gauravmahajan.net in two different lines:
        BackConnection
      5. Close the registry editor and restart the machine
      6. Browse to your app again and it should now open just fine after you provide the required credentials.
      7. In case the above does not work, you may want to go for the second workaround described in the KB (but only in non-production environments)

    Hope the above helps you in getting a quick start on using Apps for SharePoint 2013!

  • 相关阅读:
    activity 之间传递参数
    手动创建一个Activity,完成页面跳转(intent 无参数)
    C++中汉字字符串的截取
    android基础知识清单。
    更改远程仓库
    设计模式六大原则
    事件订阅代码
    Python Mac ssl.SSLError certificate verify failed (_ssl.c:833)
    Python库中常见的 __all__ 变量是干啥的
    Thrift的使用-Python
  • 原文地址:https://www.cnblogs.com/ahghy/p/3066380.html
Copyright © 2011-2022 走看看