Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
GeneralRe: I take exception to the way Visual Studio 2010 handles exceptions Pin
MicroVirus3-Sep-11 18:15
MicroVirus3-Sep-11 18:15 
QuestionTextbox properties Pin
vanikanc1-Sep-11 15:43
vanikanc1-Sep-11 15:43 
AnswerRe: Textbox properties Pin
Dave Kreskowiak1-Sep-11 16:59
mveDave Kreskowiak1-Sep-11 16:59 
QuestionC#.net- two ways to access active directory code Pin
dcof1-Sep-11 12:19
dcof1-Sep-11 12:19 
AnswerRe: C#.net- two ways to access active directory code Pin
Dave Kreskowiak1-Sep-11 16:54
mveDave Kreskowiak1-Sep-11 16:54 
GeneralRe: C#.net- two ways to access active directory code Pin
dcof2-Sep-11 4:38
dcof2-Sep-11 4:38 
GeneralRe: C#.net- two ways to access active directory code Pin
Dave Kreskowiak2-Sep-11 11:16
mveDave Kreskowiak2-Sep-11 11:16 
QuestionC#.net error obtained from sql server Pin
dcof1-Sep-11 6:42
dcof1-Sep-11 6:42 
I am working on a C#.net 2008 desktop application where code has been added to verify if a user has access to various parts of a desktop application based upon the tab they select. The C#.net 2008 desktop, code has been added to verify if a user has access to various parts of the application. The user will only see the parts of the desktop they should have access to or a error message will be displayed right away saying 'you do not have access, contact network administrator'.

There has been code added to sql server 2008 r2 also that checks to see if the user has access based upon the groups they are assigned to in sql server.

Current problem. When the user tries to access the sql server r2 database through the application, a runtime error is displayed shwoing the user does not have access (basically to sql server).

Thus to display a user friendly message and close out of the applicartion, I would likec to know what my options are.

Thus let me know if I can do any of the following:

1. Is there some code the .net desktop can access before the first call to sql server to see if the user has access based upon how sql server accesses the ldap code? If so, can you tell me and/or point me to a reference I can use to include in my code?

2. Is there some code the .net desktop can access before all calsl to sql server to see if the user has access based upon how sql server accesses the ldap code? If so, can you tell me and/or point me to a reference I can use to include in my code?

3. If there is no .net code to check prior to the call, what kind of logic can I put in a try catch block to capture the error? What kind of an error would I be getting that I need to check for? What is the exception type, error code, error code number, and/or error message that I should be checking for? Would you display come sample code and/or point me to a url that I can use as a reference?

AnswerRe: C#.net error obtained from sql server Pin
Dave Kreskowiak1-Sep-11 7:47
mveDave Kreskowiak1-Sep-11 7:47 
GeneralMessage Removed Pin
1-Sep-11 8:52
dcof1-Sep-11 8:52 
GeneralRe: C#.net error obtained from sql server Pin
#realJSOP1-Sep-11 9:28
professional#realJSOP1-Sep-11 9:28 
AnswerRe: C#.net error obtained from sql server Pin
Luc Pattyn1-Sep-11 7:54
sitebuilderLuc Pattyn1-Sep-11 7:54 
GeneralRe: C#.net error obtained from sql server Pin
dcof1-Sep-11 8:52
dcof1-Sep-11 8:52 
AnswerRe: C#.net error obtained from sql server Pin
#realJSOP1-Sep-11 8:28
professional#realJSOP1-Sep-11 8:28 
Questionretrive data from GridView Pin
jashimu1-Sep-11 5:27
jashimu1-Sep-11 5:27 
AnswerRe: retrive data from GridView Pin
Abhinav S1-Sep-11 6:01
Abhinav S1-Sep-11 6:01 
Questionemail sender program : Unable to connect to the remote server Pin
bigz_100031-Aug-11 23:57
bigz_100031-Aug-11 23:57 
AnswerRe: email sender program : Unable to connect to the remote server Pin
Qendro1-Sep-11 1:29
Qendro1-Sep-11 1:29 
GeneralRe: email sender program : Unable to connect to the remote server Pin
bigz_10001-Sep-11 3:02
bigz_10001-Sep-11 3:02 
AnswerRe: email sender program : Unable to connect to the remote server Pin
Dave Kreskowiak1-Sep-11 3:56
mveDave Kreskowiak1-Sep-11 3:56 
GeneralRe: email sender program : Unable to connect to the remote server Pin
bigz_10001-Sep-11 5:24
bigz_10001-Sep-11 5:24 
QuestionWhat is an Integer Pin
Anubhava Dimri31-Aug-11 18:50
Anubhava Dimri31-Aug-11 18:50 
AnswerRe: What is an Integer Pin
Abhinav S31-Aug-11 19:12
Abhinav S31-Aug-11 19:12 
GeneralRe: What is an Integer Pin
Anubhava Dimri31-Aug-11 20:10
Anubhava Dimri31-Aug-11 20:10 
GeneralRe: What is an Integer PinPopular
Roger Wright31-Aug-11 21:04
professionalRoger Wright31-Aug-11 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.