locked
silverlight wcf service prompt for credentials RRS feed

  • Question

  • I have a silverlight app that calls a wcf service, and I'm having trouble deploying it.

    I can publish the files, but when the app tries to access the service, it doesnt seem to get anything back.

    The app is set for client credentials with Windows Authentication

    What's weird is that its not throwing errors. The silverlight app just seems to stop with a blank screen.

    To test the deployed service, I try to access it from a browser, and I'm prompted for credentials. I try putting in my name and password, but it just asks me for credentials again.

    What credentials is it prompting me for?

    How can I get past this?

    Here's the client config:

    <configuration>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IService" maxBufferSize="2147483647"
                        maxReceivedMessageSize="2147483647">
                        <security mode="TransportCredentialOnly" />
                    </binding>
                </basicHttpBinding>
            </bindings>
            <client>
    
                <endpoint address="../Service.svc" binding="basicHttpBinding"
                    bindingConfiguration="BasicHttpBinding_IService" contract="ServiceReference1.IService"
                    name="BasicHttpBinding_IService" />
            </client>
        </system.serviceModel>
    </configuration>

    Here's the web config:

    <configuration>
      <system.web>
        <httpRuntime executionTimeout="180" />
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off"/>
      </system.web>
    
      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="BasicHttpStreamingBinding" maxBufferSize="2147483647"
              maxReceivedMessageSize="2147483647" transferMode="Streamed" receiveTimeout="01:00:00" sendTimeout="01:00:00">
              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
                maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" />
                <!--<transport clientCredentialType="Ntlm" />-->
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
    
        <client />
    
        <behaviors>
          <serviceBehaviors>
            <behavior name="">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    
        <serviceHostingEnvironment
            multipleSiteBindingsEnabled="true" />
    

    Rick


    • Edited by Rick Hodder Monday, February 11, 2013 1:47 AM clean up
    Monday, February 11, 2013 1:45 AM

Answers