从sharepoint的测试机上消耗wcf

布雷斯平歌剧院

背景:

我有一个WCF,它对我的​​开发人员,他和他的客户都非常有效。我将其部署在测试服务器上。

该测试由3层内容,发布和Web构建。content是我将所有内容都放入Sharepoint的地方,并且只能从VPN和它的http进行访问,这意味着如果我想从我的开发机转到我放入资源管理器中的测试内容的网站http://testing

发布是中间的东西,我从没碰过,数据从内容移到其他2。

网络是向公众开放的网站,它是https并具有负载均衡器,您可以使用以下URL测试我的WCF :https://testnew.mizrahi-tefahot.co.il/_vti_bin/skywcf/skyservice.svc

问题:

在我的开发人员中,我完美地使用了我的开发人员WCF。MEX在test-content和testing-web上都表现出色,就像您在上面的链接中所见,wsdl一样。

尝试创建客户端以使用测试Web服务时,我收到此错误消息(尝试执行“添加服务引用”时):

下载' https://testnew.mizrahi-tefahot.co.il/_vti_bin/skywcf/skyservice.svc/_vti_bin/ListData.svc/ $ metadata'时出错该请求失败,HTTP状态为400:错误的请求。元数据包含无法解析的引用:' https : //testnew.mizrahi-tefahot.co.il/_vti_bin/skywcf/skyservice.svc '。内容类型application / soap + xml; 服务https://testnew.mizrahi-tefahot.co.il/_vti_bin/skywcf/skyservice.svc不支持charset = utf-8客户端和服务绑定可能不匹配。远程服务器返回错误:(415)由于内容类型为'application / soap + xml,因此无法处理该消息;charset = utf-8'不是预期的类型'text / xml;charset = utf-8'。如果服务在当前解决方案中定义,请尝试构建解决方案并再次添加服务引用。

尝试在我的开发机中使用测试内容服务时,它会创建服务引用,但是当尝试调用方法时,我会获得尝试通过浏览器访问服务时所获得的网页HTML。看着提琴手,我看到他给了我“对象移到这里”消息,向URL添加了某种令牌(这是HTML):

<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="%2f_vti_bin%2fSkyWCF%2f(X(1)S(5hwwif450myurs45h5ihnn55))%2fSkyService.svc%3fAspxAutoDetectCookieSupport%3d1">here</a>.</h2> </body></html>

有什么帮助吗?

编辑:Web配置

服务器

<?xml version="1.0"?>
<configuration>
  <system.web>
    <customErrors mode="RemoteOnly"/>
  </system.web>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="Sharepoint.BankMizrahi.Sky.WCF.ServiceBehavior" name="Sharepoint.BankMizrahi.Sky.WCF.SkyService">
        <endpoint address="" binding="basicHttpBinding" contract="Sharepoint.BankMizrahi.Sky.WCF.ISkyService">
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Sharepoint.BankMizrahi.Sky.WCF.ServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment>
      <baseAddressPrefixFilters>
        <add prefix="http://mizrahi"/>
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
  </system.serviceModel>
  <appSettings>
    <add key="siteUrl" value="http://mizrahiadmin/sky" />
    <add key="LogName" value="SkyService" />
  </appSettings>
</configuration>

客户

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_ISkyService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
            <wsHttpBinding>
                <binding name="CustomBinding_ISkyService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://mizrahidev/_vti_bin/SkyWCF/SkyService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISkyService"
                contract="ServiceReference1.ISkyService" name="BasicHttpBinding_ISkyService" />
            <endpoint address="http://mizrahi/_vti_bin/SkyWCF/SkyService.svc"
                binding="wsHttpBinding" bindingConfiguration="CustomBinding_ISkyService"
                contract="ServiceReferenceForTesting.ISkyService" name="CustomBinding_ISkyService" />
        </client>
    </system.serviceModel>
</configuration>
布雷斯平歌剧院

好吧,似乎答案是服务器是sessionStateEnabled,因此尝试使用cookie,解决方案只是禁用cookie

<system.web>
<sessionState mode="Off"/>

多数民众赞成在测试内容,关于测试网站,似乎我需要找到一种方法来传递负载均衡,这剥离了https

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

尝试执行时发生错误:在测试机上将Shockwave COM打开

来自分类Dev

如何创建Cassandra副本到测试机?

来自分类Dev

WCF服务消耗

来自分类Dev

测试内存消耗

来自分类Dev

使用jQuery消耗WCF服务

来自分类Dev

从Pycharm调试机器人框架测试

来自分类Dev

setLineWidth在不同的测试机器上的工作方式不同

来自分类Dev

WCF测试/烟雾测试

来自分类Dev

在与服务相同的解决方案中,在测试项目中的本地主机上运行WCF POST服务的调用困难

来自分类Dev

使用ksoap2消耗WCF服务

来自分类Dev

使用HttpWebRequest C#消耗WCF服务

来自分类Dev

多个WPF控件消耗的WCF双工服务

来自分类Dev

使用ksoap2消耗WCF服务

来自分类Dev

使用HttpWebRequest C#消耗WCF服务

来自分类Dev

在WCF发布后消耗错误请求的服务

来自分类Dev

Pester中的Sharepoint测试

来自分类Dev

Jscript在开发和测试机器上返回不同的(计算的)结果-使用相同的代码

来自分类Dev

普通rm -rf命令在测试机中破坏了我的操作系统

来自分类Dev

更改变量“ c”的值时,如何测试机器精度中的错误?

来自分类Dev

在 Azure 中测试机器人应用程序没有响应

来自分类Dev

Pubnub Ping在手机上消耗过多的电池

来自分类Dev

Pubnub Ping在手机上消耗过多的电池

来自分类Dev

如何测试消耗图像的FastAPI api端点?

来自分类Dev

通过COM包装器从HTA消耗WCF服务

来自分类Dev

.NET Core RC2-消耗外部WCF

来自分类Dev

Xamarin Forms PCL消耗WCF并不总是返回值

来自分类Dev

消耗我的自定义WCF LOB适配器

来自分类Dev

如何使用Jquery消耗非休息WCF服务?

来自分类Dev

在Sharepoint中设置流式WCF服务