- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为我们的 SharePoint 在线根团队网站构建远程事件接收器。我正在遵循此链接 remote-event-receivers-youre-all-doing-it-wrong 中提到的主要方法。当我使用 ngrok 调试它并从 VS 2019 运行它时,该方法运行良好。但是当我在 azure web 应用程序中部署 RER 时,RER 停止工作。以下是问题的详细信息:-
1- VS 2019 内部 >> 创建一个新的 asp.net Web 应用程序 >> 添加一个名为 rer.svc 的 .svc。
2-我使用此网址生成客户端和 secret ID https://****.admin.sharepoint.com/_layouts/15/appregnew.aspx
3-然后我从 SP 管理中心访问该应用程序 @ https://***-admin.sharepoint.com/_layouts/15/appinv.aspx
+ 我添加此权限: -
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
</AppPermissionRequests>
4-我使用步骤 2 中生成的客户端 ID + secret ID 更新了 asp.net web.config 文件。
5-我使用此 url https://tgrouppusrer.azurewebsites.net/rer.svc
在 azure 中创建一个新的应用程序服务。
6- 之后,我使用 ftp 将 asp.net Web 应用程序部署到 azure 中:-
7-我访问服务https://tgrouppusler.azurewebsites.net/rer.svc
,我得到了这个页面:-
8- 最后我使用这个 PnP 脚本注册 2 个远程事件接收器:-
Add-PnPEventReceiver -List "Project System" -Name "PUSRERupdating" -Url https://tgrouppusrer.azurewebsites.net/rer.svc -EventReceiverType ItemUpdating -Synchronization Synchronous
Add-PnPEventReceiver -List "Project System" -Name "PUSRERupdated" -Url https://tgrouppusrer.azurewebsites.net/rer.svc -EventReceiverType ItemUpdated -Synchronization Asynchronous
所以在纸面上我应该一切顺利。但是当更新“项目系统”列表中的列表项时,RER 没有任何效果。所以我打开 azure 应用程序服务器日志,一旦我更新列表项,日志将显示此错误:-
The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds).<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>IIS Detailed Error - 404.0 - Not Found</title><style type="text/css"><!--body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}.config_source code{font-size:.8em;color:#000000;}pre{margin:0;font-size:1.4em;word-wrap:break-word;}ul,ol{margin:10px 0 10px 5px;}ul.first,ol.first{margin-}fieldset{padding:0 15px 10px 15px;word-break:break-all;}.summary-container fieldset{padding-bottom:5px;margin-}legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}legend{color:#333333;;margin:4px 0 8px -12px;_margin-font-weight:bold;font-size:1em;}a:link,a:visited{color:#007EFF;font-weight:bold;}a:hover{text-decoration:none;}h1{font-size:2.4em;margin:0;color:#FFF;}h2{font-size:1.7em;margin:0;color:#CC0000;}h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}h4{font-size:1.2em;margin:10px 0 5px 0;}#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;color:#FFF;background-color:#5C87B2;}#content{margin:0 0 0 2%;;}.summary-container,.content-container{background:#FFF;width:96%;margin-padding:10px;;}.content-container p{margin:0 0 10px 0;}#details-left{width:35%;float:left;margin-right:2%;}#details-right{width:63%;float:left;}#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-font-weight:normal;font-size:1em;color:#FFF;text-align:right;}#server_version p{margin:5px 0;}table{margin:4px 0 4px 0;width:100%;border:none;}td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}thead th{background-color:#ebebeb;width:25%;}#details-right th{width:20%;}table tr.alt td,table tr.alt th{}.highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}.clear{clear:both;}.preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}--></style>
</head><body><div id="content"><div class="content-container"><h3>HTTP Error 404.0 - Not Found</h3><h4>The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> <li>The directory or file specified does not exist on the Web server.</li> <li>The URL contains a typographical error.</li> <li>A custom filter or module, such as URLScan, restricts access to the file.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> <li>Create the content on the Web server.</li> <li>Review the browser URL.</li> <li>Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul></fieldset></div>
<div class="content-container"><fieldset><h4>Detailed Error Information:</h4><div id="details-left"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Module</th><td> ManagedPipelineHandler</td></tr><tr><th>Notification</th><td> ExecuteRequestHandler</td></tr><tr class="alt"><th>Handler</th><td> svc-Integrated-4.0</td></tr><tr><th>Error Code</th><td> 0x00000000</td></tr>
</table></div><div id="details-right"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Requested URL</th><td> https://tGroupPUSRER:80/rer.svc</td></tr><tr><th>Physical Path</th><td> D:\home\site\wwwroot\rer.svc</td></tr><tr class="alt"><th>Logon Method</th><td> Anonymous</td></tr><tr><th>Logon User</th><td> Anonymous</td></tr>
</table><div class="clear"></div></div></fieldset></div>
<div class="content-container"><fieldset><h4>More Information:</h4>This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.<p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&IIS70Error=404,0,0x00000000,14393">View more information »</a></p><p>Microsoft Knowledge Base Articles:</p>
</fieldset></div></div></body></html>
2020-02-03 21:45:22 tGROUPPUSRER POST /rer.svc X-ARR-LOG-ID=666b6779-fca6-4a90-8e94-9c695780dae4 443 - 40.108.180.36 - - - tgrouppusrer.azurewebsites.net 404 0 0 372 8227 19
2020-02-03 21:45:22 tGROUPPUSRER POST /rer.svc X-ARR-LOG-ID=42637d01-4bdb-4345-843b-89713a935aa2 443 - 40.108.180.36 - - - tgrouppusrer.azurewebsites.net 404 0 0 372 8455 19
2020-02-03 21:45:33 tGROUPPUSRER POST /rer.svc X-ARR-LOG-ID=8696a37b-6881-4eb1-9110-701d4bddaeb5 443 - 40.108.180.145 - - - tgrouppusrer.azurewebsites.net 404 0 0 372 8187 46
2020-02-03 21:45:33 tGROUPPUSRER POST /rer.svc X-ARR-LOG-ID=8779cafe-fbc4-4094-9ff4-9fa10b884875 443 - 40.108.180.145 - - - tgrouppusrer.azurewebsites.net 404 0 0 372 8415 21
2020-02-03 21:45:43 ~1tGROUPPUSRER GET /api/commandstream/ping shell=CMD&_=1580765141131&X-ARR-LOG-ID=d4e5e91c-1062-44d4-9e94-e93cf6911357 443 - 165.225.80.94 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 ARRAffinity=e8228ec522d0bb0cde1261622aaf3fb9855105fb7485023fe847aa1a3a4e8100 https://tgrouppusrer.scm.azurewebsites.net/DebugConsole tgrouppusrer.scm.azurewebsites.net 200 0 0 513 1582 0
2020-02-03 21:45:43 ~1tGROUPPUSRER GET /api/filesystemhub/ping _=1580765141130&X-ARR-LOG-ID=7e168704-35a9-4d2f-a4f9-b9e6f702a7ff 443 - 165.225.80.94 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/79.0.3945.130+Safari/537.36 ARRAffinity=e8228ec522d0bb0cde1261622aaf3fb9855105fb7485023fe847aa1a3a4e8100 https://tgrouppusrer.scm.azurewebsites.net/DebugConsole tgrouppusrer.scm.azurewebsites.net 200 0 0 513 1552 0<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>IIS Detailed Error - 404.0 - Not Found</title><style type="text/css"><!--body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;}code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}.config_source code{font-size:.8em;color:#000000;}pre{margin:0;font-size:1.4em;word-wrap:break-word;}ul,ol{margin:10px 0 10px 5px;}ul.first,ol.first{margin-}fieldset{padding:0 15px 10px 15px;word-break:break-all;}.summary-container fieldset{padding-bottom:5px;margin-}legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}legend{color:#333333;;margin:4px 0 8px -12px;_margin-font-weight:bold;font-size:1em;}a:link,a:visited{color:#007EFF;font-weight:bold;}a:hover{text-decoration:none;}h1{font-size:2.4em;margin:0;color:#FFF;}h2{font-size:1.7em;margin:0;color:#CC0000;}h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}h4{font-size:1.2em;margin:10px 0 5px 0;}#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;color:#FFF;background-color:#5C87B2;}#content{margin:0 0 0 2%;;}.summary-container,.content-container{background:#FFF;width:96%;margin-padding:10px;;}.content-container p{margin:0 0 10px 0;}#details-left{width:35%;float:left;margin-right:2%;}#details-right{width:63%;float:left;}#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-font-weight:normal;font-size:1em;color:#FFF;text-align:right;}#server_version p{margin:5px 0;}table{margin:4px 0 4px 0;width:100%;border:none;}td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;}th{width:30%;text-align:right;padding-right:2%;font-weight:bold;}thead th{background-color:#ebebeb;width:25%;}#details-right th{width:20%;}table tr.alt td,table tr.alt th{}.highlight-code{color:#CC0000;font-weight:bold;font-style:italic;}.clear{clear:both;}.preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;}--></style>
</head><body><div id="content"><div class="content-container"><h3>HTTP Error 404.0 - Not Found</h3><h4>The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> <li>The directory or file specified does not exist on the Web server.</li> <li>The URL contains a typographical error.</li> <li>A custom filter or module, such as URLScan, restricts access to the file.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> <li>Create the content on the Web server.</li> <li>Review the browser URL.</li> <li>Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul></fieldset></div>
<div class="content-container"><fieldset><h4>Detailed Error Information:</h4><div id="details-left"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Module</th><td> ManagedPipelineHandler</td></tr><tr><th>Notification</th><td> ExecuteRequestHandler</td></tr><tr class="alt"><th>Handler</th><td> svc-Integrated-4.0</td></tr><tr><th>Error Code</th><td> 0x00000000</td></tr>
</table></div><div id="details-right"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Requested URL</th><td> https://tGroupPUSRER:80/rer.svc</td></tr><tr><th>Physical Path<
一般来说,为什么它尝试连接到“https://tgrouppusrer:80/rer.svc ”,而它应该按照 PnP 脚本中指定的方式连接到“https://tgrouppusrer.azurewebsites.net/rer.svc ”以添加 RER?这可能是问题所在吗?
也在 Kudu 内部我可以看到 rer.srv
在那里,如下所示:-
我原来的 web.config 如下:-
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<appSettings file="custom.config">
<add key="ClientId" value="****" />
<add key="ClientSecret" value="****" />
</appSettings>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
基于这篇堆栈溢出文章 WCF hosted on SharePoint - Need to enable https ,我修改我的 web.config 如下:-
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
<system.serviceModel>
<services>
<service name="TGroupPUSRER.RER">
<endpoint
address="/rer.svc"
binding="webHttpBinding"
contract="Microsoft.SharePoint.Client.EventReceivers.IRemoteEventService"
/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="secureBinding">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<protocolMapping>
<remove scheme="http"/>
<add binding="basicHttpBinding" scheme="https" bindingConfiguration="secureBinding" />
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior >
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<appSettings file="custom.config">
<add key="ClientId" value="***" />
<add key="ClientSecret" value="***" />
</appSettings>
</configuration>
但我仍然在 azure 日志中收到文件未找到错误。
最佳答案
在第 6 步中,您显示以“http”开头的目标 URL
相反,它应该以“https”开头,以反射(reflect)您正在使用的其他设置。
老实说,我什至不能真正认为这是一个答案,但它可能就是这么简单。
此外,在第 3 步中,您的重定向 URL 中有一个尾部斜杠,但该示例不包含尾部斜杠,因此我也将其删除。
关于asp.net - 为什么 SharePoint 远程事件接收器为 Azure Web 应用程序中托管的 .SVC 引用错误的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60056292/
我正在为一个简单的循环而苦苦挣扎: for kernel in ('linear','poly', 'rbf'): svm = svm.SVC(kernel=kernel, C=1)
我正在为一个简单的循环而苦苦挣扎: for kernel in ('linear','poly', 'rbf'): svm = svm.SVC(kernel=kernel, C=1)
我需要在所有资源上使用 VNET 集成,但似乎如果我已经在 app-svc 中使用它,则不需要在应用程序服务计划级别指定它。我在这里缺少什么吗? Web 应用程序工作正常,但我想也许我因为没有在服务计
我需要在所有资源上使用 VNET 集成,但似乎如果我已经在 app-svc 中使用它,则不需要在应用程序服务计划级别指定它。我在这里缺少什么吗? Web 应用程序工作正常,但我想也许我因为没有在服务计
我使用 sklearn.svm.SVC 构建支持向量分类器,如下所示。 import numpy as np from sklearn.svm import SVC svc=SVC(proba
我认为它应该是相同的,但是对于方法 decision_function() 我得到了不同的结果。而只有 decision_function_shape='ovr' 的 SVC 确实更快。 相关:Sci
是否可以设置 Activity 探针来检查是否存在单独的服务?对于一个pod中的一个应用程序以及一个单独的pod中的一个数据库,我希望该app pod检查数据库pod的活跃性,而不是检查此pod本身。
ARM SVC 处理程序以哪种模式启动? 基本上,我想知道引发 SVC 异常时 ARM 内核处于哪种模式? 似乎无法在 ARM ARM 中找到它,但我的猜测是它在 Supervisor 中启动。 最佳
我使用 SVC 文件在 WAS 托管我的服务: 但是如您所见,它没有应有的 CodeBehind Attrbiute。及其工作原理。 怎么样? http://msdn.microsoft.com/e
给定一个以 .svc 结尾且应该运行 SOAP 网络服务的 URL,我如何从中获取一些数据? 我试过: 通过网络浏览器访问它 通过 Python 的库 Zeep 访问它 通过 Microsoft 实用
假设我有一个简单的 aarch64 函数,它通过 SVC 进行系统调用,看起来像这样(iOS 目标): make_syscall: stp fp, lr, [sp, #-16]! ad
我需要将 .svc 文件添加到已添加到解决方案中的 WCF 服务库(这没有 .svc 文件)。如果我通过广告新项目(例如 test.svc)指定此文件,则这是一个安装程序文件,而不是 WCF 文件。
与 asmx 文件相比,如何进入显示服务可用方法的可视化服务页面? http://soweb.adwiza.com/person.asmx 相对 http://soweb7.adwiza.com/re
我正在处理机器学习问题,但我遇到了使用 MultiOutputClassifier 可以运行的类(class)数量限制和 SVC .特别是,当类数> 14 时,拟合失败。我按照 MultiOutput
我有一个 WPF 应用程序,它使用 WCF 服务对使用 EF4 的实体执行操作。 我的项目结构如下: 项目:实体对象 这是 edmx 文件所在的位置 项目:WCFService 引用实体对象 具有对实
我正在尝试在数据集中拟合一个简单的SVC模型。一旦运行代码,就会出现弹出窗口,提示python.exe停止工作。 这是我的代码: Xtrain, Xtest, Ytrain, Ytest = trai
我正在研究 Cortex-M4 上的上下文保存和恢复机制,以便我可以实现简单的多任务处理。我使用 arm-none-eabi-g++ 来编译这段代码。便携性目前不是问题。 当任务可以调用 yield
我正在使用带有线性内核的 SVC 分类器来训练我的模型。列车数据:42000条记录 model = SVC(probability=True) model.fit(self.featu
我下载了数据。 news = datasets.fetch_20newsgroups(subset='all', categories=['alt.atheism', 'sci.space']) ve
我正在使用 SVM 分类器进行多类分类。 我希望 svc.predict 返回结果以及其他类的概率。 我得到的结果是这样的: print(svclassifier.predict([[79,93,60
我是一名优秀的程序员,十分优秀!