Click here to Skip to main content
15,886,806 members
Home / Discussions / C#
   

C#

 
QuestionCanny edge detection in c# Pin
neha198711-Dec-12 22:11
neha198711-Dec-12 22:11 
AnswerRe: Canny edge detection in c# Pin
Simon_Whale11-Dec-12 22:23
Simon_Whale11-Dec-12 22:23 
AnswerRe: Canny edge detection in c# Pin
Pete O'Hanlon11-Dec-12 22:34
mvePete O'Hanlon11-Dec-12 22:34 
QuestionWCF Services in a multi threaded application results in Oracle Connection request Timed out error Pin
rajaron11-Dec-12 21:56
rajaron11-Dec-12 21:56 
AnswerRe: WCF Services in a multi threaded application results in Oracle Connection request Timed out error Pin
Eddy Vluggen12-Dec-12 3:05
professionalEddy Vluggen12-Dec-12 3:05 
GeneralRunning code as different user Pin
MacUseless11-Dec-12 21:35
MacUseless11-Dec-12 21:35 
SuggestionRe: Running code as different user Pin
Richard Deeming12-Dec-12 1:51
mveRichard Deeming12-Dec-12 1:51 
AnswerRe: Running code as different user Pin
Eddy Vluggen12-Dec-12 3:31
professionalEddy Vluggen12-Dec-12 3:31 
From your code that's posted with the question on the article;
C#
string profile = dirEntr.Properties["profilePath"][0].ToString(); //terug komende nullreference, 
                                                                  // lokaal geen probleem op server wel
dirEntr.Close();// this part returns catastrophic failure

If the first line throws an exception, it'd be logical for the second line to fail. The first line contains multiple statements, which I'd prefer to see split over several lines (to accommodate debugging), like this;
C#
object profilePath = dirEntr.Properties["profilePath"];
string profile = Convert.ToString(profilePath[0]); // geen nullreference meer
                                                   // al kan de string nog steeds leeg zijn.

It might be that the property "ProfilePath" doesn't return a value; you'd put a breakpoint there and step through it. As a sidenote, you did see the warning in the article?
Please note: The user context that initiates the impersonation (i.e. not the user context to which it is switched to) needs to have the "Act as part of operating system" privilege set.

Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

QuestionHTML TO XML Convertion using C# Pin
chittu dinesh11-Dec-12 20:29
chittu dinesh11-Dec-12 20:29 
AnswerRe: HTML TO XML Convertion using C# Pin
Pete O'Hanlon11-Dec-12 20:41
mvePete O'Hanlon11-Dec-12 20:41 
GeneralRe: HTML TO XML Convertion using C# Pin
chittu dinesh11-Dec-12 22:41
chittu dinesh11-Dec-12 22:41 
AnswerRe: HTML TO XML Convertion using C# Pin
BobJanova12-Dec-12 4:25
BobJanova12-Dec-12 4:25 
QuestionFor Developinf Login Application for windows Pin
Member 913168411-Dec-12 20:02
Member 913168411-Dec-12 20:02 
AnswerRe: For Developinf Login Application for windows Pin
Pete O'Hanlon11-Dec-12 20:54
mvePete O'Hanlon11-Dec-12 20:54 
AnswerRe: For Developinf Login Application for windows Pin
Richard Deeming12-Dec-12 1:48
mveRichard Deeming12-Dec-12 1:48 
Questionstoring image in isolated storage Pin
singh123456711-Dec-12 18:39
singh123456711-Dec-12 18:39 
QuestionHow to print an SSRS Report in PDF Format from my asp.net page Pin
Vinay Meka11-Dec-12 18:04
Vinay Meka11-Dec-12 18:04 
AnswerRe: How to print an SSRS Report in PDF Format from my asp.net page Pin
Richard Deeming12-Dec-12 1:42
mveRichard Deeming12-Dec-12 1:42 
Questionadd labels to an image at different zoom levels Pin
vr99999999911-Dec-12 18:03
vr99999999911-Dec-12 18:03 
AnswerRe: add labels to an image at different zoom levels Pin
Pete O'Hanlon11-Dec-12 20:17
mvePete O'Hanlon11-Dec-12 20:17 
GeneralRe: add labels to an image at different zoom levels Pin
vr99999999911-Dec-12 20:28
vr99999999911-Dec-12 20:28 
GeneralRe: add labels to an image at different zoom levels Pin
Pete O'Hanlon11-Dec-12 20:34
mvePete O'Hanlon11-Dec-12 20:34 
GeneralRe: add labels to an image at different zoom levels Pin
vr99999999911-Dec-12 20:41
vr99999999911-Dec-12 20:41 
Questionhello friend :) Pin
youshy11-Dec-12 7:38
youshy11-Dec-12 7:38 
AnswerRe: hello friend :) Pin
fjdiewornncalwe11-Dec-12 8:03
professionalfjdiewornncalwe11-Dec-12 8:03 

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.