如何在客户端计算机上托管连接到sqlserver db的ASP.NET mvc5 Web应用程序,而无需在该计算机上安装mssqlserver? [英] How do I host an ASP.NET mvc5 web application that connects to an sqlserver db on a client machine without installing mssqlserver on that machine?

查看:58
本文介绍了如何在客户端计算机上托管连接到sqlserver db的ASP.NET mvc5 Web应用程序,而无需在该计算机上安装mssqlserver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.Net MVC5创建一个Web应用程序。我在EF中使用Code First方法来创建和操作Db,Db托管在我的机器上的localdb服务器实例上的零售版本的MSSQLServer上(用于开发)。我打算将该应用程序分发给多个客户端,但仅在其各自的计算机上进行脱机使用。我不想经历在每台客户端计算机上安装MSSQLServer的麻烦。这个问题的解决方法是什么?



我尝试了什么:



我没有尝试任何东西,因为我没有任何客户端来测试这个

I am creating a web application using ASP.Net MVC5. I am using Code First approach in EF to create and manipulate the Db which is hosted on a retail version of MSSQLServer on the localdb server instance on my machine (used for development). I intend to distribute that application to multiple clients but for offline use on their respective machines only. I don't want to go through the hassle of installing MSSQLServer on each client machine. What would be the workaround to this issue?

What I have tried:

I haven't tried anything as I don't have any clients to test this on

推荐答案

您可以要求您的客户安装轻量级的SQLExpress SQL Server的版本及其免费版。请检查它的许可条款,因为我怀疑它是否可以用于商业用途。



在部署应用程序时,将空数据库恢复到SQLExpress并更改连接字符串以指向SQLExpress版本和数据库。



希望这对你有帮助。
You can ask your clients to install SQLExpress which is a lightweight version of SQL Server and its free. Please check the license term of it as I doubt whether it can used for commercial purposes.

While deploying you application, restore the empty db to SQLExpress and change your connection string to point the SQLExpress version and the DB.

Hope this will help you.


这篇关于如何在客户端计算机上托管连接到sqlserver db的ASP.NET mvc5 Web应用程序,而无需在该计算机上安装mssqlserver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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