locked
Data Store with security

    Question

  • Hi,

    My problem is about to save local data with security protection on on windows store apps. I develops my app in VB.Net using the Windows Store project with the .Net Framework Windows Runtime.  In this framework we don’t have any System.Data, so we don’t have any Datatable object.  When searching on web I found that the best way is to use windows service (WCF) and  SQLite . So OK for the WCF I can connect SQL Server and gest my Datatable ready to send.  But on the other side (Windows store app project) I use SQLite on dll (compile by C# project).  When I try to declare my Database for SQLite I don’t see any security (just file system security).  So I don’t want anyone to have access to this data (just the apps).

    Before I begin to work with .Net framework for Windows Runtime  I use in my Old application Datatable object provide by System.Data.   The code and the way to do that was simple.  I get the XML representation of the Datatable and I crypte the info on  file and each time I have a new data to save I rewrite the file with the Datatable.

    Now my problem is to get a best and simple way to receive my datatable from WCF service and store it with security and it easy to manipulate data on the apps code (searching data, order data, etc).

    Do you have a simple way to do that in VB (Examples, Tutorial) (sometimes I can develops my apps with more than one Ddatatable but relational Datatable is not and obligation)?

    Thank you

    Wednesday, March 12, 2014 1:28 PM

Answers

  • Hi SebProg,

    I would like to provide some information and hope these helps.

    1, while install the app to the device, the app installation folder has permission, and a normal user will not have access by default to go to the applications folder and would be denied access to that folder by Windows. Only the app can visit that folder.

    2, If you still worry about your data, take a look at: Encrypting data and working with certificates, also Securing apps might be a good start for you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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, March 13, 2014 2:11 AM
    Moderator
  • Hi SebProg,

    Sorry for a late response. All I can say is Windows Store App is a client and do not support much Data manipulate API for instance System.Data. However Linq is supported by Windows Store App, if you can get the data via WCF, I believe you can sort them, search them by some Linq statement.

    How to read XML at Windows Store App?  Windows.Data.Xml.Dom  should help you, a sample could be found at code center: http://code.msdn.microsoft.com/windowsapps/XML-API-Scenario-Sample-42ce708b

    How to put data on datatable? You can use a collection instead. A great sample should be Part 5: Create a blog reader, you could learn how to manipulate the data by windows store app.

    Hope this helps.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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.

    Tuesday, March 25, 2014 7:24 AM
    Moderator

All replies

  • Hi SebProg,

    I would like to provide some information and hope these helps.

    1, while install the app to the device, the app installation folder has permission, and a normal user will not have access by default to go to the applications folder and would be denied access to that folder by Windows. Only the app can visit that folder.

    2, If you still worry about your data, take a look at: Encrypting data and working with certificates, also Securing apps might be a good start for you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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, March 13, 2014 2:11 AM
    Moderator
  • Thank you James for this information its help me.  So I can use SQLite or XML files with Selective Wipe protection.  Before you answer me I working on cryptography on both side WCF and Win Store app and now it’s OK for the exchange.

    But your answer make myself clearer.  Now I can store data on SQLite or XML files,  but my problem is still  the exchange of the Datatable between WCF service and the windows store app and find  object something like a Datatable on the windows store app side that is easy to manipulate data (search, Order, etc).

    I the WCF side I can put DataTable in XML format (ex: datatable.WriteXML) ,  but in the other side what kind of object I can receive that (no datatable on this side).  I don’t study a lot about LinQ (Entity framework) but as I understated this way It like to recreate class that is like you datatable, but the problem is that when you want to add column you have to rebuilt the app and service.

    Do you have some example or “How to” read xml file (like the datatable .XML file)  and put the data on object like datatable on windows store app that it easy to search and order by rows?

    Thank you
    Friday, March 14, 2014 8:06 PM
  • Hi SebProg,

    Sorry for a late response. All I can say is Windows Store App is a client and do not support much Data manipulate API for instance System.Data. However Linq is supported by Windows Store App, if you can get the data via WCF, I believe you can sort them, search them by some Linq statement.

    How to read XML at Windows Store App?  Windows.Data.Xml.Dom  should help you, a sample could be found at code center: http://code.msdn.microsoft.com/windowsapps/XML-API-Scenario-Sample-42ce708b

    How to put data on datatable? You can use a collection instead. A great sample should be Part 5: Create a blog reader, you could learn how to manipulate the data by windows store app.

    Hope this helps.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" 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.

    Tuesday, March 25, 2014 7:24 AM
    Moderator
  • It's working well thank you!!!
    Tuesday, April 08, 2014 6:41 PM