具有简单工作流的SharePoint托管应用程序无法正常工作 [英] SharePoint Hosted App with a Simple Workflow not working

查看:79
本文介绍了具有简单工作流的SharePoint托管应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在尝试使用Simple工作流开发SharePoint托管应用程序,但无法在Logs文件夹中记录以下错误。


在检查App' TestWFApp 具有资产ID'':Microsoft.SharePoint.SPException:在检查应用程序的先决条件时遇到错误
。 ---> Microsoft.Workflow.Client.InternalServerException:返回的响应不是来自Workflow Manager。状态代码= 500:  <!DOCTYPE html>  < HTML>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< head>          < title>请求已超时。< / title>          < meta name =" viewport"含量="宽度=设备宽度" />&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< style>      &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;身体{字体家庭:"宋体英寸;字体重量:正常;字体大小:.7em;颜色:黑色;}&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; p {font-family:" Verdana" ;; font-weight:normal; color:black; margin-
-5px}           b {font-family:" Verdana" ;; font-weight:bold; color:black; margin--5px}            H1 {font-family:" Verdana" ;; font-weight:normal; font-size:18pt; color:red
}        ;&NBSP;&NBSP;&NBSP; H2 {font-family:" Verdana" ;; font-weight:normal; font-size:14pt; color:maroon}          预{字体家庭:"索拉","龙力
控制台",等宽;字体大小:11磅;余量:0;填充:0.5em;行高:14pt}&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; .marker {font-weight:bold; color:black; text-decoration:none;}          
.version {color:gray;}           .error {margin-bottom:10px;}           .expandable {text-decoration:underline;字体重量:粗体;颜色:海军;光标:手;
}           @media屏幕和(最大宽度:639px){            pre {width:440px;白色空间:预包装;自动换行:break-word; }&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
}           @media屏幕和(最大宽度:479px){           前{宽度:280px; }&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;}&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< / style>      < /头>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < body bgcolor =" white">                <跨度>< H1>服务器
错误在 '/' 应用程序< HR宽度= 100%的尺寸= 1种颜色=银>< / H1>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < H2> < i>请求超时。< / i> < / H2>< /跨度>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
将字型= QUOT; Arial字体,黑体,日内瓦,SunSans-定期,无衬线">&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP; < b取代;说明:< / b>在当前Web请求的执行
期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。                <峰; br><峰; br>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< b>异常详细信息:< / b> System.Web.HttpException:请求超时。< br>< br>             &NBSP;&NBSP;&NBSP; < b>来源错误:< / b> <峰; br><峰; br>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< table width = 100%bgcolor =" #ffffcc"                &NBSP; < TR>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< td>                      &NBSP;&NBSP; <代码>&NBSP;&NBSP;&NBSP;在执行当前web
请求期间生成了未处理的异常。关于该异常的原因和发生位置的信息可以使用下面的异常堆栈跟踪标识< /代码>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< / td>                 < / TR>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < /表>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< br>                < b>堆栈跟踪:< / b> <峰; br><峰; br>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < table width = 100%
bgcolor =" #ffffcc">                &NBSP; < TR>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < TD>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;<代码><预>&NBSP;&NBSP;&NBSP; [HttpException(0x80004005):请求超时。]  < /预>< /代码>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;
< / td>                 < / TR>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < /表>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< br>                < hr width = 100%size = 1 color = silver>                < b>版本信息:< / b>& nbsp; Microsoft
.NET Framework版本:4.0.30319; ASP.NET版本:4.6.1087.0                < /字体>&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < /体>&NBSP; < / HTML>&NBSP; <! - &NBSP;&NBSP;
[HttpException]:请求超时。  - >客户端ActivityId:25e9d29d-16f2-709a-3c3d-25117e458c7d。 ---> System.Net.WebException:远程服务器返回错误:(500)内部服务器错误。   


 在Microsoft .Workflow.Common.AsyncResult.End [TAsyncResult](IAsyncResult结果)   


 在Microsoft .Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)   


 在Microsoft .Workflow.Client.ClientHelpers.SendRequest [T](HttpWebRequest请求,T内容)     -


