473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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..not 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.....here 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...please 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.....here 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.
  3.  
  4. ************** Exception Text **************
  5. System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, 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
  33.  
  34.  
  35. ************** Loaded Assemblies **************
  36. mscorlib
  37.     Assembly Version: 2.0.0.0
  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://192.168.0.1/New%20Folder/Hospital%20Management.exe
  45. ----------------------------------------
  46. System.Windows.Forms
  47.     Assembly Version: 2.0.0.0
  48.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  49.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  50. ----------------------------------------
  51. System
  52.     Assembly Version: 2.0.0.0
  53.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  54.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
  55. ----------------------------------------
  56. System.Drawing
  57.     Assembly Version: 2.0.0.0
  58.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  59.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  60. ----------------------------------------
  61. System.Data
  62.     Assembly Version: 2.0.0.0
  63.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  64.     CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
  65. ----------------------------------------
  66. System.Xml
  67.     Assembly Version: 2.0.0.0
  68.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  69.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  70. ----------------------------------------
  71. System.Configuration
  72.     Assembly Version: 2.0.0.0
  73.     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
  74.     CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  75. ----------------------------------------
  76.  
  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.
  83.  
  84. For example:
  85.  
  86. <configuration>
  87.     <system.windows.forms jitDebugging="true" />
  88. </configuration>
  89.  
  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.ConnectionString = "user id = sa; password = sa; database = hosital_manag";

Please show me a way to run ma project on netwrok
Nov 13 '08 #1
3 4258
Plater
7,872 Expert 4TB
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
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
Plater
7,872 Expert 4TB
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

2
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...
1
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...
2
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...
19
by: DW | last post by:
Hi, all... I have a sizeable database running under Oracle 9.2.0.4 under AIX 5.2.0. I am faced with an impending move to a Windows environment, running under SQL 2000. Currently, we are...
19
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...
2
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...
6
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...
1
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...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.