för att få en personlig vy
för att få en personlig vy
Hi
We have problem sending requests to VBS in VB 15. The requests come back with the error message before they reach VBS or Debug Host. Same programs work normally with earlier versions of Visma.
We presume that something must be changed in the config but didn't manage to find what.
Do you have any suggestions?
The error message:
Severity: Error - Failed to communicate with Visma Business Services. Failed to communicate with server. The caller was not authenticated by the service. The request for security token could not be satisfied because authentication failed. at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target) at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
The config file:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IOrderService" 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="vbsSecuredBinding" closeTimeout="23:59:59" openTimeout="23:59:59" receiveTimeout="23:59:59" sendTimeout="23:59:59" maxBufferPoolSize="524288" maxReceivedMessageSize="1073741824">
<readerQuotas maxDepth="1000000000" maxStringContentLength="1000000000" maxArrayLength="1000000000" maxBytesPerRead="1000000000" maxNameTableCharCount="1000000000"/>
<security mode="Message">
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:2001/GenericService" behaviorConfiguration="nullX509Behavior" binding="wsHttpBinding" bindingConfiguration="vbsSecuredBinding" contract="Visma.BusinessServices.Generic.IGenericService">
<identity>
<dns value="VBSTestCert"/>
</identity>
</endpoint>
<endpoint address="http://localhost:2001/TestService" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IOrderService" contract="OrderServiceRef.IOrderService" name="BasicHttpBinding_IOrderService"/>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="nullX509Behavior">
<clientCredentials>
<serviceCertificate>
<authentication certificateValidationMode="Custom" customCertificateValidatorType="Visma.BusinessServices.Client.NullX509CertificateValidator, Visma.BusinessServices.Client"/>
</serviceCertificate>
</clientCredentials>
<dataContractSerializer maxItemsInObjectGraph="1000000000"/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
Hi! We still have some issues with the VBS.
@andretvard Which forum are you referring to? Thank you.
Hej again
With suggestions from other forum we found out that there was no problem with the VBS config but we needed to have a section specifying .Net Framework 4.8
It could be either
<system.web>
<httpRuntime targetFramework="4.8" />
</system.web>
or
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup>
Having this in the config solved the problem.
Which config file did you add the section to?
Klicka på de tre prickarna till höger i inlägget/artikeln och välj Prenumerera.
Läs mer om prenumeration härCopyright © 2019 Visma.com. All rights reserved.