By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

Error: URI formats are not supported

P: n/a
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.
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
NM. The path had "file:" in front of it. Dumb me!

"VB Programmer" <xD**********@Dont.com> wrote in message
news:On**************@tk2msftngp13.phx.gbl...
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.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.