Server Error in '/' Application.

The remote server returned an error: (403) Forbidden.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.

Source Error:


Line 22:         tblNew news= objDB.getById(id);
Line 23:         WebClient client = new WebClient();
Line 24:         bytes = client.DownloadData("http://kientrucdandung.vn/pdf/" + news.TitleEL);
Line 25:         context.Response.Buffer = true;
Line 26:         context.Response.Charset = "";

Source File: c:\inetpub\vhosts\kientrucdandung.vn\httpdocs\FileCS.ashx    Line: 24

Stack Trace:


[WebException: The remote server returned an error: (403) Forbidden.]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +298
   System.Net.WebClient.DownloadData(Uri address) +106
   System.Net.WebClient.DownloadData(String address) +32
   FileCS.ProcessRequest(HttpContext context) in c:\inetpub\vhosts\kientrucdandung.vn\httpdocs\FileCS.ashx:24
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0