无法使用Visual Studio托管,以查看应用程序部分的数据SharePoint.Working的前提
问题描述:
哎嗨,大家好,我中某些问题,请指导我怎么做无法使用Visual Studio托管,以查看应用程序部分的数据SharePoint.Working的前提
我做了一个应用程序的一部分,我试图将其添加仪表板,其打开时,在内部网有一个人登录在SharePoint account.I正在做相同的步骤,如上面的链接
http://www.codeproject.com/Articles/524232/StepplusbyplusStepplusguideplustopluscreateplusapl
但在这个环节的家伙已经选择的SharePoint托管和我使用在前提主机请指导我什么,我应该能够得到应用程序的一部分,但在应用程序部分我收到错误消息s.Picture被attched有错误..
我做了什么,如下所示:创建于VS客户端Web部件 1),代码如下:
<%@ 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)增加了代码路径打开在I帧中Element.xml:代码被写入下面被示出在I帧使用以下代码
<
?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)创建的页面:
我得到在应用部分<%@ 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.
答
如果您提示以下错误:此https://localhost:44300。请检查您的应用程序是否正确部署。 请使用以下提到的网址来创建你的开发机器的SharePoint托管应用程序 https://msdn.microsoft.com/en-us/library/office/fp179923.aspx
但拉胡尔我只是编译Visual Studio的计划,我没有它。我部署我只是编译它,当我看到ie.This错误消息来自他们的应用程序标准和休息的工作很好......我做什么shoulf ......? –
抱歉无法理解;你是否在做F5并检查相同的内容,或者你如何在IE上看到这些内容? – Rahul
是的,我做f5 ...而不是应用程序部分它带有错误信息。 –