473,404 Members | 2,179 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,404 software developers and data experts.

Reading A Text File From A Remote Server

I posted this message last week but seem to be missing a few days posts.

We currently run our web site in php and are now converting it to asp.net to
match the rest of our business that is .net based. I have tried using the
following code layout to open the file I require but get an illigal
character exception when I try and open the file.

Dim sFileName As String =
"https://www.breathecall.com/wholesale/api/api.php?partnerid=9aa999aa99999999aa99aaaa99a9a9aa &wid=99990&action=0&account=99999"
Dim oFileStream As New IO.FileStream(sFileName, IO.FileMode.Open)
Dim oDataFile As New IO.StreamReader(oFileStream)

The file name works fine when in php. Are there specific characters that
cannot be used in a path name within the dotnet framework? If so is there a
way to get round the problem?

Thanks in advance
Nov 19 '05 #1
1 3285
Hi Trevor,

Yes, I did have found your former thread in the newsgroup and replied in
that one, since you've missed that one, here is the google link of it:

http://groups-beta.google.com/group/...amework.aspnet
/browse_thread/thread/d74c2dbfc1b1a126/d2dc11ef1d402fd0?q=%22Reading+A+Text+
File+From+A+Remote+Server%22&rnum=2&hl=en#d2dc11ef 1d402fd0

Also, for your convenience, I've repasted my former response here, if there
are still anything unclear or need help, please feel free to post here.

=========================
Welcome to ASPNET newsgroup.
As for the Reading text file from remote server problem you mentiond, here
are some of my understanding and suggestinos:
The System.IO namespace's classes are target for local file storage for
remote fileshared (UNC) in the same intranet. For internet based
scenario(such as http url path), we should use the classes under System.Net
namespace to retrieve them. The System.Net.HttpWebRequest and
System.Web.WebClient classes are two useful one. And the WebClient is
especically useful and simplified, we can use it's DownloadData,
DownLoadFile to retreive file/stream from remote webserver. Here are some
tech articles and resources describing using webclient or webrequest:
#WebClient Class #HttpWebRequest Class
http://msdn.microsoft.com/libr-ary/e...syst-emnetwebc...
http://msdn.microsoft.com/libr-ary/e...Syst-emNetHttp...
#Using WebRequest and WebResponse classes
http://www.c-sharpcorner.com/I-ntern...sponseMDB-.asp
Hope helps. Thanks,
Steven Cheng
Microsoft Online Support
===========================================

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JoelWhitehouse | last post by:
Hi! I want to write a script that will read a .php file on a remote server and print to the current page a portion of the text contained in the remote file. I am just wondering what the best...
1
by: Paul Fi | last post by:
I have this problem with .NET remoting: my remote class is called RemoteHandler which implements an interface called IEazyRemoting which has only one method to be implemented which is my server...
1
by: Trevor | last post by:
We currently run our web site in php and are now converting it to asp.net to match the rest of our business that is .net based. I have tried using the following code layout to open the file I...
2
by: Adrian | last post by:
Hi I have some local pages (on PC harddisk) that act as a user interface and a set of JS files that controls it all. I now want to be able to access a remote web server to read a txt file and use...
9
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
4
by: News | last post by:
Hi Everyone, The attached code creates client connections to websphere queue managers and then processes an inquiry against them. The program functions when it gets options from the command...
29
by: Jerim79 | last post by:
I did try to find the answer to this before posting, so this isn't a knee jerk reaction. What I am trying to accomplish is to have a script that opens a cookie, reads a value, and then use a...
13
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
6
by: Jason | last post by:
I would like to build a windows app or service that would read a .txt file and than put the contents of that file in an email and send off the email. WOuld that be very difficult?...how could this...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
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,...
0
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...

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.