- 内部异常堆栈的结束跟踪---   


 在Microsoft .Workflow.Client.ClientHelpers.ValidateServerResponseHeader(HttpWebResponse响应,WebException webException,Guid traceActivityId)   


 在Microsoft .Workflow.Client.ClientHelpers.GetExceptionForErrorResponse(WebException webException,Guid traceActivityId)   


 在Microsoft .Workflow.Client.ClientHelpers.SendRequest [T](HttpWebRequest请求,T内容)   


 在Microsoft .Workflow.Client.WorkflowServiceManager.GetVersion()&NBSP;&NBSP;&NBSP;


 在Microsoft .SharePoint.WorkflowServices.WorkflowCapabilityChecker.GetMissingServiceDependencyNames(SPWeb hostWeb)   


 在Microsoft .SharePoint.SPCapabilityChecker.GetMissingCapabilities(SPAppPrerequisitesCheckingContext context,Boolean shouldLog)   


 在Microsoft .SharePoint.Administration.SPAppPrerequisite.RunCapabilityCheckers(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext,List`1& missingCapabilities)    
-


- 结束内部异常堆栈跟踪---   


 在Microsoft .SharePoint.Administration.SPAppPrerequisite.RunCapabilityCheckers(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext,List`1& missingCapabilities)   


 在Microsoft .SharePoint.Administration.SPAppPrerequisite.CheckMissingCapabilities(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext)   


 在Microsoft .SharePoint.Administration.SPAppPrerequisiteCollection.CheckMissingCapabilities(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext)   


 在Microsoft .SharePoint.Marketplace.SPAppPrerequisitesChecker.Check(SPAppMetadata appMetadata,List`1& missingCapabilities,Boolean shouldLog)


当我将2013工作流程添加到应用程序并在应用程序目录中部署应用程序时,我无法安装该应用。此消息出现:


抱歉,您的服务器不支持此应用。


当我从应用中删除工作流程时,应用安装正确。


我的环境详细信息:


工作流管理器1.0安装在服务器场上


应用程序环境是正确设置。


所有服务器场上都安装了SharePoint 2013.


使用Visual Studio 2013 Ultimate创建工作流程应用程序


我尝试过以下解决方案但对我没有帮助:


  1.       
    已安装的Workflow Manager 1.0 with CU2
  2.   ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
    使用以下代码更改AppPrerequisite:


<? xml
版本 = " 1.0 "
encoding = " utf-8 "
?>


<! - 创建:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9 - >


< 应用程序
xmlns = " http://schemas.microsoft.com/sharepoint/2012/app/manifest "


    
名称 = " TestWFApp "


    
ProductID = " {xxxx} "


    
版本 = " 1.0.0.0 "


    
SharePointMinVersion = " 15.0.0.0 "


>


 < 属性 >


   < 标题 > TestWFApp < / 标题 >


   < StartPage > ~appWebUrl / Lists / List?{StandardTokens} < / StartPage >


 < / 属性 >



 < AppPrincipal >


   < 内部 />


 < / AppPrincipal >


 < AppPermissionRequests >


   < AppPermissionRequest
范围 = " http:// sharepoint / content / sitecollection / web "
= " FullControl "
/>


   < AppPermissionRequest
范围 = " http:// sharepoint / content / sitecollection "
= " FullControl "
/>


 < / AppPermissionRequests >


 < AppPrerequisites >


   < AppPrerequisite
类型 = " 能力 "
ID = " B1DDD88F-6ADD-4700-B5CD-18E451635E24 "
/>


 < / AppPrerequisites >


< / 应用程序 >



先谢谢。


问候,


Pallavi

解决方案

嗨Pallavi,


请尝试执行以下操作:


1.创建SharePoint 2013设计器工作流程(2013模板)并检查其是否有效。


2.创建一个简单的SharePoint托管加载项并检查它是否有效。


3.使用工作流创建SharePoint托管加载项,请参阅以下文章。


将工作流添加到SharePoint托管的SharePoint加载项


https://msdn.microsoft.com/en-us/library/office/mt148590.aspx


在SharePoint托管应用程序中添加工作流程


http://www.c-sharpcorner.com/article/add-t he-workflow-in-sharepoint-hosted-app /


最好的问候,


Dennis


Hi All,

I am trying develop a SharePoint Hosted App with a Simple workflow and it fails logging the below error in Logs folder.

Caught a SPException while checking prerequisites for App 'TestWFApp' with asset id '': Microsoft.SharePoint.SPException: An error has been encountered while checking prerequisites for an app. ---> Microsoft.Workflow.Client.InternalServerException: A response was returned that did not come from the Workflow Manager. Status code = 500:  <!DOCTYPE html>  <html>      <head>          <title>Request timed out.</title>          <meta name="viewport" content="width=device-width" />          <style>           body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}            p {font-family:"Verdana";font-weight:normal;color:black;margin- -5px}           b {font-family:"Verdana";font-weight:bold;color:black;margin- -5px}           H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }           H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }           pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}           .marker {font-weight: bold; color: black;text-decoration: none;}           .version {color: gray;}           .error {margin-bottom: 10px;}           .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }           @media screen and (max-width: 639px) {            pre { width: 440px; white-space: pre-wrap; word-wrap: break-word; }           }           @media screen and (max-width: 479px) {            pre { width: 280px; }           }          </style>      </head>        <body bgcolor="white">                <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>                <h2> <i>Request timed out.</i> </h2></span>                <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">                <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.                <br><br>                <b> Exception Details: </b>System.Web.HttpException: Request timed out.<br><br>                <b>Source Error:</b> <br><br>                <table width=100% bgcolor="#ffffcc">                 <tr>                    <td>                        <code>    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>                      </td>                 </tr>              </table>                <br>                <b>Stack Trace:</b> <br><br>                <table width=100% bgcolor="#ffffcc">                 <tr>                    <td>                        <code><pre>    [HttpException (0x80004005): Request timed out.]  </pre></code>                      </td>                 </tr>              </table>                <br>                <hr width=100% size=1 color=silver>                <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1087.0                </font>        </body>  </html>  <!--   [HttpException]: Request timed out.  --> Client ActivityId : 25e9d29d-16f2-709a-3c3d-25117e458c7d. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.   

 at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)   

 at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)   

 at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)     -

-- End of inner exception stack trace ---   

 at Microsoft.Workflow.Client.ClientHelpers.ValidateServerResponseHeader(HttpWebResponse response, WebException webException, Guid traceActivityId)   

 at Microsoft.Workflow.Client.ClientHelpers.GetExceptionForErrorResponse(WebException webException, Guid traceActivityId)   

 at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)   

 at Microsoft.Workflow.Client.WorkflowServiceManager.GetVersion()   

 at Microsoft.SharePoint.WorkflowServices.WorkflowCapabilityChecker.GetMissingServiceDependencyNames(SPWeb hostWeb)   

 at Microsoft.SharePoint.SPCapabilityChecker.GetMissingCapabilities(SPAppPrerequisitesCheckingContext context, Boolean shouldLog)   

 at Microsoft.SharePoint.Administration.SPAppPrerequisite.RunCapabilityCheckers(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext, List`1& missingCapabilities)     -

