|
-
Oct 8th, 2009, 06:58 PM
#1
Thread Starter
Lively Member
[RESOLVED] Devastating SQL permissions issue
I'm sorry, I'm way out of my element here. I coded a database on my work PC, got all the permissions I needed to access sql servers, and now that I've moved it to an external server, I can't connect with anything.. the sql server has integrated security, which I'm reading up on, but it recognizes the windows username, which I thought yielded me all the permissions I needed.
[Error]
System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=############' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
[/Error]
The red is masking the actual numbers, I felt like releasing that could possibly compromise security. What do I need to do?
-
Oct 8th, 2009, 07:35 PM
#2
Re: Devastating SQL permissions issue
It looks like it's the app that doesn't have the required permissions, not the user. What exactly is this application? It looks like it maybe only has partial trust. How exactly is it trying to connect to the database?
-
Oct 8th, 2009, 07:42 PM
#3
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
Thanks for responding. The application was created in VB.NET 2005, and is accessing the SQL Server via stored procedures mainly, with 2 or 3 dynamic queries tops. I'm not very clear on it (I'll find out tomorrow), but the only permissions I know about are granted to the Windows usernames...
-
Oct 8th, 2009, 07:43 PM
#4
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
Though I am the first to use stored procedures at all on the server...
-
Oct 8th, 2009, 08:24 PM
#5
Re: Devastating SQL permissions issue
I mean what type of application is it and how was it deployed, and what's the connection string to the database?
-
Oct 8th, 2009, 08:30 PM
#6
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
its a windows forms app--for database entry and edits. I'll have to provide the full string tomorrow, but I know it ends Integrated Security = true
-
Oct 9th, 2009, 02:36 AM
#7
Re: Devastating SQL permissions issue
Hi,
my 2p worth and prolly crap. When messing with the free version of Sql server at home I couldn't get permissions to the main folder, however when I moved the sql database file to another folder where I did have permissions; it all worked fine.
Maybe its the same here. Your external server is set up but your username doesn't have the right permissions to that folder. So Sql server won't let you in. Is there another folder on the external server you can temporarily place it and see whether it works?
Just a thought, might be a waste of time tho
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Oct 9th, 2009, 09:04 AM
#8
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
the string is "Data Source=IRNTS4SQL;Initial Catalog=Materials;Integrated Security=True". I found out that all the other people who wrote dbs for the server used the .net framework configuration tool....Should I go back and use that? Tried the folder thing, no dice.
-
Oct 9th, 2009, 10:32 AM
#9
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
I got the exception text:
************** Exception Text **************
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.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.SqlClient.SqlConnection.PermissionDemand()
at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at FPAD_Process.View_Priorities.Refresh()
at FPAD_Process.View_Priorities.View_Priorities_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Data.SqlClient.SqlClientPermission
The Zone of the assembly that failed was:
Intranet
-
Oct 9th, 2009, 10:59 PM
#10
Thread Starter
Lively Member
Re: Devastating SQL permissions issue
Discovered the issue...I'll state it here because anyone working in a corporate environment might come across the same issue. I received that error because I did not have .net 3.5 installed (says my friend in I.T.) Later, I discovered that the default permissions on my stored procs were limited to my username, so I'm working on that too. Thanks for your help!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|