locked
Setting ip an in-app purchase mock service using IIS (connecting the Emulator to the Service)

    Question

  • Hi,

    These are the published steps:

    Setting up the emulator

    The following steps are needed to set up the emulator:

    1. 1) Deploy the mock service on a local machine.

    2. 2) Configure the emulator to connect to the mock service: "If you have deployed the mock service on the same machine where you have your Windows Phone emulator set up, you will need to get the IP address associated with the emulator. This section describes how to get the IP address associated with the emulator."

    3. 3) Configure the product catalog so that it’s used by your app.

    4. 4) Update your app manifest to use a particular APP ID.

    The mock service I installed is not on the same machine as the development app/emulator, and section 2) implies that it's instructions are meant for the mock service being on the same machine.

    Where can I get instructions on how to point the emulator to the service on a different machine (unassumingly just using my servers IP).

    Thanks,

    Barry


    • Edited by BarryBithead Wednesday, October 29, 2014 5:43 PM clarification
    Wednesday, October 29, 2014 5:42 PM

All replies

  • I don't understand the confusion. Just use the remote IP address.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, October 30, 2014 1:25 PM
    Moderator
  • The confusion was the section said it was for "how to get the IP address associated with the emulator" if "you have deployed the mock service on the same machine where you have your Windows Phone emulator set up on."

    I have not...so the entire section seems to not be relevant to my scenario where the IIS mock service is installed on a different machine from the emulator. Are you saying that there is no Emulator configuration required other than just pointing it to the mock services IP ?

    Thanks,

    Barry


    Barry O'Neill

    Thursday, October 30, 2014 2:58 PM
  • Since the mock service is just an IIS website... no, it's just a matter of using the correct IP address. That said, if there's some kind of hard-coded dependency on http://localhost, then it wouldn't work on a remote machine. However that doesn't seem to be the case:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj681689(v=vs.105).aspx#IAP_MockService

    Be able to view the preconfigured image returned by making the following GET request:

    http://[machine IP address]/v8/images/102a19e4-e6f2-495a-acc7-203bb6c742b9?imagetype=icon_iap


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, October 30, 2014 3:13 PM
    Moderator
  • Thanks for quick turn-around on my thread question Matt !

    My IIS mock service DOES pass the 2 tests the instructions say to run to verify it's correct operation. The first to run a GET/POST for some data, and the second to display the image.

    The developer who is on another floor, is testing his app and has the emulator running on his machine. He sent me some XML to drop into the iapcatalog.xml file. He wants to test some in-app purchase functionality, stuff like "buying a bag of gold for $1.99". I found the XML format to vary in the instructions, based on whether it's the .DLL approach within the project, or the IIS mock-service approach. So my thinking was to merge the two formats. The service still ran the 2 tests fine after I restarted the website, but can you please confirm the following XML is the correct format:

    <?xml version="1.0" encoding="utf-8" ?>

    <Catalog>

      <Item>

        <ProductId>MegaRunMP1</ProductId>

        <Title>MegaRunMP1</Title>

        <Description>This is a test item</Description>

        <Type>iapconsumable</Type>

      </Item>

    <ProductListings>

      <ProductListing Key="MegaRunMP1" Purchased="false" Fulfilled="false">

        <Name>MegaRunMP1</Name>

        <Description>A sample product listing</Description>

        <ProductId>MegaRunMP1</ProductId>

        <ProductType>Consumable</ProductType>

        <FormattedPrice>$1.99</FormattedPrice>

        <ImageUri></ImageUri>

        <Keywords>test;product</Keywords>

        <Tag>Additional text</Tag>

      </ProductListing>

    </ProductListings>

    </Catalog>

    Thanks,

    Barry


    Barry O'Neill

    Thursday, October 30, 2014 3:51 PM