sharepoint托管的应用程序显示空白页 [英] sharepoint hosted app shows blank page

查看:107
本文介绍了sharepoint托管的应用程序显示空白页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照以下步骤,在前提服务器场中的SP 2016中创建了SharePoint托管应用;


如果要创建和部署SharePoint托管应用程序,则必须创建一个隔离的应用程序域,您的SharePoint应用程序将在其中运行. 1.启动SharePoint 2013命令行管理程序.

为您的应用创建隔离的应用域,例如"apps.practise.com".

    确保SPSubscriptionSettingsService和AppManagementServiceInstance服务正在运行.

验证SPSubscriptionSettingsService和AppManagementServiceInstance服务正在运行.

您必须指定将在其下运行SPSubscriptionService和AppManagementServiceInstance服务的服务器场管理员帐户.该服务器场管理员帐户必须是SPManagedAccount.如果您的服务器场管理员不是SPManagedAccount,则可以创建一个SPManagedAccount 通过在SharePoint命令行管理程序中键入以下命令使用服务器场管理员凭据(将提示您输入服务器场管理员域\用户名和密码).

为SPSubscriptionService和AppManagementServiceInstance服务指定服务器场管理员帐户,应用程序池和数据库设置.

         
步骤2:启动所需的服务

要使用管理中心配置应用程序URL,请执行以下步骤. •在管理中心中,单击应用程序". •在应用程序"页面中,单击配置应用程序URL". •在应用程序域"框中,键入先前为托管应用程序而创建的应用程序域.就我们而言 我们已经使用了app.practice.com. •在应用程序前缀"框中,键入名称以用作应用程序的URL前缀. •单击确定.

部署的应用程序将显示在网站内容中.但是,在单击应用程序名称时会生成空白页.

解决方案

请检查以下内容:

1.请确保您已将该加载项部署到开发人员网站中.

2.如果通过HTTP浏览了站点/应用程序,并且您遇到上述现象(空白页),请将该Web应用程序的默认区域URL设置为HTTP,然后重试.

3.如果通过HTTPS浏览了站点/应用程序,并且您遇到上述现象(空白页),请将该Web应用程序的默认区域URL设置为HTTPS,然后重试.

4.检查ULS日志以查看是否出现一些错误消息.

更多信息:

I am quite new to Sharepoint Apps.

Following the below steps, have created a SharePoint hosted App in SP 2016 on premise farm;


Configuring an "on-premise" development environment for Apps for SharePoint

Step 1: Create an Isolated App Domain

If you want to create and deploy SharePoint Hosted apps, you must create an isolated app domain where your apps for SharePoint will run. 1. Start the SharePoint 2013 Management Shell.

• net start spadminv4 • net start sptimerv4

  1. Create your isolated app domain your apps, for example "apps.practise.com".

• Set-SPAppDomain "apps.practise.com"

  1. Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.

Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance

  1. Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.

Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}

  1. You must specify a farm admin account under which the SPSubscriptionService and AppManagementServiceInstance services will run. This farm admin account must be an SPManagedAccount. If your farm admin is not an SPManagedAccount, you can create a SPManagedAccount with your farm admin credentials by typing the following command in the SharePoint Management Shell (You will be prompted for the farm admin domain\user and password).

$account = New-SPManagedAccount

  1. Specify a farm admin account, application pool, and database settings for the SPSubscriptionService and AppManagementServiceInstance services.

$account = Get-SPManagedAccount "domain\username" $appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

    $appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account

    $appSubSvc = New-SPSubscriptionSettingsServiceApplication ApplicationPool $appPoolSubSvc Name SettingsServiceApp DatabaseName SettingsServiceDB

    $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy ServiceApplication $appSubSvc

    $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB

    $proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc

Step 2: Start the Required Services

To verify this, click Start -> point to Administrative Tools -> and then click Services. In the Services list, verify that the SharePoint Administration and SharePoint Timer services are running. For apps to work, you need to have the App Management and Subscriptions Settings Service Applications configured. Before creating these service applications verify that the following services are running in the Manage Services on Server page. • App Management Service • Microsoft SharePoint Foundation Subscription Settings service You can verify the same from the Services on Server page in central admin.

Step 3: Configure App URLs

To configure App URLs using Central Admin, follow the below mentioned steps. • In Central Admin, click on Apps. • In Apps page, click on Configure App URLs. • In the App domain box, type the app domain that was created earlier for hosting apps. In our case we have used app.practice.com. • In the App Prefix box, type a name to use for the URL prefix for the apps. • Click OK.

• Open Visual Studio 2013 instance and select App for SharePoint 2013 template to create the project. • Select SharePoint-hosted as the hosting platform for our app. • Put the site collection URL on which we want to deploy app. (Site collection template should be developer site). • Here App.js file is our main JavaScript file where the entire logic is there and default.aspx is the landing page of the app where we will reference the App.js file. • If you look at the App.js file, by default some logic is written there. It is fetching the current logged in user’s name and displaying that. Let us keep it same and not add any business logic here and try deploying this app. • Right click on the project name and deploy. You might encounter below errors.

Error 1: "Error occurred in deployment step ‘Install app for SharePoint’: The System Account cannot perform this action." SharePoint will not allow you to install nor uninstall apps using the farm account (System Account). If you try to deploy your app using Visual Studio F5 you will get one of the following errors if you do it using System Account: Solution: Now try to log in into the machine using some other account and try to install the app. You might receive the following error.

Error 2: "Error occurred in deployment step "Installed app for SharePoint": The local SharePoint server is not available. Check that the server is running and connected to the SharePoint Farm" Solution: To resolve the above error login using system account and open the SQL server management studio and assign the db_owner permissions to the account which you are using to deploy the app for below databases. • SharePoint_Config • SharePoint_Admin_ [GUID] • Current web application content database that needs to host the app • App management service application database • Subscription Settings service application database (Optional)

Now try to deploy the App. App will be successfully deployed.

The deployed App is showing in Website content. However on click of app name a blank page gets generated.

Kindly let know what i am missing.

解决方案

Hi,

Please check as follows:

1. Please make sure you have deployed the add-in into developer site.

2. If the Site/App is browsed over HTTP and you experience the above behavior (a blank Page), set the Default zone URL of that web application to HTTP and try again.  

3. If the Site/App is browsed over HTTPS and you experience the above behavior (a blank Page), set the Default zone URL of that web application to HTTPS and try again.

4. Check the ULS log to see if some error messages occurs.

More information:

https://social.technet.microsoft.com/wiki/contents/articles/15713.sharepoint-2013-app-web-renders-a-blank-page-when-you-try-to-browselaunch-an-app-from-a-sharepoint-site-over-http-or-https.aspx

Best Regards,

Dennis


这篇关于sharepoint托管的应用程序显示空白页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