0

I'm write a windows application with c#,and in part of my code use this line:

 Microsoft.SqlServer.Management.Smo.Server server = new Microsoft.SqlServer.Management.Smo.Server(new Microsoft.SqlServer.Management.Common.ServerConnection(conn));


and add it this reference to my project:

-Microsoft.SqlServer.Smo   RunTimeVersion:v2.0.50727  and Version:11.0.0.0 <br/>

-Microsoft.SqlServer.ConnectionInfo   RunTimeVersion:v2.0.50727 and Version:12.0.0.0 <br/>

-Microsoft.SqlServer.Management.Sdk.Sfc RunTimeVersion:v2.0.50727 and Version:12.0.0.0 <br/>

up reference in my client PC install sql server 2014 run very good and work,but when i want run this program on the my server i get this error:
enter image description here


On server ,sql server version is:2012
What happen?thanks.


error detail:
enter image description here

behzad razzaqi
  • 1,503
  • 2
  • 18
  • 33
  • Check Event Wiever and You will see some more detailed info about Exception – MajkeloDev Jul 26 '15 at 11:35
  • @MajkeloDev How can i check that? – behzad razzaqi Jul 26 '15 at 11:59
  • A client has very little access to the file system on the server. Either you have to run an executable on the server which allows the client access or store the file on the client filesystem. If you are connecting to the SQL database then use the IP address or SQL server name in the connection string instead of connecting to the mdb file. – jdweng Jul 26 '15 at 12:07
  • @jdweng My connection string is this: string sqlConnectionString = "Data Source=TAZMIN-SERVER;Initial Catalog=RAREPORT;User ID=RACaseSystem;Password=RA@Case#123" – behzad razzaqi Jul 26 '15 at 12:13
  • @behzadrazzaqi press win + r and type "eventvwr", expand Windows/Application and You will see all the exception sorted by date descending. – MajkeloDev Jul 26 '15 at 12:58
  • Find the one which point to Your app and past Exception Message here – MajkeloDev Jul 26 '15 at 12:58
  • Connection string good. You need to make the .exe run with a group account credential that allows the client to execute. See following posting : http://stackoverflow.com/questions/31213894/exe-processes-are-not-running-from-a-c-sharp-application-when-called#comment50590312_31213894 – jdweng Jul 26 '15 at 13:35

0 Answers0