locked
How can I access AppId during development?

    Question

  • Hi,

    I am developing a Windows 8 app. The authentication process involves using the AppId.

    CurrentApp.AppId.ToString()

    The above code was giving me the default emtpy Guid. So I did the association with store from Visual Studio and published a dummy version in the store. 

    Now I have the AppId but I am unable to access it in the code to test the Authentication process. Is there an XML/Config file where this data can be saved so that I can access the AppId?

    Thanks,

    LF.

    Wednesday, June 04, 2014 10:45 PM

Answers

  • Hi,

    You don't need the App Id. It isn't used at all for testing, but since the CurrentApp project will return the App Id it retrieves from the store you can provide a dummy App Id in your WindowsStoreProxy.xml so the CurrentAppSimulator can return it. And the WindowsStoreProxy.xml file is used only by the CurrentAppSimulator for app development and testing.  You have to create it and make sure the CurrentAppSimulator loads it when debugging. Refer to the link to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.currentappsimulator.aspx

    Best Wishes!


    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. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Live_Free Thursday, June 05, 2014 8:45 PM
    Thursday, June 05, 2014 6:14 AM

All replies

  • Hi,

    You don't need the App Id. It isn't used at all for testing, but since the CurrentApp project will return the App Id it retrieves from the store you can provide a dummy App Id in your WindowsStoreProxy.xml so the CurrentAppSimulator can return it. And the WindowsStoreProxy.xml file is used only by the CurrentAppSimulator for app development and testing.  You have to create it and make sure the CurrentAppSimulator loads it when debugging. Refer to the link to get more information:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.store.currentappsimulator.aspx

    Best Wishes!


    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. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Live_Free Thursday, June 05, 2014 8:45 PM
    Thursday, June 05, 2014 6:14 AM
  • Thanks Anne. That worked.

    Here is the code in case someone else needs.
     private async void ReloadProxyFile()
            {
                StorageFolder proxyDataFolder = await StorageFolder.GetFolderFromPathAsync(@"C:\Users\username\AppData\Local\Packages\packagename\LocalState\Microsoft\Windows Store\ApiData\");
                StorageFile proxyFile = await proxyDataFolder.GetFileAsync("WindowsStoreProxy.xml");
                await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile);
            }



    • Edited by Live_Free Thursday, June 05, 2014 8:45 PM
    Thursday, June 05, 2014 8:40 PM