我已经完成了Stack Overflow并且遵循了 SSL和WebHttpBinding 的在线教程.
我收到了与那里提到的相同的错误.我已经恢复到旧的Web配置,如下所示.我的https网站工作正常,我添加了我的WCF作为网站的一部分,以避免打开一个新的端口.
当我收到错误时,我正试图达到类似的效果:
https://localhost/_vti_bin/TestingSQL/sample.svc/mex
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<services>
<service name="SharePointBits.Samples.WCFService.SampleService" behaviorConfiguration="SharePointBits.Samples.WCFService.SampleServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://testsite/_vti_bin/TestingSQL/Sample.svc"/>
</baseAddresses>
</host>
<endpoint address="https://localhost/_vti_bin/TestingSQL/Sample.svc" binding="wsHttpBinding" contract="SharePointBits.Samples.WCFService.ISampleService"
bindingConfiguration="wsHttpBindingEndpointBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="SharePointBits.Samples.WCFService.SampleServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用GetFolderByServerRelativeUrl函数检索文件夹的"修改日期"和"创建日期",我该怎么办?
我只能从中获取relativeUrl和文件夹名称.下面是我检索文件夹的方法.请帮忙.
FolderCollection folderCollection = rootweb.GetFolderByServerRelativeUrl("/Shared Documents/test2").Folders;
spClientContext.Load(folderCollection);
foreach (Folder folder in folderCollection)
{
}
Run Code Online (Sandbox Code Playgroud)