:: .NET program u mrezi na drugom racunaru nece da radi

profesionalac-bgd

Zainteresovan član
Banovan
Poruka
232
Napravio sam aplikaciju radjenu u .Net VS koja radi na mom racunaru ok preko sql servera i baze podataka. Kada sam pokusao da prenesem istu aplikaciju na drugu masinu koja je umrezena sa mojom nije mogla da se uspostavi konekcija sa bazom i pojavila se greska (u nastavku). SQL Server 2008 na mojoj masini radi u Windows Autentikaciji sa korisnickim imenom bez lozinke. Na toj drugoj masini sam preneo folder u kom je aplikacija, instalirao >NET Framework 3.5 i pri pokretanju aplikacije se pokazala samo uvodna forma za logovanje korisnika na bazu, a onda prilikom logovanja greska koja je pomenuta:

MOLIM ZA POMOC:


Exception Text **************
System.Data.SqlClient.SqlException: Login failed for user 'Milan-PC\Guest'.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at ORDINACIJA.Form1.wmPrijavaLekara(String A_User, String A_Pass) in C:\Users\Milan\Desktop\ORDINACIJA\Form1.vb:line 206
at ORDINACIJA.Form1.pbPrijavaLekara_Click(Object sender, EventArgs e) in C:\Users\Milan\Desktop\ORDINACIJA\Form1.vb:line 179
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
ORDINACIJA
Assembly Version: 1.0.3558.13415
Win32 Version: 1.0.3558.13415
CodeBase: file:///C:/Documents%20and%20Settings/Stojan%20Kanjevac/Desktop/ORDINACIJA/bin/ORDINACIJA.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
 
Nemoj da ides na Integrated security nego na SQL server security.

Znaci kreiraj usera na SQL Serveru, recimo prof, sa lozinkom prof, dodeli ga bazi, i onda ti conn string ide ovako:
Data Source=Milan-PC\SQLEXPRESS;Initial Catalog=NazivBaze;Persist Security Info=True;User ID=prof;Password=prof
i iskljuci windows firewall na masini gde ti je sql server i to mora da radi.
 
Poslednja izmena:

Back
Top