在Windows Phone 8中访问远程数据库 [英] Accessing Remote Databases in Windows Phone 8

查看:85
本文介绍了在Windows Phone 8中访问远程数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个学校/个人/ Progvember项目,我正在研究它作为一种"防病毒"工具。应用于Windows Phone(也许有一天,Android)设备上的近场通信。基本上,快照是NFC标签的内容,
发送到数据库进行检查,如果发现是恶意的,则会显示警告,不使用其他应用程序来读取标签。 


这个想法围绕着访问远程数据库,这是我学校托管的机器上的Postgres数据库。我是否可以访问运行MS SQL Server的内容尚不清楚,但我的直觉是说"不"。 



我对此感到非常惊讶(并且有点失望)发现我无法通过Windows Phone的API连接到远程数据库(我无法在手机上写下所有标签信息)。如何通过
访问我的应用程序中的设备来访问远程数据库?基本上,我只是查询数据库并分析结果。我已经读过一些叫做WCF的东西,通过某种奇怪的中间方法来做到这一点,但我需要更多关于它的信息,然后再跟上
。分步指南会很好。

解决方案

以下是一些从Windows Phone使用WCF服务的文章。


http:// www。 codeproject.com/Articles/196996/Consuming-WCF-Service-from-Windows-7-Phone-Applica

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v = vs.105) .aspx

http://www.mindfiresolutions.com/How-to-Connect-Windows-Phone-With-WCF-Service-2274.php


I have a school/personal/Progvember project that I'm working on that works as a sort of "antivirus" application for Near-Field Communications on Windows Phone (and maybe someday, Android) devices. Basically, a snapshot is taken of a NFC tag's contents, sent to a database for checking, and if it's found to be malicious, a warning is displayed to not use other applications to read the tag. 

This idea revolves around accessing the remote database, which will be a Postgres database on a machine my school hosts. Whether I can access something running MS SQL Server is unknown, but my gut is saying "no". 

I was rather surprised (and slightly disappointed) to find out that I couldn't simply connect to a remote database (I can't write ALL of that tag information on the phone) through Windows Phone's APIs. What do I have to do to access remote databases through the device in my application? Basically, I'm just querying the database and analyzing the result. I've read about something called WCF being used to do this through some sort of weird go-between method, but I need more information about it before following through on that. A step-by-step guide would be nice.

解决方案

Below are few articles to consume WCF Service from Windows Phone.

http://www.codeproject.com/Articles/196996/Consuming-WCF-Service-from-Windows-7-Phone-Applica
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx
http://www.mindfiresolutions.com/How-to-Connect-Windows-Phone-With-WCF-Service-2274.php


这篇关于在Windows Phone 8中访问远程数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