English 中文(简体)
就如何在局域网以外部署一个有数据库的C#方案提供咨询
原标题:Advice for deploying a C# program with database to work over LAN

I ve设计了一种C#游戏,利用检索数据库文档储存变量。

基本想法是,参与者之一将主办游戏,而其他参与者将参加上述游戏,将数据库连接起来,阅读和书写项目。 数据库需要将各种变量传送给接收人和客户,两个方案都定期核对数据库,以了解新的信息/变量(即,是,我可以不敢再工作)。

现在,只要客户能够找到数据库档案,该方案就进行罚款(主要是客户,因为东道方只是在当地的数据库中抽取)。 目前,客户的连接线位于1.ini文档中,而工作方案(或至少是服务器)必须位于XP机器的共同文件或Vista 7机器的公共文件。

但随后,我遇到了一些问题:

  1. 如果客户用户在共享文件/公共文件中将这一文件放在另一个文件夹中,那么该软件又怎么办? 我在座标有一条可以钻进共享文件夹的代码,以便找到数据库的道路,共享名称包括......是否有?

  2. 安装情况如何? 安装装置的违约总是“C:Program filesGameName”。 是否能够(或锁定)在共享/公共文件上设定一个具体文件夹? 是否甚至建议将其安装在共同的Folder,哪些问题涉及事故审理等?

  3. Say是“C:Program filesGameName”。 我可以看到,一套安装道路将解决任何连接问题,因为每个客户将看上其他计算机的同样道路,如果是XP或Vista,它就赢得了定点。 “C:Program filesGameName”能否在不修改任何制度的情况下通过在局域网上的C#方案获得? 是否有任何安全问题?

P.S. Details that people may find in handy: I m using Visual Studio 2005. So is my School. I m running .NET framework 2.0. So is my school, and unfortunately, I can t change that.

最佳回答

我怀着仇恨告诉你,但这就是为什么这种做法存在根本缺陷。 :

  • File and print sharing on the server is disabled?
  • The network client is disabled on a client computer?
  • The server is configured to only allow authenticated users, and the client doesn t have access?
  • File and print sharing is blocked because of the firewall?
  • File and print sharing is completely borked for other who-knows-why reasons?
  • You need administrator access on the server to share a folder, but the current user is not an administrator?
  • The Access database engine isn t installed correctly on the server or client?
  • One of the clients corrupts the database? (This is easier than you might think; all it takes is a network glitch where a client temporarily or permanently disconnects from the server).

这些是你能够用目前解决办法解决的根本问题。

争取在普通的TCP/UDP港口工作。 你的休息时间要小得多。 现有图书馆促进这项工作,见。 C# Wild Network Library——例如,它像Microsoft sXNA SDK一样拥有在游戏中建立网络的功能。 如果你使用标准方法/标准图书馆来实施网络建设,那么你的成功难度要高得多。 使用客户/服务器结构意味着,如果客户站起来,服务器的国营公司就会被腐败。

I realize that this probably involves a significant rewrite. Frankly, I don t think you have a choice if you want this game to be commercially successful on a wide customer base without high support costs, and move beyond being a mere experiment.

问题回答

检索数据库。 所述结构已经不方便用户

Use either SQL Express or SQL CE which requires no installed database binaries (they can all be included in the applications folder). This way the db will stay in the applications folder (ideally app_Data) and .Net has included support for databases in this folder.

请不要接触你,以免造成很多麻烦。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签