473,836 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000

3 New Member
How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000

Hello All...i m really grate full to c such a website where developers try to help people like us who face problems in s/w develepment...I am shobhit Gupta...23 years of age prusuing B.Tech in I.T. Engg. Final Year from Kurukshetra University, Kurukshetra. Recently, i have been working on a project which is to be implemented in a hospital for real life use...Its a s/w for hospital management which, basically, will be used for record keeping and reports generating... Records will containg info about patients and various tests conducted on them... i have made this s/w in C#.NET and tht a windows application..no t a web application.... .its almost complete....bt the final stage is the major problem for me...i dnt know how to run this project on network.....her e is wat the customer i.e. hospital owner wants :-
A CENTRALIZED DATABASE....i.e . the .exe file of the s/w will be copied on clients and server but the Database will be present only in the main server and the clients must retrieve and save data directly fron and in the server.....i.e. transanctions shuld b made b/w client-server...but i wil b using the same application on client as well as on server...no seperate applications...
i am a new developer and its my first project so, i will request you to please help me in details bcause i may not be having adequate knowledge...ple ase help me...please...

i tried to run in a simpler way...i shared the directory of the server in which .exe file is present...then i accessed that folder on client and created a shortcut of the .exe file so that being accessed from client,...the main works shul be done on server...but, its got failed.....it is not able to acces the data from the database.....he re is the lisst of errors that i got.....ERROR LIST BEGINS

Expand|Select|Wrap|Line Numbers
  1. See the end of this message for details on invoking 
  2. just-in-time (JIT) debugging instead of this dialog box.
  4. ************** Exception Text **************
  5. System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
  6.    at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
  7.    at System.Security.PermissionSet.Demand()
  8.    at System.Data.Common.DbConnectionOptions.DemandPermission()
  9.    at System.Data.SqlClient.SqlConnection.PermissionDemand()
  10.    at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
  11.    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  12.    at System.Data.SqlClient.SqlConnection.Open()
  13.    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  14.    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  15.    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
  16.    at Hospital_Management.opddisplay.button1_Click(Object sender, EventArgs e)
  17.    at System.Windows.Forms.Control.OnClick(EventArgs e)
  18.    at System.Windows.Forms.Button.OnClick(EventArgs e)
  19.    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  20.    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  21.    at System.Windows.Forms.Control.WndProc(Message& m)
  22.    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
  23.    at System.Windows.Forms.Button.WndProc(Message& m)
  24.    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  25.    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  26.    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  27. The action that failed was:
  28. Demand
  29. The type of the first permission that failed was:
  30. System.Data.SqlClient.SqlClientPermission
  31. The Zone of the assembly that failed was:
  32. Internet
  35. ************** Loaded Assemblies **************
  36. mscorlib
  37.     Assembly Version:
  38.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  39.     CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
  40. ----------------------------------------
  41. Hospital Management
  42.     Assembly Version: 1.0.3239.24658
  43.     Win32 Version: 1.0.3239.24658
  44.     CodeBase: file://
  45. ----------------------------------------
  46. System.Windows.Forms
  47.     Assembly Version:
  48.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  49.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
  50. ----------------------------------------
  51. System
  52.     Assembly Version:
  53.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  54.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
  55. ----------------------------------------
  56. System.Drawing
  57.     Assembly Version:
  58.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  59.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
  60. ----------------------------------------
  61. System.Data
  62.     Assembly Version:
  63.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  64.     CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/
  65. ----------------------------------------
  66. System.Xml
  67.     Assembly Version:
  68.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  69.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
  70. ----------------------------------------
  71. System.Configuration
  72.     Assembly Version:
  73.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  74.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/
  75. ----------------------------------------
  77. ************** JIT Debugging **************
  78. To enable just-in-time (JIT) debugging, the .config file for this
  79. application or computer (machine.config) must have the
  80. jitDebugging value set in the system.windows.forms section.
  81. The application must also be compiled with debugging
  82. enabled.
  84. For example:
  86. <configuration>
  87.     <system.windows.forms jitDebugging="true" />
  88. </configuration>
  90. When JIT debugging is enabled, any unhandled exception
  91. will be sent to the JIT debugger registered on the computer
  92. rather than be handled by this dialog box.
i created the connection by makin g a class in whic this coding was written in a constructor :::

com.ConnectionS tring = "user id = sa; password = sa; database = hosital_manag";

