I'm building a Windows Store app with C#, and I have certain data and settings that I need to persist between sessions. Right now I'm doing this with local files, but for some of it, I don't want the users to be able to edit the files. I currently thwart that by using "scary" file names and obfuscated data, but I want better security, but also don't want to have to jump to my cloud service just to pull their settings, because I want functionality when internet connectivity doesn't exist.
How do I do this? I feel like this is something that should be pretty commonly used feature in apps.
I never worked on Windows 8/8.1 apps, so maybe there is some integrated feature to do what yout want, but I didn't find anything on that subject.
In fact, what I found seems to indicate the opposite :
If you want the data of your Windows Store app to be secured, you have
to do it by yourself.
Depending on the desired level of security you could try using some form of encryption for your local files.
This would make the settings unreadable by the user, and prevent them to tamper with it.
But as pointed in Windows 8 Apps - Local Storage Security, encryption might not be the best way if you really want to make sure the data cannot be edited outside your app, since it is possible to extract the key from your app and decode the data.
Related
I try to read/get those advanced settings values such as Put the computer to sleep on my UWP application and follow this article How to get the value of advanced power settings but in UWP it is not working because the example is only for Windows 8.1 and WPF.
Anybody have tried this kind of features in their application?
My goal only for this is to get the values from the corresponding settings.
I don't think it's easily achievable. There's no out of the box API exposed to retrieve such data. Not according to to this document at least.
I'm pretty sure you would need to deal with the native interoperability (aka DllImport). Check this post on how to retrieve this kind of data and use it as a guideline to retrieve data that you're interested in
I really don't know how to look for what I am trying to achieve. I will add two images to show you in a better way what I am doing here.
As you can see I have added a blocking rule in firewall which will block a range of addresses(first rule on the second image) of a specific application.
Is there a way to do something similar on windows phone?
I am not looking for some code or anything. Just for some guidance. Where should I look? What should I look for? Windows phone don't have firewall and I don't want to use any external firewall app's if there is one...
There is nothing like a firewall for Windows Phone. You don't have such a deep access to the network layer. Compared to desktop PC operating systems users and developers are much more restricted in the things they are allowed to do. That leads to less vulnerable systems.
The good side of a restricted system is that it's much harder (or almost implossible) to create a virus, trojaner etc. for it.
On the other hand you are not able to control the system in its depth since there is no API an anti virus software or firewall would need to consume.
In short: It's not possible to block IP addresses for specific applications.
You can't do it with the public API (no such API is available), however you still able to achieve your goal on the interop unlocked handset.
Please refer to this forum about unlocking your phone, and this thread about blocking some sites (i.e. it's an old trick with the editing of \windows\system32\drivers\etc\hosts file).
I'm pretty sure, you can also add a real firewall rule ('cause firewall service is up and running on the WP8.1 & up OS'es) to the registry but this require more investigation.
I am trying to make a quiz application for Windows Store using the blank app template (in VS2013). I have the UI laid out in XAML but I don't know how to fetch Questions saved in my DB (MS access or SQL).
I have tried to find tutorials related to it,but what I have found is for WPF and Windows Forms. I had chosen the Blank app template, so can anyone explain how to fetch question from the Database in an application using Blank app template?
As it turns out, there's a good reason you couldn't find a tutorial for accessing a local DB in the WinRT environment. You can't. Microsoft didn't even include the requistite ADO.NET assemblies, assuming you could get out of the sandbox in order to connect.
There is a SQLLite project for Windows Store apps, found here. That's about as good as you can get it right now in terms of a local relational database in a windows store app.
What Microsoft intended for you to do was to store your database in the cloud (and if they have their way, on Microsoft Azure) and access it using a web service. Support for that is all over the WinRT API. It sounds like thats probably what you want anyways (unless you expect your users to generate their own questions) so I would go into that route.
A starting point for that would be to use Azure Mobile Services.
One last thing to note, WPF and WinForms are not WinRT, but there are other project templates (like the Hub template) that are. The fact that you chose the "Blank" template doesn't really affect anything in this regard.
I am pretty new to MacOS and building applications on it and I have a question:
When I build a dmg and run it, is there any usual approach to store some properties? I want to access those properties each time I start my application, so they need to remain in the storage. (I want to store them at the first run of the dmg file and then keep them.)
I also want to store some properties which shall be deleted each time after running the application.
My application is based on nodejs. I have another (for Windows, written in C#) where I use the Properties to store some variables (which I want to remain for each run). (e.g. Properties.Settings.Default.variable)
I'd like to know if there is an often used approach for MacOS applications too?
Thanks for help in advance!
Greetings
I am really new to Windows Phone ( and Windows) development, and C#.I have done my first program as a unit convertor for Window Phone 8.1 using C# and Silverlight, run it on emulator and Phone both.
Now I want to build an application that can store data (e.g. a diary, that I can store plain text in it daily), something like usage of database, but I really have no idea how to do it and whether I need some sort of database, like SQLite, or there is some built in solution to store custom data in Windows Phone itself.
Can you please tell me how to and where to start?
In Windows Phone Silverlight apps, you have the option of using a SQLCE database with the LINQ-to-SQL framework on top of it (see docs here). If you're considering building a universal app that will run on both Windows and Windows Phone, however, your only database option is SQLite (see here for more details).
That said - unless you need to perform queries across a large amount of structured data, a database is probably overkill for your app. You may want to consider simply using flat files (docs here) to start and only upgrading to a database if the amount of metadata for the diary entries grows beyond what you'd want to keep in memory.