Click here to Skip to main content
15,903,736 members
Home / Discussions / C#
   

C#

 
GeneralRe: adding AddingRows to dataTable Pin
pmarfleet13-Sep-07 3:20
pmarfleet13-Sep-07 3:20 
QuestionGetting the number of listbox items in another form Pin
Lucy13-Sep-07 0:52
Lucy13-Sep-07 0:52 
AnswerRe: Getting the number of listbox items in another form Pin
JoeSharp13-Sep-07 1:13
JoeSharp13-Sep-07 1:13 
Questionstate management Pin
prog-hero13-Sep-07 0:45
prog-hero13-Sep-07 0:45 
AnswerRe: state management Pin
Urs Enzler13-Sep-07 1:18
Urs Enzler13-Sep-07 1:18 
GeneralRe: state management Pin
Urs Enzler13-Sep-07 1:49
Urs Enzler13-Sep-07 1:49 
AnswerRe: state management Pin
Pete O'Hanlon13-Sep-07 1:21
mvePete O'Hanlon13-Sep-07 1:21 
QuestionResolving a mapped drive Pin
benjymous13-Sep-07 0:15
benjymous13-Sep-07 0:15 
AnswerRe: Resolving a mapped drive Pin
Pete O'Hanlon13-Sep-07 1:12
mvePete O'Hanlon13-Sep-07 1:12 
GeneralRe: Resolving a mapped drive Pin
benjymous13-Sep-07 1:37
benjymous13-Sep-07 1:37 
GeneralRe: Resolving a mapped drive Pin
Big Daddy Farang13-Sep-07 11:51
Big Daddy Farang13-Sep-07 11:51 
Questionusing Scrollbar for panning in my Graphics Editor Pin
a_david12313-Sep-07 0:13
a_david12313-Sep-07 0:13 
QuestionWhy The remote server returned an error: (403) Forbidden? [modified] Pin
bug_aonz12-Sep-07 23:57
bug_aonz12-Sep-07 23:57 
AnswerRe: Why The remote server returned an error: (403) Forbidden? Pin
Le centriste13-Sep-07 0:02
Le centriste13-Sep-07 0:02 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
bug_aonz13-Sep-07 0:23
bug_aonz13-Sep-07 0:23 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
Le centriste13-Sep-07 1:14
Le centriste13-Sep-07 1:14 
GeneralRe: Why The remote server returned an error: (403) Forbidden? Pin
bug_aonz13-Sep-07 16:30
bug_aonz13-Sep-07 16:30 
QuestionSearch for a file Pin
P_Elza12-Sep-07 23:51
P_Elza12-Sep-07 23:51 
AnswerRe: Search for a file Pin
Pete O'Hanlon12-Sep-07 23:59
mvePete O'Hanlon12-Sep-07 23:59 
QuestionInserting a formula in excel Pin
lourensG12-Sep-07 23:51
lourensG12-Sep-07 23:51 
AnswerRe: Inserting a formula in excel Pin
Jimmanuel13-Sep-07 3:02
Jimmanuel13-Sep-07 3:02 
GeneralRe: Inserting a formula in excel Pin
lourensG13-Sep-07 3:10
lourensG13-Sep-07 3:10 
QuestionStrange Issue:Window Service Pin
ramdil12-Sep-07 23:48
ramdil12-Sep-07 23:48 
Hi All
I am facing a strange issue and i am working on this issue for last one week,but i am not able to find it.I have a window service which reads the MSMQ .This windows service will do only this function.Now, when some thing is written to MSMQ, window service will read the msmq.Now there is nothing in queue ,then also it will loop and if some thing comes inside the msmq then again it will read ...this works fine if i am doing in regular intervals.
Now if am not doing any operations for two or three hours ,then status of windows service will be started but it will not reading the msmq,and it is not throwing any error..also...this is the strange thing i am facing..why it is behaving like this.Can any one help me in this idea.I am pasting the start section of of mywindows service here .can any one tell me what is wrong in this code.Thanks in advance

this code i am calling inside a thread..

try
{
MessageQueue mq = null;
System.Messaging.Message msg = null;
while(true)
{
//MessageQueue mq = null;
//System.Messaging.Message msg = null;
try
{
if(mq == null)
{
mq = new System.Messaging.MessageQueue (XMLReprocessMSMQPath);
}
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Error, APPLICATIONNAME,"Read Queue", LoggingMessageTargets.Both);
msg = mq.Receive(new TimeSpan(0,0,0,10,0));
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Error, APPLICATIONNAME,"Data Rec", LoggingMessageTargets.Both);
msg.Formatter = new ActiveXMessageFormatter();
XMLReprocessMSMQFileName=ReceiveMessage(msg.Body.ToString());
SendXMLToWebervice(XMLReprocessMSMQFileName);
}
catch (System.Messaging.MessageQueueException ex)
{
if(ex.ErrorCode != -2147467259) // Ignore timeout error
{
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Error, APPLICATIONNAME,ex.ToString(), LoggingMessageTargets.Both);
mq.Close();
mq.Dispose();
mq = null;
MessageQueue.ClearConnectionCache();
Thread.Sleep(10000);
}
else
{
mq = null;
}
}
catch (Exception ex)
{
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Error, APPLICATIONNAME,ex.ToString(), LoggingMessageTargets.Both);
mq.Close();
mq.Dispose();
mq = null;
MessageQueue.ClearConnectionCache();
}
}
}
catch(Exception ex)
{
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Information , APPLICATIONNAME,
"Reprocess MSMQ Catch block :" + DateTime.Now.ToLongTimeString(), LoggingMessageTargets.Both);
}
finally
{
RemoteLoggingManager.LogMessage(LoggingMessageTypes.Information , APPLICATIONNAME,"Finally block executed " +
DateTime.Now.ToLongTimeString(), LoggingMessageTargets.Both);
}



Regards
DilipRam

QuestionRemoting events sometimes failing Pin
Lasse Offt12-Sep-07 23:43
Lasse Offt12-Sep-07 23:43 
AnswerRe: Remoting events sometimes failing Pin
Lasse Offt13-Sep-07 21:19
Lasse Offt13-Sep-07 21:19 

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.