HTML Head Title Access Denied


This article is written by Pon Saravanan  on 03-Dec-10 Last modified on :08-Feb-11





VB.Net Tutorial -WebClient Object

The great helpful thing about developing with .NET is, a lot of objects introduced in .Net framework.One of them is this web client object. Earlier days we need to send the XmlHttp request or Web Request to send the request and receive the response. WebClient not only reduced the effort in downloading text, but also helpful in a lot of areas such as security and form submission etc…

DownloadString

As I said before the download string function makes the life easier. You can simply pass the URL to this function and it will return the response text. If the resource is secured you can send the Network Credentials to authenticate,
Dim webClient As New WebClient()
Dim Downloaded= webClient. DownloadString(URI)

HTML Head Title Access Denied

Now that is the error we are receiving, means that the access is denied while calling the resource. So we need to authenticate. Use the following to authenticate. The Response can be received using DownloadStringAsync(Uri, Object) method Asynchronously as well
webClient.Credentials = New NetworkCredential(username, password)











Comments
  • GUEST
    4/11/2011 9:40:49 AM


Comments
   
Captcha Image
For you specially:  
Captcha Text Enter the text in the image.(Not Case sensitive)