我的应用程序无法运行,因为我更改了 Web 服务的 url
My application doesn't work since I changed the url of the web service
自 8 月 1 日起,Web 服务的 url 发生了变化,应用程序 运行 与之前的 url 没问题,但对于新的 url,应用程序可以工作 1用户,其他 2 个遇到此错误消息:
Could not establish trust relationship for the SSL/TLS secure channel
with authority 'e-factura.sunat.gob.pe'
我的项目是控制台项目,在其中,我使用证书文件对 xml 文件进行签名,证书在服务器上,没有安装在证书存储中。此外,要使用 Web 服务,需要 wsse:security 身份验证。
我的 app.config 文件就是这个(我确实隐藏了 wsse:security 凭据):
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<system.diagnostics>
<sources>
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information"/>
</switches>
<sharedListeners>
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
</sharedListeners>
</system.diagnostics>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BillServicePortBinding" 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="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="secured">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://e-factura.sunat.gob.pe:443/ol-ti-itcpfegem/billService"
binding="basicHttpBinding" bindingConfiguration="BillServicePortBinding"
contract="Production.billService" name="BillServicePort" >
<headers>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken >
<wsse:Username>XXXXXXXX</wsse:Username>
<wsse:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>XXXXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</headers>
</endpoint>
</client>
</system.serviceModel>
</configuration>
我不知道该怎么做才能解决这个问题,而且我无法在我的机器上使用网络服务(网络服务用于向税务局发送真实发票)。
谢谢
我连接到他们的服务器,我 运行 在 Internet Explorer 上,我将 Web 服务器的地址添加到受信任的站点列表中。
然后我要求每个用户在他们的 PC 上做同样的事情,到目前为止,我收到了其中一位确认应用程序正在运行的反馈。
自 8 月 1 日起,Web 服务的 url 发生了变化,应用程序 运行 与之前的 url 没问题,但对于新的 url,应用程序可以工作 1用户,其他 2 个遇到此错误消息:
Could not establish trust relationship for the SSL/TLS secure channel with authority 'e-factura.sunat.gob.pe'
我的项目是控制台项目,在其中,我使用证书文件对 xml 文件进行签名,证书在服务器上,没有安装在证书存储中。此外,要使用 Web 服务,需要 wsse:security 身份验证。 我的 app.config 文件就是这个(我确实隐藏了 wsse:security 凭据):
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<system.diagnostics>
<sources>
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information"/>
</switches>
<sharedListeners>
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
</sharedListeners>
</system.diagnostics>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BillServicePortBinding" 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="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="secured">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://e-factura.sunat.gob.pe:443/ol-ti-itcpfegem/billService"
binding="basicHttpBinding" bindingConfiguration="BillServicePortBinding"
contract="Production.billService" name="BillServicePort" >
<headers>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken >
<wsse:Username>XXXXXXXX</wsse:Username>
<wsse:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>XXXXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</headers>
</endpoint>
</client>
</system.serviceModel>
</configuration>
我不知道该怎么做才能解决这个问题,而且我无法在我的机器上使用网络服务(网络服务用于向税务局发送真实发票)。 谢谢
我连接到他们的服务器,我 运行 在 Internet Explorer 上,我将 Web 服务器的地址添加到受信任的站点列表中。 然后我要求每个用户在他们的 PC 上做同样的事情,到目前为止,我收到了其中一位确认应用程序正在运行的反馈。