I have these two related problems.
First one is that I have a webservice that returns a DataSet that
works the first time I use it, maybe twice, and then after that fails
to work for a few hours, then it works again.
This is the message:
"An unhandled exception of type 'System.Service Model.FaultExce ption`1'
occurred in mscorlib.dll"
This is the OperationContra ct:
[OperationContra ct]
DataSet MRTReport2(stri ng vendor, string month, string year);
Second problem is, I think SvcTraceViewer would help me view the
Traces.svclog file, but I can't find SvcTraceViewer. exe.
I looked in C:\Program Files\Microsoft SDKs\Windows\v6 .0A\bin. It's
not there even after installing Windows Software Development Kit (SDK)
for Windows Server 2008 on my XP development computer.
It would really be nice if anyone can guess at the solution to either
of these problems, especially the first. I know this is not a coding
forum, but I think it might have started happening around the time the
operation started using this private method, but I'm not sure. I'll
do some testing myself to see if I can isolate it:
private int findClosestDate InList(List<rea dingdateList, DateTime
targetDate, ref string meterDate)
{
int closestMeter=-1;
int smallestTimeSpa n = 99999999;
DateTime closestDate = Convert.ToDateT ime("1/1/1900");
int dd;
TimeSpan ts;
foreach (var reading in dateList)
{
ts = reading.reading DateTime - targetDate;
dd = Math.Abs(Conver t.ToInt32(ts.To talHours));
if (dd < smallestTimeSpa n)
{
smallestTimeSpa n = dd;
closestMeter = reading.meterRe ading;
closestDate = reading.reading DateTime;
}
}
meterDate = closestDate.ToS tring();
return closestMeter;
}
First one is that I have a webservice that returns a DataSet that
works the first time I use it, maybe twice, and then after that fails
to work for a few hours, then it works again.
This is the message:
"An unhandled exception of type 'System.Service Model.FaultExce ption`1'
occurred in mscorlib.dll"
This is the OperationContra ct:
[OperationContra ct]
DataSet MRTReport2(stri ng vendor, string month, string year);
Second problem is, I think SvcTraceViewer would help me view the
Traces.svclog file, but I can't find SvcTraceViewer. exe.
I looked in C:\Program Files\Microsoft SDKs\Windows\v6 .0A\bin. It's
not there even after installing Windows Software Development Kit (SDK)
for Windows Server 2008 on my XP development computer.
It would really be nice if anyone can guess at the solution to either
of these problems, especially the first. I know this is not a coding
forum, but I think it might have started happening around the time the
operation started using this private method, but I'm not sure. I'll
do some testing myself to see if I can isolate it:
private int findClosestDate InList(List<rea dingdateList, DateTime
targetDate, ref string meterDate)
{
int closestMeter=-1;
int smallestTimeSpa n = 99999999;
DateTime closestDate = Convert.ToDateT ime("1/1/1900");
int dd;
TimeSpan ts;
foreach (var reading in dateList)
{
ts = reading.reading DateTime - targetDate;
dd = Math.Abs(Conver t.ToInt32(ts.To talHours));
if (dd < smallestTimeSpa n)
{
smallestTimeSpa n = dd;
closestMeter = reading.meterRe ading;
closestDate = reading.reading DateTime;
}
}
meterDate = closestDate.ToS tring();
return closestMeter;
}
Comment