-- End of inner exception stack trace ---   

 at Microsoft.SharePoint.Administration.SPAppPrerequisite.RunCapabilityCheckers(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext, List`1& missingCapabilities)   

 at Microsoft.SharePoint.Administration.SPAppPrerequisite.CheckMissingCapabilities(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext)   

 at Microsoft.SharePoint.Administration.SPAppPrerequisiteCollection.CheckMissingCapabilities(SPAppPrerequisitesCheckingContext prerequisitesCheckingContext)   

 at Microsoft.SharePoint.Marketplace.SPAppPrerequisitesChecker.Check(SPAppMetadata appMetadata, List`1& missingCapabilities, Boolean shouldLog)

When I add 2013 workflow to app and deploy app in app catalog, I cannot install the app. This message comes up:

Sorry, this app is not supported on your server.

When I remove the workflow from the app, the app installs properly.

My environment details:

Workflow manager 1.0 is installed on a farm

App environment is setup properly.

SharePoint 2013 is installed on all farms.

Using Visual Studio 2013 Ultimate to create workflow apps

I have tried the below solutions which did not help me :

  1.        Installed Workflow Manager 1.0 with CU2
  2.        Changed the AppPrerequisite with the below code for workflow :

<?xml version="1.0" encoding="utf-8" ?>

<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->

<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"

     Name="TestWFApp"

     ProductID="{xxxx}"

     Version="1.0.0.0"

     SharePointMinVersion="15.0.0.0"

>

  <Properties>

    <Title>TestWFApp</Title>

    <StartPage>~appWebUrl/Lists/List?{StandardTokens}</StartPage>

  </Properties>

  <AppPrincipal>

    <Internal />

  </AppPrincipal>

  <AppPermissionRequests>

    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />

    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />

  </AppPermissionRequests>

  <AppPrerequisites>

    <AppPrerequisite Type="Capability" ID="B1DDD88F-6ADD-4700-B5CD-18E451635E24" />

  </AppPrerequisites>

</App>

Thanks in Advance.

Regards,

Pallavi

解决方案

Hi Pallavi,

Please try to do as follows:

1. Create a SharePoint 2013 designer workflow(2013 template) and check if it works.

2. Create a simple SharePoint hosted add-in and check if it works.

3. Create a SharePoint hosted add-in with workflow refer to the articles below.

Add a workflow to a SharePoint-hosted SharePoint Add-in

https://msdn.microsoft.com/en-us/library/office/mt148590.aspx

Add The Workflow In a SharePoint Hosted App

http://www.c-sharpcorner.com/article/add-the-workflow-in-sharepoint-hosted-app/

Best Regards,

Dennis


这篇关于具有简单工作流的SharePoint托管应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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