Pergunta

I have a big problem with the Windows Phone 8 Emulator.

First I have an Azure project ,I have a WebRole this webrole expose some DomainServices (RIA Services) .

I exposed this DomainServices like SOAP, with others Apps like Windows 8 metro style or WPF app clients this services work fine.

But I trying to consume this services with Windows Phone 8 Emulator and I can't do that!.

I followed this article: How to connect to a local web service from the Windows Phone 8 emulator

I need to be more specific:

I have a website in a webRole of Windows Azure Project.

This website has a DomainServices (RIA Services) because I have a Silverlight Application inside. I exposed this services with this.

 <domainServices>
  <endpoints>
    <add name="Soap" type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory,
         Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, 
         Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </endpoints>
</domainServices>

I can consume this services with other apps. Windows metro Style and WPF and this services work fine.

Now, I want to develop a new application for Windows Phone 8 . But I need to consume this services.

In my local machine , I trying to connect this services with the emulator so, I researching and I found the emulator is a Virtual Machine and I need to configure IIS Express. I followed this article How to connect to a local web service from the Windows Phone 8 emulator

But I can't connect my Services hosted in the webRole with Windows Phone 8 Emulator.

This is the structure of my Website Project: Project Structure

This the configuration of my WebRole Called LandingPage this web role has the services. enter image description here

This the configuration of IIS Express inside of Applicationhost.config.

 <site name="LandingPage" id="2">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="E:\AnimesideFinal\AnimesideWebsite\LandingPage" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:24939:localhost" />
        <binding protocol="http" bindingInformation="*:24939:192.168.2.114" />
            </bindings>
        </site>

This is the applications running in IIS Express is different of the Article. enter image description here

Finally this is the Config of the service in the Windows Phone 8 emulator.

<configuration>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_AuthenticationServiceSoap" maxBufferSize="2147483647"
                maxReceivedMessageSize="2147483647">
                <security mode="None" />
            </binding>
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://192.168.2.114/Services/LandingPage-Services-AuthenticationService.svc/Soap"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_AuthenticationServiceSoap"
            contract="AuthService.AuthenticationServiceSoap" name="BasicHttpBinding_AuthenticationServiceSoap" />
    </client>
</system.serviceModel>

I followed all Steps of the article without results . I think something is wrong because I need to run my project from the Azure proj and in the properties of that exist the option to use IIS express or IIS web server. enter image description here

And this is the error of Windows Phone Emulator.

{System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClasse.b__d(Object sendState) at System.Net.Browser.AsyncHelper.<>c__DisplayClass1.b__0(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) --- End of inner exception stack trace --- at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.ClientBase1.ChannelBase1.EndInvoke(String methodName, Object[] args, IAsyncResult result) at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.AuthenticationServiceSoapClientChannel.EndLogin(IAsyncResult result) at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.AnimesideWP7.AuthService.AuthenticationServiceSoap.EndLogin(IAsyncResult result) at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.OnEndLogin(IAsyncResult result) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}

Thank you for your help .

Regards.

Foi útil?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top