473,788 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: URI formats are not supported

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

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.Argument Exception: 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(F ILENAME)
Line 43:
Line 44: 'Now, read the entire file into a string

Source File: c:\inetpub\wwwr oot\MyWeb\Secur ed\MemberNewsle tter.aspx.vb
Line: 42

Stack Trace:
[ArgumentExcepti on: URI formats are not supported.]
System.IO.Path. GetFullPathInte rnal(String path) +270
System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean
bFromProxy) +233
System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize) +44
System.IO.Strea mReader..ctor(S tring path, Encoding encoding, Boolean
detectEncodingF romByteOrderMar ks, Int32 bufferSize) +79
System.IO.Strea mReader..ctor(S tring path) +101
System.IO.File. OpenText(String path) +30
AAPPEX.MemberNe wsletter.Page_L oad(Object sender, EventArgs e) in
c:\inetpub\wwwr oot\AAPPEX\Secu red\MemberNewsl etter.aspx.vb:4 2
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.2032; ASP.NET
Version:1.1.432 2.2032

Any ideas?

Thanks.
Nov 19 '05 #1
1 9884
NM. The path had "file:" in front of it. Dumb me!

"VB Programmer" <xD**********@D ont.com> wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl...
On this line of code:
objStreamReader = File.OpenText(F ILENAME)

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.Argument Exception: 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(F ILENAME)
Line 43:
Line 44: 'Now, read the entire file into a string

Source File: c:\inetpub\wwwr oot\MyWeb\Secur ed\MemberNewsle tter.aspx.vb
Line: 42

Stack Trace:
[ArgumentExcepti on: URI formats are not supported.]
System.IO.Path. GetFullPathInte rnal(String path) +270
System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) +233
System.IO.FileS tream..ctor(Str ing path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize) +44
System.IO.Strea mReader..ctor(S tring path, Encoding encoding, Boolean
detectEncodingF romByteOrderMar ks, Int32 bufferSize) +79
System.IO.Strea mReader..ctor(S tring path) +101
System.IO.File. OpenText(String path) +30
AAPPEX.MemberNe wsletter.Page_L oad(Object sender, EventArgs e) in
c:\inetpub\wwwr oot\AAPPEX\Secu red\MemberNewsl etter.aspx.vb:4 2
System.Web.UI.C ontrol.OnLoad(E ventArgs e)
System.Web.UI.C ontrol.LoadRecu rsive()
System.Web.UI.P age.ProcessRequ estMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.432 2.2032;
ASP.NET Version:1.1.432 2.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
5715
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 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +23 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +4...
4
1432
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 formats. (they should be all of the formats, regardless the regional settings) Regards
0
1051
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 even tried placing my wsdl file in the folder with wsdl.exe and loading it from there. In all cases I get the same error. Any help figuring this out would be much appreciated. Thanks, Doug
1
689
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). //-------------------------------------------------------------------- string m_image_path = "http://www.abc.com/image/1234.jpg"; //sample filename
0
23512
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) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
2
3275
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. Public Shared wkbExcel As SpreadsheetGear.IWorkbook =SpreadsheetGear.Factory.GetWorkbook("http:\\myport.mydomain.com \spreadsheets\span tables.xls")
2
2937
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 on the .NET Framework used (e.g., the Image class defines which formats can be used), or can different file formats be added after-the-fact (end-user capability in contrast to developer implementation)? Also, is it possible to save an image in...
0
970
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
3033
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 with a format() method similar to sprintf(). Several formats (%d, %f, etc) are supported, but %z would be invalid. During the parsing of the format string, the function encounters an invalid format which (most likely) was caused by a programmer...
0
10177
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.