(edited to add): this is in Visual Basic .net
I am at a complete loss...
I've been building a program on my machine, running it out of the developer with the f5 key and builidng it and running it off of my machine every once in a while. It works perfectly.
I built it and sent it to my co worker's machine to test it out and it returns an "Illegal characters in path" error when the line:
tries to run...
I am at a complete loss. What 'path' is it referring to? The path of my text file? The textfilename seems completely valid, no spaces or weird punctuation.
I kicked out a msgbox just before the line and the streamreader is trying to open
a txt file; "c:\cjrtest\bin \LineLogTemplat e.ini", which is what it should be calling
Any help would be appreciated.
the detailed error is:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Argument Exception: Illegal characters in path.
at System.IO.Path. CheckInvalidPat hChars(String path)
at System.IO.Path. GetFileName(Str ing path)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.Strea mReader..ctor(S tring path, Encoding encoding, Boolean detectEncodingF romByteOrderMar ks, Int32 bufferSize)
at System.IO.Strea mReader..ctor(S tring path)
at TimeTable.Codes .openIniFileArr ay(String filenameOpen) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Codes.vb:li ne 63
at TimeTable.Codes .initialize(Str ing iniFilename) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Codes.vb:li ne 30
at TimeTable.Form1 .onOpen() in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Form1.vb:li ne 1115
at TimeTable.Form1 .menuNewFile_Cl ick(Object sender, EventArgs e) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Form1.vb:li ne 1034
at System.Windows. Forms.MenuItem. OnClick(EventAr gs e)
at System.Windows. Forms.MenuItem. MenuItemData.Ex ecute()
at System.Windows. Forms.Command.I nvoke()
at System.Windows. Forms.Command.D ispatchID(Int32 id)
at System.Windows. Forms.Control.W mCommand(Messag e& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TimeTable
Assembly Version: 1.0.3006.27339
Win32 Version: 1.0.3006.27339
CodeBase: file:///C:/cjrTest/bin/TimeTable.exe
----------------------------------------
System.Windows. Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows. Forms/2.0.0.0__b77a5c 561934e089/System.Windows. Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c 561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f 7f11d50a3a/System.Drawing. dll
----------------------------------------
Microsoft.Visua lBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/Microsoft.Visua lBasic/8.0.0.0__b03f5f 7f11d50a3a/Microsoft.Visua lBasic.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Data/2.0.0.0__b77a5c 561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c 561934e089/System.Xml.dll
----------------------------------------
System.Configur ation
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Configur ation/2.0.0.0__b03f5f 7f11d50a3a/System.Configur ation.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config ) must have the
jitDebugging value set in the system.windows. forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I am at a complete loss...
I've been building a program on my machine, running it out of the developer with the f5 key and builidng it and running it off of my machine every once in a while. It works perfectly.
I built it and sent it to my co worker's machine to test it out and it returns an "Illegal characters in path" error when the line:
Code:
Dim objReaderOpen1 As New System.IO.StreamReader(filenameOpen)
I am at a complete loss. What 'path' is it referring to? The path of my text file? The textfilename seems completely valid, no spaces or weird punctuation.
I kicked out a msgbox just before the line and the streamreader is trying to open
a txt file; "c:\cjrtest\bin \LineLogTemplat e.ini", which is what it should be calling
Any help would be appreciated.
the detailed error is:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Argument Exception: Illegal characters in path.
at System.IO.Path. CheckInvalidPat hChars(String path)
at System.IO.Path. GetFileName(Str ing path)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.Strea mReader..ctor(S tring path, Encoding encoding, Boolean detectEncodingF romByteOrderMar ks, Int32 bufferSize)
at System.IO.Strea mReader..ctor(S tring path)
at TimeTable.Codes .openIniFileArr ay(String filenameOpen) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Codes.vb:li ne 63
at TimeTable.Codes .initialize(Str ing iniFilename) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Codes.vb:li ne 30
at TimeTable.Form1 .onOpen() in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Form1.vb:li ne 1115
at TimeTable.Form1 .menuNewFile_Cl ick(Object sender, EventArgs e) in C:\Documents and Settings\crusso niello\My Documents\Visua l Studio Projects\TimeTa ble\Form1.vb:li ne 1034
at System.Windows. Forms.MenuItem. OnClick(EventAr gs e)
at System.Windows. Forms.MenuItem. MenuItemData.Ex ecute()
at System.Windows. Forms.Command.I nvoke()
at System.Windows. Forms.Command.D ispatchID(Int32 id)
at System.Windows. Forms.Control.W mCommand(Messag e& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at System.Windows. Forms.Container Control.WndProc (Message& m)
at System.Windows. Forms.Form.WndP roc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TimeTable
Assembly Version: 1.0.3006.27339
Win32 Version: 1.0.3006.27339
CodeBase: file:///C:/cjrTest/bin/TimeTable.exe
----------------------------------------
System.Windows. Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows. Forms/2.0.0.0__b77a5c 561934e089/System.Windows. Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c 561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f 7f11d50a3a/System.Drawing. dll
----------------------------------------
Microsoft.Visua lBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/Microsoft.Visua lBasic/8.0.0.0__b03f5f 7f11d50a3a/Microsoft.Visua lBasic.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Data/2.0.0.0__b77a5c 561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c 561934e089/System.Xml.dll
----------------------------------------
System.Configur ation
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Configur ation/2.0.0.0__b03f5f 7f11d50a3a/System.Configur ation.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config ) must have the
jitDebugging value set in the system.windows. forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Comment