none
how to distinguish Paying customers and Free users using JS? RRS feed

  • Question

  • I know office app can distinguish Paying customers and Free users using .NET,

    but can i distinguish Paying customers and Free users using JS?


    Saturday, June 29, 2013 1:28 PM

Answers

All replies

  • hi,nobody know the answer?
    Wednesday, July 3, 2013 1:21 PM
  • Hi Shuichao,

    Per the MSDN documentation, "Calling the Office Store verification service from client-side code is not supported. You must use server-side code to query the Office Store verification web service."  (http://msdn.microsoft.com/en-us/library/jj163908.aspx).

    That said, it is quite easy to create a web service to do the license validation, and then pass the result of that validation (or the appropriate content) back to your app when you call the service via AJAX from JavaScript.  See http://blogs.msdn.com/b/officeapps/archive/2013/06/10/create-a-web-service-for-an-app-for-office-using-the-asp-net-web-api.aspx for an example.

    Hope this helps,

    - Michael


    Michael Zlatkovsky | Program Manager, Visual Studio Tools for Office & Apps for Office

    • Marked as answer by shuichao Saturday, July 6, 2013 2:22 PM
    Thursday, July 4, 2013 4:43 PM
  • Thank you so much for this link about how to create a web service.  Amidst all of the Apps for Office documentation and forum responses, this is the only piece of info I found that actually let me know how to create the necessary server-side piece to do verification.  All other documentation just gives the reader C# snippets, and as someone who is completely new to web development, this meant nothing to me.  I have a web project in Visual Studio with only client-side files: HTML, CSS, and JS, and I had no idea what to do.

    I'm wondering if you know the answer to this--if I add this "server-side" piece to my Office app, does it still qualify as a Azure website for which I can use the same publishing process that is described here?

    Tuesday, August 19, 2014 5:55 AM
  • Hi Gabrielle,

    Thanks for your kind words :-)

    Yes, if you add a Web API service, it will absolutely publish to Windows Azure.  Most sites do in fact have a web component, and technologies like MVC are based a mix of client-side and server-side code.  So yes, that's very much supported.

    BTW, if you want a blog post that walks step-by-step through publishing to Azure (though it looks like the MSDN article is very good too), see http://blogs.msdn.com/b/officeapps/archive/2014/01/15/publishing-apps-for-office-and-sharepoint-to-windows-azure-websites.aspx

    Best,

    - Michael


    Michael Zlatkovsky | Program Manager, Visual Studio

    Tuesday, August 19, 2014 6:38 PM
  • Thanks! I'll take a look at that blog post as well.
    Tuesday, August 19, 2014 6:56 PM