Click here to Skip to main content
15,916,527 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Application container Pin
matsnas10-Oct-05 18:02
matsnas10-Oct-05 18:02 
AnswerRe: Application container Pin
vertig073011-Oct-05 8:50
vertig073011-Oct-05 8:50 
Generallogical difference Pin
himanshu_softin9-Oct-05 22:47
himanshu_softin9-Oct-05 22:47 
GeneralRe: logical difference Pin
jo0ls10-Oct-05 10:37
jo0ls10-Oct-05 10:37 
GeneralRe: logical difference Pin
dave@ennead11-Oct-05 20:34
dave@ennead11-Oct-05 20:34 
GeneralRe: logical difference Pin
Steve Pullan10-Oct-05 13:57
Steve Pullan10-Oct-05 13:57 
GeneralRe: logical difference Pin
Dave Kreskowiak11-Oct-05 7:18
mveDave Kreskowiak11-Oct-05 7:18 
Questionhttp Request and Response Pin
ybasha9-Oct-05 16:00
ybasha9-Oct-05 16:00 
Hi all,

i am running a funciton which will check whether the url which is pass thro this function is working or not it working fine with all url except some url, for example'http://www.getforme.com/e404.htm' it working fine when i open this url in my IE, but when i run thro my application it return me ERROOR (The remote server returned an error (404) not found. this is my code snippets

Public Function checkurl(ByVal url As String) As String
Dim req As System.Net.HttpWebRequest
Dim res As System.Net.HttpWebResponse
Dim r As System.IO.StreamReader
Dim ex As Exception 'error exeption holder
Dim pge As String 'page holder
Dim title As String
Dim strreturnstring As String
url = "http://www.getforme.com/e404.htm"
(or)
url = "http://environmentalchemistry.com"
Try
'display request url
req = req.Create(url)

req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"
req.AllowAutoRedirect = True
'get page
res = req.GetResponse()
r = New System.IO.StreamReader(res.GetResponseStream())
'pge = r.ReadToEnd
r.Close()
res.Close()

strError = "OK"
status = "True"


'Convention is First Value is the Status and Second value is Errmsg
strreturnstring = status & "~" & strError
Return strreturnstring

Catch ex
status = "False"
strError = ex.Message
strreturnstring = status & "~" & strError
Return strreturnstring

End Try

End Function

The above two url is working fine in ie but when i try to run thro my application thro error
Any suggestion


regards
cyus

-- modified at 2:38 Monday 10th October, 2005
AnswerRe: http Request and Response Pin
Anonymous9-Oct-05 16:34
Anonymous9-Oct-05 16:34 
GeneralRe: http Request and Response Pin
ybasha9-Oct-05 17:09
ybasha9-Oct-05 17:09 
Questionwin32.Registry Pin
militiaware9-Oct-05 14:52
militiaware9-Oct-05 14:52 
AnswerRe: win32.Registry Pin
Christian Graus9-Oct-05 16:05
protectorChristian Graus9-Oct-05 16:05 
AnswerRe: win32.Registry Pin
Anonymous9-Oct-05 16:06
Anonymous9-Oct-05 16:06 
QuestionTextbox KeyDown Overrides Pin
medicenpringles9-Oct-05 11:19
medicenpringles9-Oct-05 11:19 
AnswerRe: Textbox KeyDown Overrides Pin
Anonymous9-Oct-05 16:02
Anonymous9-Oct-05 16:02 
GeneralRe: Textbox KeyDown Overrides Pin
medicenpringles9-Oct-05 16:17
medicenpringles9-Oct-05 16:17 
GeneralRe: Textbox KeyDown Overrides Pin
Anonymous9-Oct-05 17:01
Anonymous9-Oct-05 17:01 
GeneralRe: Textbox KeyDown Overrides Pin
medicenpringles10-Oct-05 5:51
medicenpringles10-Oct-05 5:51 
Questionproblem on making an exe Pin
saood swar9-Oct-05 11:18
saood swar9-Oct-05 11:18 
AnswerRe: problem on making an exe Pin
Steve Pullan9-Oct-05 14:08
Steve Pullan9-Oct-05 14:08 
QuestionVb.Net Smooth Progress Bar Pin
sumod_madhavan9-Oct-05 9:50
sumod_madhavan9-Oct-05 9:50 
AnswerRe: Vb.Net Smooth Progress Bar Pin
Dave Kreskowiak9-Oct-05 14:37
mveDave Kreskowiak9-Oct-05 14:37 
QuestionEasy bone headed questions: How to read usenet programatically? Pin
TunaSandwich9-Oct-05 8:11
TunaSandwich9-Oct-05 8:11 
AnswerRe: Easy bone headed questions: How to read usenet programatically? Pin
TunaSandwich9-Oct-05 9:05
TunaSandwich9-Oct-05 9:05 
Questionreplacing memory values Pin
nocopro9-Oct-05 3:18
nocopro9-Oct-05 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.