Because an existing SVC uses MTOM en TEXT was needed I created a second SVC for that.
In the web config it looks like this:
<service behaviorConfiguration="W2DWebserviceBehavior4Core" name="W2DWebservice.W2DWebservice4Core">
<endpoint binding="wsHttpBinding" bindingConfiguration="CustomAuthentication4Core" contract="W2DWebservice.IW2DWebservice4Core" />
<host>
<baseAddresses>
<add baseAddress="localhost" />
</baseAddresses>
</host>
</service>
<wsHttpBinding>
<binding name="CustomAuthentication4Core" maxReceivedMessageSize="1006710886" messageEncoding="Text" textEncoding="utf-8">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
<behavior name="W2DWebserviceBehavior4Core">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="W2DWebservice.W2DWebservice4Core+CustomUserNameValidator, W2DWebservice" />
<issuedTokenAuthentication allowUntrustedRsaIssuers="true" />
</serviceCredentials>
<serviceDebug includeExceptionDetailInFaults="false" httpHelpPageUrl="false" />
</behavior>
The markup of the SVC file looks like this:
<%@ ServiceHost Language="VB" Debug="true" Service="W2DWebservice.W2DWebservice4Core" CodeBehind="W2DWebservice4Core.svc.vb" %>
When I visit the SVC in the browser on the server I get this error:
The type 'W2DWebservice.W2DWebservice4Core', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Locally in Visual Studio it al works perfect. I get the WSDL schema xml there.
Why do I get this error?