如何在托管srver上发布Entity框架数据库 [英] how to publish Entity framework database on hosting srver

查看:64
本文介绍了如何在托管srver上发布Entity框架数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我alredy在asp.net c#中创建一个站点。

前端是asp.net with c#

后端是sql server 2008 r2





现在我想托管我的网站..

但是我很困惑如何用数据库托管asp.net网站........?

i alredy make one site in asp.net c#.
front end is asp.net with c#
back end is sql server 2008 r2


now i want to host my website ..
but i am confuse that how to host asp.net website with database........?

推荐答案

您可以在IIS中托管您的网站,在此之前您应该提到访问数据库的连接字符串值。因此,连接字符串应指向数据库所在的IP地址或服务器名称。



要以简单的方式提及它,我们将在连接字符串中使用localhost来使用我们的本地应用程序。但是现在当我们想要从具有该URL的其他机器访问Web应用程序时,连接字符串应该包含IP地址或服务器名称。
You can host your Website in IIS and before doing that you should be mentioning the connection string value for accessing the Database. So that connection string should be pointing to the IP address or the server name where the Database is Present.

To mention it in simple way, we will be using localhost in the connection string to work with our local application. But now when we want to access the web application from other machine with that url, then the connection string should contain either Ip address or Server name.


这篇关于如何在托管srver上发布Entity框架数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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