我可以从另一个应用程序访问我的网站 MS SQL 2008 数据库吗
基本上,我正在 Web Developer 2008 中创建一个数据库驱动的网站。该数据库存储在我的网站项目的 App_Data 文件夹中。我可以让 iPhone、Blackberry、Symbian、Windows Phone、webOS 或 Android 应用程序通过 HTTP(或其他类型的)请求访问数据库吗?
在我进一步进行编程之前,我想知道这是否可能。
Basically I am creating a database driven website in Web Developer 2008. The database is stored in the App_Data folder of my website project. Could I have an iPhone, Blackberry, Symbian, Windows Phone, webOS or Android app access the database via an HTTP (or some other type of) request?
I would like to know if this is possible before I move too far in the programming.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是很有可能的,尽管也许最安全的方法是通过 WCF 服务甚至传统的 Web 服务抽象与数据库的连接。
这样,数据库连接字符串保留在服务器上,并且 Web 服务将允许直通连接,可以这么说。这只是一个安全层,防止有人获取数据库连接字符串并直接访问您的数据库。
It is very possible, although perhaps the most secure method would be to abstract the connection to the database through a WCF service or even a conventional web service.
That way the database connection string remains on the server, and the web service will allow pass-through connectivity, so to speak. This is just a security layer to prevent someone from grabbing the database connection string and accessing your database directly.
是的...这上面写满了 Web 服务。哎呀,一旦你弄清楚了这一点,你可能会发现自己回去并废弃了为你的应用程序编写的大部分代码,让它使用你刚刚编写的 Web 服务。
XML 和 XSLT - 向他们发送“Facebook 好友请求” - 加入他们的 MySpace 页面 - 在 Twitter 上关注他们 - 带他们出去喝鸡尾酒 - 让他们喝得酩酊大醉,然后躺在你能找到的最热门的硅片上。我保证,他们会在未来几年里照顾你。
Yeah... this has Web Services written all over it. Heck, once you figure that out, you might find yourself going back and scrapping most of the code you wrote for your app, having it use the Web Services you just wrote.
XML and XSLT - send them "Facebook Friend Requests" - join their MySpace page - follow them on Twitter - take them out for cocktails - get them liquored up and laid on the hottest silicon you can get your hands on. They'll take care of you for years to come, I promise.