AdBlock Detected

We provide high-quality source code for free. Please consider disabling your AdBlocker to support our work.

Buy me a Coffee

Saved Tutorials

No saved posts yet.

Press Enter to see all results

HTML Head Title Access Denied

By pushpam abhishek
Listen to this article

HTML Head Title Access Denied

HTML Head Title Access Denied

WebClient Object


The great helpful thing about developing with .NET is a lot of objects introduced in the .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 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)

Share this post

pushpam abhishek

About pushpam abhishek

Pushpam Abhishek is a Software & web developer and designer who specializes in back-end as well as front-end development. If you'd like to connect with him, follow him on Twitter as @pushpambhshk

Comments