Please show me a way to run ma project on netwrok
Nov 13 '08 #1
3 4298
7,872 Recognized Expert Expert
There are a couple of ways you can try and do this.
There are settings, for managed/.NET code located on EACH computer, that you can walk around and edit to allow your program.

The BETTER way, would be to look at the properties of your project and go to the Security tab and then the Publish tab.
With ClickOnce security and publishing, you can declare that your program requires "full trust" and then "publish" your program to the share directory, where other users can then run it.
Nov 13 '08 #2
3 New Member
Thanx a lot sir for such a quick reply and i hope you will help me more....sir, please tell me where the Project Properties option relies??acuallu , i have very basic knowledge of .net bcoz my teacher taught me limited bcoz of his limited knowledge...... .....
is there any simpler way to solve m problem???if yes then please....guide me in a detailed manner where please meantion all the options which i have to follow in sequence .. i will b very thankful to u...i dnt want to get failed int he very 1st project of ma career...and tht's going to b used in real life so, please help me out...
Nov 14 '08 #3
7,872 Recognized Expert Expert
In visual studio you have the solution explorer (where it shows the files in your project(s)/solution)
Right click on the top of your project tree and choose properties.
Along the side will be tabs for SECURITY and PUBLISH
You will find the clickonce security stuff there.
Nov 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000 Personal disk from the SQL Server 2000 Enterprise kit as this is reported here on the MSDN web site to be the version that is supported on Windows XP. In fact so many of you kind people confess to having succeeded in doing it. I have tried...
by: Marino | last post by:
Hi all, I have a Windows 2003 server, which is also a terminal server for application, with sql 2000 installed. My company has developed an application that uses SQL 2000 as its database. The application is a client/server one. In each client computer there's a link to the application on the server. There is no problem with Windows 98, Windows 2000 pro, Windows xp pro clients, but the windows 95 ones cannot log in to the database. The...
by: Dave | last post by:
I have developed a VB.net application that transfers a SOAP wrapped message to another server securely(using SSL and sever/client certificates). When I run this app from a Windows 2000 Professional box everything works as expected, the secure channel is established and the message is sent properly. When I use the exact same app on the Windows 2000 Server(running IIS) box the app does not work properly. I have used a packet sniffer to...
by: DW | last post by:
Hi, all... I have a sizeable database running under Oracle under AIX 5.2.0. I am faced with an impending move to a Windows environment, running under SQL 2000. Currently, we are heavy users of shell scripts, for exports, backups, etc.
by: Mark C. | last post by:
The company I work for has been running Access 2000 on a Windows NT server with Opportunistic Locking turned off on the server without issue for almost a year. We have just switched to a Windows 2000 file server with service pack 3 installed and are now experiencing at least 2 corruptions a day. The registry setting for Opportunistic Locking that was on the Windows NT server does not exist on the Windows 2000 server so we can not make the...
by: Vaap | last post by:
I did lot of googling to see if I can solve the SQL server not found problem while trying to run ASP.Net community starter kit from an XP machine to Windows 2003 server hosting SQL server 2000 database. Tried all possible combinations but it still fails. I have Windows 2003 server having SQL Server 2000 installed with SP2. The installation went Ok on a XP professional machine and I was able to create database and user logins etc on...
by: mcollier | last post by:
I am running a Windows Server 2003 machine as my web server. I would like to use Windows authentication for connections to my SQL Server 2000 instance on a Windows 2000 server. I've read where mirroring the ASPNET account and password on the web server and SQL server would work. However, with IIS 6, ASP.NET runs under the 'NT AUTHORITY\NETWORK SERVICE' account. Should I change the password of the 'NT AUTHORITY\NETWORK SERVICE' account...
by: Doug | last post by:
The Setup --------------- Machine A: Windows 2000 Workstation Machine B: Windows 2000 Server running IIS 5.0 Machine C: Windows 2000 Server running SQL Server 2000 * User is logged into Machine A with userid/password. * All machines are networked on a domain. * Due to security requirements, we have removed the "ASPNET" user account.
by: emu | last post by:
Hi All, I have an unmanaged C++ application that references a mixed mode image DLL (mixed managed and unmanaged). Under .NET 1.1 we could trust the dll (the mixed mode dll) by running the following command line: caspol.exe -polchgprompt off -machine -addgroup 1 -url "file://<UNC path to dll>\mixedMode.dll" FullTrust ame "GroupName" -polchgprompt on
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.