CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • WinRT MobilePortal to secured endpoint

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 3 Replies | 2 Followers

    Top 25 Contributor
    202 Posts
    Tim posted on Mon, Jun 23 2014 2:04 PM

    I'm trying to have my WinRT app connect securely to a remote data portal over https, for obvious reasons. Up till now I've been testing internally without SSL, but when I start to test using a secured address I get the following error:

    The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via Csla.DataPortalClient.WcfProxy.<Fetch>d__8.MoveNext():0

    I'm assuming this is because my client isn't configured to use the same wcf bindings the server uses. This wouldn't be a problem for .NET because I'd add those settings in the config file, or in the clientconfig in a SL app. How do I set the WCF bindings correctly within a WinRT app?

    I recall this recent thread with this response by Rocky: http://forums.lhotka.net/forums/p/11201/57463.aspx#57463. It somewhat speaks to issues with Universal apps not being able to do this, but I'm not using building a Universal app. Is configuring the WCF bindings in the app.xaml.cs a possibility? Hopefully I'm not forced into using the BrokeredProxy model. Thanks.

    Tim

    Answered (Verified) Verified Answer

    Top 10 Contributor
    9,475 Posts
    Verified by Tim

    You need to create a subclass of WcfProxy so you can override the method where the actual WCF proxy is created. That is where you would configure the WCF client to match the server configuration.

    Rocky

    All Replies

    Top 25 Contributor
    202 Posts
    Tim replied on Mon, Jun 23 2014 2:51 PM

    I didn't realize you could still communicate securely with basicHttpBinding (over SSL). Perhaps I just need to make sure the settings on the client (in app.xaml.cs) match what is on the server??

    Are there a recommended binding settings to use for this scenario? For example:

            <binding name="basicHttpBinding_IWcfPortal" 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="Certificate" algorithmSuite="Default" />
              </security>
            </binding>
          </basicHttpBinding>

    Tim

    Top 10 Contributor
    9,475 Posts
    Verified by Tim

    You need to create a subclass of WcfProxy so you can override the method where the actual WCF proxy is created. That is where you would configure the WCF client to match the server configuration.

    Rocky

    Top 25 Contributor
    202 Posts
    Tim replied on Tue, Jun 24 2014 6:16 AM

    Thanks. And to clarify, I was originally attempting to use WsHttpBinding, which I didn't realize isn't available in WinRT.

    Tim

    Page 1 of 1 (4 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems