Question system.data.sqlclient.sqlexception user does not have permission to perform this acti

sajishkt

New member
Joined
Jul 20, 2014
Messages
1
Programming Experience
3-5
i had made a project in vb.net 10 with sql express 2008 r2 . while working on single system is fine. but connecting net work users ging error([SqlException (0x80131904): User does not have permission to perform this action. System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
my connection string is
data Source=SXX\SQLEXPRESS;initial catalog=D:\pAAAA\data\aaaaaa.mdf;Integrated Security=SSPI;Connect Timeout=30;MultipleActiveResultSets=True;User Instance=True
and tcp enabled and new port add to firewall 1433. error massage follows. why this errror ?
er.JPG

regards
sajish
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,723
Location
Sydney, Australia
Programming Experience
10+
Your connection string is not right. You use Initial Catalog to specify the name of a database. If you want to attach an MDF file then you use AttachDbFilename and the SQL Server Express instance must be on the same machine as the file and, if I'm not mistaken, as the application. If you're going to use integrated security then the current user must have a corresponding login on that SQL Server instance.
 
Top Bottom