Click here to Skip to main content
15,902,198 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
maxiachun11-Oct-05 18:01
maxiachun11-Oct-05 18:01 
AnswerRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
maxiachun11-Oct-05 18:05
maxiachun11-Oct-05 18:05 
GeneralRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
merlynml11-Oct-05 18:15
merlynml11-Oct-05 18:15 
GeneralRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
Dave Kreskowiak11-Oct-05 18:18
mveDave Kreskowiak11-Oct-05 18:18 
GeneralRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
merlynml11-Oct-05 18:31
merlynml11-Oct-05 18:31 
GeneralRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
Dave Kreskowiak12-Oct-05 1:17
mveDave Kreskowiak12-Oct-05 1:17 
GeneralRe: How to specify the amount of files i need to grab through Directory.GetFiles() Pin
merlynml12-Oct-05 1:26
merlynml12-Oct-05 1:26 
Questionhttp Response Pin
ybasha11-Oct-05 16:34
ybasha11-Oct-05 16:34 
Hi all,

I am runing an application which will check URL in my database there are around 3000 url in my database and i use .net http response and request to check the url the following are the code snippet..

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" ' not working becos have charset =ISO - 8859-1
'url = "http://environmentalchemistry.com/" not working becos have charset = iso - 8859-1
'url = "https://www.iclub.com/investorama.html"

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

my code working fine but the problem is when my code run URL which as charset = iso - 8859-1 or charset = windows - 1252 it just thro exception that The remote server returned an error: (400) Bad Request. or The underlyng connection is close..
can any one tell the reason why,

Thanx for your interest Smile | :)

regards
cyus
Questionrequiredfield validator and rangevalidators don't work on remote server?? Pin
vicky45711-Oct-05 13:20
vicky45711-Oct-05 13:20 
AnswerRe: requiredfield validator and rangevalidators don't work on remote server?? Pin
Dave Kreskowiak11-Oct-05 13:48
mveDave Kreskowiak11-Oct-05 13:48 
GeneralRe: requiredfield validator and rangevalidators don't work on remote server?? Pin
vicky45711-Oct-05 14:01
vicky45711-Oct-05 14:01 
GeneralRe: requiredfield validator and rangevalidators don't work on remote server?? Pin
vicky45711-Oct-05 14:33
vicky45711-Oct-05 14:33 
QuestionPackeging And Deployment Problem Pin
shoaibnawaz11-Oct-05 12:23
shoaibnawaz11-Oct-05 12:23 
AnswerRe: Packeging And Deployment Problem Pin
Dave Kreskowiak11-Oct-05 13:47
mveDave Kreskowiak11-Oct-05 13:47 
QuestionErr Message Pin
No-e11-Oct-05 9:10
No-e11-Oct-05 9:10 
AnswerRe: Err Message Pin
Dave Kreskowiak11-Oct-05 9:18
mveDave Kreskowiak11-Oct-05 9:18 
QuestionExport Crystal into pdf Pin
Laasyalaasya11-Oct-05 8:23
Laasyalaasya11-Oct-05 8:23 
QuestionConverting Text file to Sql Table Pin
u_rocky11-Oct-05 8:03
u_rocky11-Oct-05 8:03 
AnswerRe: Converting Text file to Sql Table Pin
Dave Kreskowiak11-Oct-05 9:15
mveDave Kreskowiak11-Oct-05 9:15 
QuestionClose A Form Without User-Event?? Pin
CamToo11-Oct-05 2:14
CamToo11-Oct-05 2:14 
AnswerRe: Close A Form Without User-Event?? Pin
Richard_Wolf11-Oct-05 5:26
Richard_Wolf11-Oct-05 5:26 
AnswerRe: Close A Form Without User-Event?? Pin
Dave Kreskowiak11-Oct-05 5:49
mveDave Kreskowiak11-Oct-05 5:49 
AnswerRe: Close A Form Without User-Event?? Pin
Guerven12-Oct-05 16:27
Guerven12-Oct-05 16:27 
GeneralRe: Close A Form Without User-Event?? Pin
Anonymous13-Oct-05 20:35
Anonymous13-Oct-05 20:35 
GeneralRe: Close A Form Without User-Event?? Pin
Anonymous13-Oct-05 20:38
Anonymous13-Oct-05 20:38 

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.