none
Connect Windows phone 8 to external database using WCF RRS feed

  • Question

  • I'm trying to connect my windows phone 8 application to external database using wcf
    once,I tried to call functions implemented in Service1.svc there is an exception showed to me 
    the exception is "An exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.ni.dll but was not handled in user code" 
    Any help please??

    Monday, May 5, 2014 9:35 PM

Answers

  • Hi Nourhan,

    This exception might occurs when the app cannot find the web service at localhost. Apps that target Windows Phone 7.1 can connect to the development computer as localhost. However, the Windows Phone 8 Emulator configures itself as a separate device on the network. As a result, an app running on the Windows Phone 8 Emulator can’t connect to the development computer as localhost. Please take a look at the MSDN document at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx to get how to get it works.

    Regards,

    Haixia


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 7, 2014 12:15 PM
    Moderator

All replies

  • The CommException is probably a wrapper around another error. My first guess is to assume your service interface or data contract(s) changed without your client's service reference being updated to reflect the change. If updating your Service Ref doesn't make the error go away, take a look at your Output window while debugging and see what exceptions are being thrown. You should see your CommException and either one or several errors above it (like ArgumentNullException, NullRef, etc). You want to get your debugger to break on that first exception, so it might help to go to the Exceptions window and enable breaking on thrown exceptions.
    Monday, May 5, 2014 9:43 PM
  • Hi Nourhan,

    This exception might occurs when the app cannot find the web service at localhost. Apps that target Windows Phone 7.1 can connect to the development computer as localhost. However, the Windows Phone 8 Emulator configures itself as a separate device on the network. As a result, an app running on the Windows Phone 8 Emulator can’t connect to the development computer as localhost. Please take a look at the MSDN document at http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx to get how to get it works.

    Regards,

    Haixia


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 7, 2014 12:15 PM
    Moderator