question

NicolasArgyrou-0319 avatar image
0 Votes"
NicolasArgyrou-0319 asked ChaoDeng-MSFT commented

After migration of my website to new server i get an error when trying to send email.Please help

Server Error in '/claimform' Application.
The remote server returned an error: (401) Unauthorized.
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: (401) Unauthorized.

Source Error:


Line 134: Dim PageHTMLBytes() As Byte
Line 135:
Line 136: PageHTMLBytes = MyWebClient.DownloadData(Request.Url.ToString())
Line 137:
Line 138: ' Convert result from byte array to string

Source File: C:\inetpub\WebApplication22\Details2.aspx.vb Line: 136

Stack Trace:


[WebException: The remote server returned an error: (401) Unauthorized.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +287
System.Net.WebClient.DownloadData(Uri address) +106
System.Net.WebClient.DownloadData(String address) +29
Details2.ButtonEmail_Click(Object sender, EventArgs e) in C:\inetpub\WebApplication22\Details2.aspx.vb:136
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Version Information: Microsoft .NET Framework Version:2.0.50727.8762; ASP.NET Version:2.0.50727.8762

dotnet-aspnet-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NicolasArgyrou-0319 ,
According to your error message, whether the URL you requested requires authentication, and can you provide the relevant code, which can better help you solve the problem.

0 Votes 0 ·

0 Answers