Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows 8 Store App and WCF service
    text
    copied!<p>If I try to add a service reference to my blank windows 8 app, I've got following two warnings/errors.</p> <p><img src="https://i.stack.imgur.com/WhXoN.png" alt="TransportSecurityBindingElement"></p> <p>The service is a wcf service with a ServiceName.svc file, i've seen some services wit a ServiceName.asmx. Is this the cause? Does I need a service with an *.asmx file?</p> <p>I'm really confused because there is too much and wirde stuff on the internet for this topic. Also confusing is, it says that System.ServiceModel.Channels.TransportSecurityBindingElement is not supported, but I never used this. Not in web.config or in the code as service configuration.</p> <p>Here my service configuration in web.config:</p> <pre><code>&lt;system.web&gt; &lt;compilation targetFramework="4.5" debug="true"/&gt; &lt;httpRuntime/&gt; &lt;pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;diagnostics&gt; &lt;messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"/&gt; &lt;/diagnostics&gt; &lt;client/&gt; &lt;services&gt; &lt;service behaviorConfiguration="basicHttpBehavior" name="e3kConnector.E3KConnectorService"&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" name="wsHttpEndpoint" bindingName="" contract="Service.MyService" /&gt; &lt;endpoint address="Soap" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" name="basicHttpBinding" bindingName="" contract="Service.MyService" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:50282/Service.svc" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="basicHttpBinding" allowCookies="true"&gt; &lt;security mode="TransportWithMessageCredential"&gt; &lt;transport clientCredentialType="Basic" proxyCredentialType="None" /&gt; &lt;message clientCredentialType="UserName" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;wsHttpBinding&gt; &lt;binding name="wsHttpBinding" allowCookies="true"&gt; &lt;security mode="TransportWithMessageCredential"&gt; &lt;transport clientCredentialType="Basic" /&gt; &lt;message clientCredentialType="UserName" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="basicHttpBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;serviceCredentials&gt; &lt;userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="e3kConnector.App_Data.Security.CustomUserNameValidator,e3kConnector"/&gt; &lt;serviceCertificate findValue="tempCert" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName"/&gt; &lt;/serviceCredentials&gt; &lt;serviceAuthorization principalPermissionMode="Custom"&gt; &lt;authorizationPolicies&gt; &lt;add policyType="e3kConnector.App_Data.Security.AuthorizationPolicy, e3kConnector"/&gt; &lt;/authorizationPolicies&gt; &lt;/serviceAuthorization&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="false"/&gt; &lt;/system.serviceModel&gt; &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;!-- To browse web app root directory during debugging, set the value below to true. Set to false before deployment to avoid disclosing web app folder information. --&gt; &lt;directoryBrowse enabled="true"/&gt; &lt;/system.webServer&gt; </code></pre> <p>As test I added this <a href="http://www.w3schools.com/webservices/tempconvert.asmx?WSDL" rel="nofollow noreferrer">tempConverter</a>, but this works. (Yes I know it's an asmx file.) I know also the difference between svc and asmx, but thats why I'm confused. Both supports SOAP, so I still don't get it why it won't work. Maybe it's very simple?</p> <p>If you need more details please let me know.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload