Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am having a litle problem with searching on an other machine. I made an search engine form my movies, it search if the file exists on my machine. But I also want to have my friends have a look at my movies so that means they must can see if the file is on my machine. I am running an IIS webserver. Searching localy is no problem but when i want to search from an other location it doesn't work. Does enybody has a klew how to do this? I Searched the holl web form some usefull information, but until now i still didn't find enything!!

 

Dim File As System.IO.File 
Dim Search As String 
Dim Search2 As String 
Search = Me.TextBox8.Text 
Search2 = ("C:Movie\" + Search + ".txt") 
'Search2 = ("http://213.93.123.204:80/" + Search + ".txt") 
'Search2 = CStr(Search2) 
If File.Exists("C:Movie\" + Search + ".txt") Then 
'If File.Exists("http://213.93.123.204:80/" + Search + ".txt") Then 
Dim stream_reader As New IO.StreamReader(Search2) 
Me.RichTextBox1.Text = "" 
'MessageBox.Show("File found.") 
Me.RichTextBox1.Text = stream_reader.ReadToEnd() 
Me.RichTextBox1.Select(0, 0) 
stream_reader.Close() 
Else 
Me.RichTextBox1.Text = "Movie not found" 
'MessageBox.Show("File not found.") 
End If 

Guest mutant
Posted
What errors are you getting? It could be something with access premissions to your computer, you might have to configure IIS.
  • Leaders
Posted
If you're talking about the commented out lines, then it's likely because you're trying to pass a url to the Exists method that is expecting a path. I *think* you'd need to use WebRequest if it's a url and File.Exists if it's a local or network path.
--tim

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...