locked
Silverlight WebService call - The provided URI scheme 'file' is invalid; expected 'http'.

    Question


  • Hi,

    I am getting following when trying to consume WebService from Silverlight.

    The provided URI scheme 'file' is invalid; expected 'http'.
    Parameter name: via

    Any idea ? Please help.


    -----------------------------
    Exception '' is raised right at
    public CurrServiceClientChannel(System.ServiceModel.ClientBase<B.Silverlight.BT.Ent.EntServiceRef.ICurrService> client) : base(client) {}
    ----------------------------- 

    FurtherCode:
    --------------

    private
    class CurrServiceClientChannel : ChannelBase<B.Silverlight.BT.Ent.EntServiceRef.ICurrService>,

    B.Silverlight.BT.Ent.EntServiceRef.
    ICurrService {

    public CurrServiceClientChannel(System.ServiceModel.ClientBase<B.Silverlight.BT.Ent.EntServiceRef.ICurrService> client) : base(client) {}

    public
    System.IAsyncResult BeginGetCurr(string sConnection, System.AsyncCallback callback, object asyncState)
    {
    object[] _args = new object[1];
    _args[0] = sConnection; 
    System.
    IAsyncResult _result = base.BeginInvoke("GetCurr", _args, callback, asyncState);
    return _result;
    }

     

     

     

     

    Here is my web.config file:


    <services>
    <service behaviorConfiguration="B.Silverlight.BT.Ent.EntServiceBehavior" name="B.Silverlight.BT.Ent.EntService">

    <endpoint address="CurrService" binding="basicHttpBinding" contract="B.Silverlight.BT.Ent.ICurrService" bindingConfiguration="basicHttp">

    </endpoint>

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

    </service>

    </services>

    <bindings>

    <basicHttpBinding>

    <binding name="basicHttp">

    <security mode="TransportCredentialOnly">

    <transport clientCredentialType="Windows" />

    </security>

    </binding>

    </basicHttpBinding>

    </bindings>

     

    • Edited by Khan2020 Friday, June 05, 2009 5:20 PM
    Thursday, June 04, 2009 10:34 PM

Answers

  • Thank you Alan.

    Just for the info following is the solution found as an correct answer at http://silverlight.net/forums/p/79118/187521.aspx#187521

    Re: Re: Testing silverlight that consumes a WCF service

    sladapter
    Software Engineer
    Aprimo, Inc

    • Marked as answer by Khan2020 Monday, June 08, 2009 9:24 PM
    Monday, June 08, 2009 9:22 PM

All replies

  • We're not experts in those subject here. :-)  Ask again in a WebServices or Silverlight forum.

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Saturday, June 06, 2009 9:52 AM
  • Thank you Alan.

    Just for the info following is the solution found as an correct answer at http://silverlight.net/forums/p/79118/187521.aspx#187521

    Re: Re: Testing silverlight that consumes a WCF service

    sladapter
    Software Engineer
    Aprimo, Inc

    • Marked as answer by Khan2020 Monday, June 08, 2009 9:24 PM
    Monday, June 08, 2009 9:22 PM
  • Just right click on YourProject.Web in solution explorer and click on Set As StartupProject :)  Better very late than never
    After almost 2 years who cares


    Marcheur extrême...
    • Proposed as answer by Norm Turnbull Tuesday, April 12, 2011 6:35 PM
    Thursday, January 20, 2011 1:27 AM
  • Great timing s for me. This solved my issue. Thanks
    Tuesday, April 12, 2011 6:36 PM
  • Thank you Khan2011, you solve my problem!!
    Tuesday, May 31, 2011 8:57 PM
  • Thanks Buddy. It saved my time.
    Raj
    Monday, January 23, 2012 3:24 PM
  • LOL , Better very late than never : thank u GearWorld!
    Tuesday, October 23, 2012 4:57 PM