locked
Windows store certification problem

    Question

  • I am trying to upload app on microsoft store, but without success.

    They keep saying: "App did not complete expected action.", but this is normal behavior. This is how it should work.

    If I have to be more exact...This app uses client certificate to connect with remote api. But if user doesn't import certificate it cannot work, so app throws an "error" in messagebox like this: "Something went wrong. In order to proceed, please check your certificate.", with help and exit buttons.

    So I have no idea what is wrong now...neather how can I solve this. It's obviously that user can not go further if he didn't install his certificate jet...


    • Edited by Klemzy2013 Wednesday, April 2, 2014 9:27 AM
    Wednesday, April 2, 2014 7:33 AM

All replies

  • i dont think you will get this certificated. microsoft needs a version they can test. so you need to give them access. yu can try with a demo mode.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, April 2, 2014 7:35 AM
  • Sorry, I forgot to mentioned this.

    I gave them everything they need in "notes for testers". I gave them username and password and also demo certificate. So they have full access to demo data in application. But still...

    Wednesday, April 2, 2014 7:39 AM
  • i dont think they will install a certificate for testing. it need to work out of the box.

    what about adding a demo mode that doesnt use internet connecting at all ?


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Wednesday, April 2, 2014 7:45 AM
  • Ok lol...why exactly? :)

    The thing is, that I can not do this. It is not possible, because api is not written this way. App contains medical reports, so I really can not do this...Demo or not...it is not possible. It would be only one security risk more..

    Wednesday, April 2, 2014 7:49 AM
  • Hi,

    SSL over HTTPS provides a mechanism for mutual server-client authentication. This can be used as an alternative to more commonly used username/password based approach. Here is the code that can be used to import the file to app certificate storage:

    StorageFolder packageLocation = Windows.ApplicationModel.Package.Current.InstalledLocation;
    StorageFolder certificateFolder = await packageLocation.GetFolderAsync("Certificates");
    StorageFile certificate = await certificateFolder.GetFileAsync("Client.pfx");
     
    IBuffer buffer = await Windows.Storage.FileIO.ReadBufferAsync(certificate);
    string encodedString = Windows.Security.Cryptography.CryptographicBuffer.EncodeToBase64String(buffer);
     
    await CertificateEnrollmentManager.ImportPfxDataAsync(
        encodedString,
        "PASSWORD",
        ExportOption.NotExportable,
        KeyProtectionLevel.NoConsent,
        InstallOptions.None,
        "Client certificate");
    

    You can refer to the link to know how to use client certification in windows store app:

    http://www.piotrwalat.net/client-certificate-authentication-in-asp-net-web-api-and-windows-store-apps/

    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.

    Thursday, April 3, 2014 2:59 AM
  • Hi,

    SSL over HTTPS provides a mechanism for mutual server-client authentication. This can be used as an alternative to more commonly used username/password based approach. Here is the code that can be used to import the file to app certificate storage:

    StorageFolder packageLocation = Windows.ApplicationModel.Package.Current.InstalledLocation;
    StorageFolder certificateFolder = await packageLocation.GetFolderAsync("Certificates");
    StorageFile certificate = await certificateFolder.GetFileAsync("Client.pfx");
     
    IBuffer buffer = await Windows.Storage.FileIO.ReadBufferAsync(certificate);
    string encodedString = Windows.Security.Cryptography.CryptographicBuffer.EncodeToBase64String(buffer);
     
    await CertificateEnrollmentManager.ImportPfxDataAsync(
        encodedString,
        "PASSWORD",
        ExportOption.NotExportable,
        KeyProtectionLevel.NoConsent,
        InstallOptions.None,
        "Client certificate");

    You can refer to the link to know how to use client certification in windows store app:

    http://www.piotrwalat.net/client-certificate-authentication-in-asp-net-web-api-and-windows-store-apps/

    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.

    Hi, sorry for late reply.

    So if I understand you correctly there will be one certificate imported in app, so that everyone will be able to access app, etc. If so, then this is something, what I cannot do. Every user have his own certificate and privileges in app. It is not the same for everyone.

    Thursday, April 3, 2014 6:05 PM