trying to get file.Open(file) on remote machine

nakins

New member
Joined
Aug 21, 2008
Messages
4
Programming Experience
1-3
The title is kind of lame. What I'm doing is that I had been developing on the production server (don't ask), and now I've moved development to my workstation. I have a bit of code in an aspx the opens a pre-formatted html and puts it into a label. The code is as follows.

Dim FILENAME As String = "D:\Inetpub\wwwroot\articles\news.htm"
Dim objStreamReader As StreamReader
objStreamReader = File.OpenText(FILENAME)
articles.Text = objStreamReader.ReadToEnd()
objStreamReader.Close()

This worked fine and the aspx on the production server works fine. But, when trying to open this page in Visual Web Developer on my workstation, it throws an error about the path/file, which it is look for on my workstation, which it isn't.

I'm at a loss as to how to change this so the page will work on either my work station or the production server. Is there some way of doing productionserver\D:\Inetpub\wwwroot\articles\news.htm? I would like it to pull the news.htm off the production server while displying it in my visual Web developer on my work station. I don't know if it is possible though.

Thanks.
 
Back
Top