嗨嗨我要面对的人有些问题请指导我做什么
我已经制作了一个应用程序部分,我正在尝试添加Dashboard,当在sharepoint帐户的Intranet中进行一些登录时打开。我正在执行与上面链接中所示相同的步骤
http://www.codeproject.com/Articles/524232/StepplusbyplusStepplusguideplustopluscreateplusapl
但是在这个链接中,这个家伙选择了sharepoint托管,我正在使用Premise Hosting请指导我应该能够获得应用程序部分,但在应用程序部分我收到错误消息。图片有错误。
我的所作所为: 1)在VS中创建了一个客户端Web部件,代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClientWebPart1.aspx.cs" Inherits="BI_ApplicationWeb.Pages.ClientWebPart" %>
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
// Set the style of the client web part page to be consistent with the host web.
(function () {
'use strict';
var hostUrl = '';
if (document.URL.indexOf('?') != -1) {
var params = document.URL.split('?')[1].split('&');
for (var i = 0; i < params.length; i++) {
var p = decodeURIComponent(params[i]);
if (/^SPHostUrl=/i.test(p)) {
hostUrl = p.split('=')[1];
document.write('<link rel="stylesheet" href="' + hostUrl + '/_layouts/15/defaultcss.ashx" />');
break;
}
}
}
if (hostUrl == '') {
document.write('<link rel="stylesheet" href="/_layouts/15/1033/styles/themable/corev15.css" />');
}
})();
</script>
</head>
<body>
</body>
</html>
2)添加了在Element.xml中打开Iframe的代码路径:代码写在
下面&LT;
?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ClientWebPart Name="ClientWebPart" Title="ClientWebPart Title" Description="ClientWebPart Description" DefaultWidth="800" DefaultHeight="450">
<Content Type="html" Src="~remoteAppUrl/Pages/AppPart/ClientWebPart1.aspx" />
<Properties>
</Properties>
</ClientWebPart>
</Elements>
3)在iframe中显示的创建页面使用以下代码:
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<WebPartPages:AllowFraming ID="AllowFraming1" runat="server" />
<div>Simple Client App Part</div>
我正在使用应用程序部分的错误消息是这样的
This page can’t be displayed
•Make sure the web address https://localhost:44300 is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
答案 0 :(得分:0)
如果您收到以下错误https://localhost:44300。请检查您的应用是否已正确部署。 请使用下面提到的URL为SharePoint托管应用程序创建开发计算机 https://msdn.microsoft.com/en-us/library/office/fp179923.aspx