Click here to Skip to main content
15,885,953 members
Home / Discussions / C#
   

C#

 
GeneralRe: ListBox datasource is not updated on first click Pin
Jegan Thiyagesan18-Mar-13 3:50
Jegan Thiyagesan18-Mar-13 3:50 
QuestionExporting Gridview with fixed number of rows on each page Pin
AlexRusso16-Mar-13 1:18
AlexRusso16-Mar-13 1:18 
AnswerRe: Exporting Gridview with fixed number of rows on each page Pin
Eddy Vluggen16-Mar-13 12:06
professionalEddy Vluggen16-Mar-13 12:06 
GeneralRe: Exporting Gridview with fixed number of rows on each page Pin
AlexRusso18-Mar-13 0:57
AlexRusso18-Mar-13 0:57 
GeneralRe: Exporting Gridview with fixed number of rows on each page Pin
Eddy Vluggen18-Mar-13 1:29
professionalEddy Vluggen18-Mar-13 1:29 
QuestionFilesystemwatcher causes exception. Pin
leone15-Mar-13 6:32
leone15-Mar-13 6:32 
AnswerRe: Filesystemwatcher causes exception. Pin
Jibesh15-Mar-13 6:53
professionalJibesh15-Mar-13 6:53 
GeneralRe: Filesystemwatcher causes exception. Pin
leone15-Mar-13 11:03
leone15-Mar-13 11:03 
Yes you are right. This is what i found in intellitrace:

Exception:Thrown: "The process cannot access the file 'd:\deneme\OCTOPUSxml-66907571 - Copy.xml' because it is being used by another process." (System.IO.IOException)
A System.IO.IOException was thrown: "The process cannot access the file 'd:\deneme\OCTOPUSxml-66907571 - Copy.xml' because it is being used by another process."
Exception:Thrown: "Exception has been thrown by the target of an invocation." (System.Reflection.TargetInvocationException)
A System.Reflection.TargetInvocationException was thrown: "Exception has been thrown by the target of an invocation."


In created method of filewatcher, i have these codes:

XmlDocument xdc = new XmlDocument();
xdc.Load(e.FullPath);


Somehow, grasping the file by filewatcher and loading by xmldocument occur almost at the same time. To be sure i changed the code as :

XmlDocument xdc = new XmlDocument();
System.Threading.Thread.Sleep(1000);
xdc.Load(e.FullPath);
System.Threading.Thread.Sleep(1000);

I know this is not professional but now it is working Smile | :)
GeneralRe: Filesystemwatcher causes exception. Pin
Jibesh15-Mar-13 11:09
professionalJibesh15-Mar-13 11:09 
GeneralRe: Filesystemwatcher causes exception. Pin
Dave Kreskowiak15-Mar-13 12:44
mveDave Kreskowiak15-Mar-13 12:44 
AnswerRe: Filesystemwatcher causes exception. Pin
Eddy Vluggen15-Mar-13 7:47
professionalEddy Vluggen15-Mar-13 7:47 
QuestionC# file exists on network drive Pin
classy_dog15-Mar-13 2:44
classy_dog15-Mar-13 2:44 
AnswerRe: C# file exists on network drive Pin
s_magus15-Mar-13 3:07
s_magus15-Mar-13 3:07 
GeneralRe: C# file exists on network drive Pin
Richard MacCutchan15-Mar-13 7:19
mveRichard MacCutchan15-Mar-13 7:19 
GeneralRe: C# file exists on network drive Pin
Eddy Vluggen15-Mar-13 7:48
professionalEddy Vluggen15-Mar-13 7:48 
GeneralRe: C# file exists on network drive Pin
Richard MacCutchan15-Mar-13 7:56
mveRichard MacCutchan15-Mar-13 7:56 
GeneralRe: C# file exists on network drive Pin
Eddy Vluggen15-Mar-13 8:07
professionalEddy Vluggen15-Mar-13 8:07 
AnswerRe: C# file exists on network drive Pin
Richard MacCutchan15-Mar-13 7:28
mveRichard MacCutchan15-Mar-13 7:28 
GeneralRe: C# file exists on network drive Pin
classy_dog15-Mar-13 8:28
classy_dog15-Mar-13 8:28 
QuestionIf existing String Form name, get that by database then open Pin
Jayantha Bandara15-Mar-13 0:37
Jayantha Bandara15-Mar-13 0:37 
AnswerRe: If existing String Form name, get that by database then open Pin
Richard MacCutchan15-Mar-13 1:02
mveRichard MacCutchan15-Mar-13 1:02 
AnswerRe: If existing String Form name, get that by database then open Pin
Pete O'Hanlon15-Mar-13 1:12
mvePete O'Hanlon15-Mar-13 1:12 
GeneralRe: If existing String Form name, get that by database then open Pin
V.15-Mar-13 3:44
professionalV.15-Mar-13 3:44 
GeneralRe: If existing String Form name, get that by database then open Pin
Mycroft Holmes15-Mar-13 13:39
professionalMycroft Holmes15-Mar-13 13:39 
QuestionResolving dependent projects Pin
Bernhard Hiller15-Mar-13 0:15
Bernhard Hiller15-Mar-13 0:15 

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.