Error: URI formats are not supported

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

On this line of code:
objStreamReader = File.OpenText(FILENAME)

I get this error:
URI formats are not supported.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.ArgumentException: URI formats are not supported.

Source Error:
Line 40: 'Get a StreamReader class that can be used to read the file
Line 41: Dim objStreamReader As StreamReader
Line 42: objStreamReader = File.OpenText(FILENAME)
Line 43:
Line 44: 'Now, read the entire file into a string

Source File: c:\inetpub\wwwroot\MyWeb\Secured\MemberNewsletter.aspx.vb
Line: 42

Stack Trace:
[ArgumentException: URI formats are not supported.]
System.IO.Path.GetFullPathInternal(String path) +270
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) +233
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize) +44
System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean
detectEncodingFromByteOrderMarks, Int32 bufferSize) +79
System.IO.StreamReader..ctor(String path) +101
System.IO.File.OpenText(String path) +30
AAPPEX.MemberNewsletter.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\AAPPEX\Secured\MemberNewsletter.aspx.vb:42
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

Any ideas?

Thanks.
 
Back
Top