Posted: 9/2/2010
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} span.pbody {mso-style-name:pbody; mso-style-unhide:no;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} -->
I have a C# Windows application written to access tables and stored procedures in SQL Server database using Windows Authentication. When accessing the database through the C# application, the table (ex: MySites) permissions are Select/Insert/Update/Delete and the stored procedure permissions are Execute. I have setup an Application Role in the Database with Execute permission on stored procedures and Select/Update/Delete/Insert permission to applicable tables. My problem is within the application I am using a dataset and now running into permission aspects with the dataset. I don’t think I have gone about this the right way. Can somebody point me in a direction that it doesn’t matter what procedures are being performed in the application, if the user has authority to use the application the user will have the appropriate authority according to the Application Role.
As a side note whatever authorizations I setup, I also need to allow the same user can access the same table another way through Microsoft Access with only Select permissions.
That actually is very similar to an application that was supported in my previous job ( though that one was in VB ). However, the database permissions were set up in a nearly identical fashion to what you describe.
My first thought is double-check the connection string and/or connection being used to populate the dataset to ensure it's not "falling back" on windows authentication. If you're familiar with Profiler, you might want to set it up to monitor connections on a test server. That way you can "see" the application connecting ( or attempting to connect ) from the application when this data set is populated.