473,385 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error: URI formats are not supported

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
1 9840
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg R | last post by:
mydataset.WriteXml(strPath + "/my.xml"); produces this error [ArgumentException: URI formats are not supported. System.IO.Path.GetFullPathInternal(String path) +27...
4
by: Sam | last post by:
Hi, I've already asked a kind of question like that, but it's a bit different this time. How can I get all of the supported numeric formats by Windows? I want to fill a combobox with those...
0
by: thefinitemonkey | last post by:
When using wsdl.exe to try and create a framework class, I get an error "Error: URI formats are not supported" I've tried specifying the location to load the file as both local and URL paths. I...
1
by: msnews | last post by:
Hi All, Requirement To get an image from web server A, resize the image and then save it at our web server B (our server). ...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
2
by: Mel | last post by:
I am getting this error when I try to declare an object as an Excel workbook. Can anyone tell me how to fix it? I have placed the Excel file on the server in the "spreadsheets" directory. ...
2
by: Peter Oliphant | last post by:
The Image class allows loading a bitmap from a graphic file. So far I've gotten it to work with JPG and BMP files. What other graphic file formats are supported in this way? Is this fixed based...
0
by: Sameera | last post by:
Hi, Could any one help me out on how to retriveing the supported formats for the installed Word version in C#. Thanks
5
by: Conrad Lender | last post by:
I'd like to hear your opinions about the appropriate way to deal with non-critical errors that can occur in user-defined functions. For example, an application chooses to extend String.prototype...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.