Advertisement
Advertisement
| 03.29.2005 at 12:31PM PST, ID: 21368850 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 03.29.2005 at 12:56PM PST, ID: 13656443 |
URL's content.
'' </summary>
'' <exception cref="System.Exception">
'' Thrown if the HTTP Request fails, or if the <see cref="System.Net.HttpWebRe
'' has a <see cref="System.Net.HttpWebRe
'' <see cref="System.Net.HttpStatu
'' </exception>
'' <returns>The content from the requested URL's HTTP Response.</returns>
Public Shared Function ExecuteUrl( _
ByVal fullUrl As String, _
Optional ByVal bAllowAutoRedirect As Boolean = True, _
Optional ByVal iTimeout As Integer = System.Threading.Timeout.I
) As String
Dim webRequest As System.Net.HttpWebRequest
Dim webResponse As System.Net.HttpWebResponse
Try
'Create an HttpWebRequest with the specified URL.
webRequest = CType(System.Net.WebReques
webRequest.AllowAutoRedire
'webRequest.MaximumAutomat
webRequest.Timeout = iTimeout
'Send the request and wait for a response.
Try
webResponse = CType(webRequest.GetRespon
Select Case (webResponse.StatusCode)
Case System.Net.HttpStatusCode.
'read the content from the response
Dim responseStream As System.IO.Stream = _
webResponse.GetResponseStr
Dim responseEncoding As System.Text.Encoding = _
System.Text.Encoding.UTF8
' Pipes the response stream to a higher level stream reader with the required encoding format.
Dim responseReader As New StreamReader(responseStrea
Dim responseContent As String = _
responseReader.ReadToEnd()
Return responseContent
Case System.Net.HttpStatusCode.
Throw New System.Exception(String.Fo
"Unable to read response content. URL has moved. StatusCode={0}.", _
webResponse.StatusCode))
Case System.Net.HttpStatusCode.
Throw New System.Exception(String.Fo
"Unable to read response content. URL not found. StatusCode={0}.", _
webResponse.StatusCode))
Case Else
Throw New System.Exception(String.Fo
"Unable to read response content. StatusCode={0}.", _
webResponse.StatusCode))
End Select
Catch we As System.Net.WebException
'If (we.Status = Net.WebExceptionStatus.Tim
' Return False
'End If
Throw New System.Exception( _
"Unable to execute URL.", _
we)
Finally
If (Not IsNothing(webResponse)) Then
webResponse.Close()
End If
End Try
Catch e As System.Exception
Throw New System.Exception( _
"Unable to execute URL.", _
e)
End Try
End Function
| 03.29.2005 at 01:04PM PST, ID: 13656521 |
| 03.30.2005 at 12:01AM PST, ID: 13659769 |