A very unhappy System.Diagnostics.Debug.WriteLine
-
Hello All, I have this one asp.net 2.0 project that throws the following error when I attempt to use System.Diagnostics.Debug.WriteLine {"Couldn't create listener 'textWriterTraceListener'."} System.Exception {System.Configuration.ConfigurationErrorsException} It has an interesting inner exception of: InnerException {"Illegal characters in path."} System.Exception {System.ArgumentException} All of the other asp.net 2.0 apps I have run perfectly fine with that statement and previous versions of this application ran fine. Any ideas? Thanks in advance, Ryan
-
Hello All, I have this one asp.net 2.0 project that throws the following error when I attempt to use System.Diagnostics.Debug.WriteLine {"Couldn't create listener 'textWriterTraceListener'."} System.Exception {System.Configuration.ConfigurationErrorsException} It has an interesting inner exception of: InnerException {"Illegal characters in path."} System.Exception {System.ArgumentException} All of the other asp.net 2.0 apps I have run perfectly fine with that statement and previous versions of this application ran fine. Any ideas? Thanks in advance, Ryan
-
I'm not sure exactly what you're looking for, it's simply erroring out when attempting to writeline, but here is the if statement:
if (CertificationPerson_RaceTable.GetRecords("IsActive = 1 And fkPerson = " + oCertPersonRecord.PK).Length == 0)
{
//Errors out here, the objects are fully populated
System.Diagnostics.Debug.WriteLine(oCertPersonRecord.PK + " " + oCertPersonRecord.fkRace);
oPersonRaceRecord = new CertificationPerson_RaceRecord();
oPersonRaceRecord.fkPerson = oCertPersonRecord.PK;
oPersonRaceRecord.fkRace = oCertPersonRecord.fkRace;
oPersonRaceRecord.Save();
}Thanks, Ryan
-
Hello All, I have this one asp.net 2.0 project that throws the following error when I attempt to use System.Diagnostics.Debug.WriteLine {"Couldn't create listener 'textWriterTraceListener'."} System.Exception {System.Configuration.ConfigurationErrorsException} It has an interesting inner exception of: InnerException {"Illegal characters in path."} System.Exception {System.ArgumentException} All of the other asp.net 2.0 apps I have run perfectly fine with that statement and previous versions of this application ran fine. Any ideas? Thanks in advance, Ryan
Check your application settings (web.config). Sounds like it's trying to trace to a file but someone made a typo in the file name or path. As in:
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="InvalidFileNameHere.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>I bolded the place to look for the error.
-
Check your application settings (web.config). Sounds like it's trying to trace to a file but someone made a typo in the file name or path. As in:
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="InvalidFileNameHere.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>I bolded the place to look for the error.
Thanks Peter, That did the trick. I spaced out on that one.... Ryan