如何从网络运行VB.net应用程序 [英] How run a VB.net Application from Network

查看:70
本文介绍了如何从网络运行VB.net应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个简单的学校应用程序到主要学生记录...我已经使用sql server数据库(LocalDB)\v11.0

我想在三个或同时运行此应用程序四台计算机...通过网络....它可能......或者它会给出错误,因为所有人都在同一时间使用相同的数据库...请澄清.....

I have develop one simple school application to main student record... I have use sql server database (LocalDB)\v11.0
I want to run this application same time on three or four computer... through networking.... it possible... or it will give error because all are using same database on same time... please clarify.....

推荐答案

如果您正在使用SQL Server,那么它正是它的设计目标:多个用户。

您可能需要更改的唯一内容是连接字符串,具体取决于如何编码。
If you are using SQL Server, then that is exactly what it is designed for: multiple users.
The only thing you may have to change is the connection string, depending on how you coded it.


你好,

如果机器通过局域网内部连接,你可以回答你的问题。

只需通过IIS在一台机器上托管应用程序请参阅此如何部署IIS中的Web应用程序

将path ...distribute复制到其他计算机并检查Intranet可访问性。



对于Sql server连接:



请允许其他用户访问数据库并检查其他机器的可访问性。



例如:)

Hello,
To Answer your question if the machines are connected internally through LAN it is possible.
Just host the application in one machine through IIS Refer this How To Deploy a Web App in IIS
Copy the path..distribute to other machines and check the Intranet accessibility.

For Sql server connection :

Pls provide access to other users to the database and check the accessibility from other machines .

eg:)
- Create user windows Authentication
CREATE LOGIN [YourDomainName] FROM WINDOWS
WITH DEFAULT_DATABASE = [YourDatabase];
GO
-- Add User to first database
USE YourDatabaseHere;
CREATE USER X FOR LOGIN [YourDomainNameJohnJacobs];
EXEC sp_addrolemember 'db_datareader', 'X'
EXEC sp_addrolemember 'db_datawriter', 'X'
Go

-- Create user for SQL Authentication
CREATE LOGIN X WITH PASSWORD = 'X'
,DEFAULT_DATABASE = [YourDatabase]
GO
-- Add User to first database
USE YourDatabaseHere;
CREATE USER X FOR LOGIN X;
EXEC sp_addrolemember 'db_datareader', 'X'
EXEC sp_addrolemember 'db_datawriter', 'X'
GO





对于你对connectionstring的查询:在Web.config中请这样的代码





For your query for connectionstring:In the Web.config pls code like this

<connectionStrings>
	
    <add  name="yourconnectionstring"  connectionString="Data Source=yourserverName\SQLEXPRESS;Initial Catalog=yourDatabaseName;Integrated Security=True"  providerName="System.Data.SqlClient" />
  </connectionStrings>





Wala!你的工作已经完成!



如果你需要更多支持,请回信:)



Wala!Your work is complete!

Pls write back if you need more support:)


这篇关于如何从网络运行VB.net应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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