السلام عليكم
توجد مشكله فى صفحة اتصل بنا وهى بالفعل تعمل على الجهاز من دون رفعها على السيرفير
وعند رفع الموقع والدخول للصفحه اتصل بنا يظهر خطاء مع انها شغاله وبترسل على الجهاز لكن على السيرفير يطلع خطاء
وللعلم السيرفير على
godaddy
فهل يرفض ارسال الخاص بموقع
gmail
وجربت ال smtp الخاص بسيرفير godaddy واسم المستخدم وكلمه المرورر ولكن لايقبل الارسال
smtpout.asia.secureserver.net
رجاء توضيح سبب المشكله
ولكم جزيل الشكر
===
Web.config
===
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
</customErrors>
</system.web>
<system.net>
<mailSettings>
<smtp from="Info@alkhatteeb.com">
<network host="smtp.gmail.com" userName="developerahmed.mohamed852@gmail.com" password="password" port="25"/>
<!--<network host="smtp.gmail.com"/>-->
</smtp>
</mailSettings>
</system.net>
</configuration>
===
Contacts/source html
===
<%@ Page Language="VB" AutoEventWireup="false" Debug="true" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>
To:<br />
<asp:TextBox ID="txtToAddress" runat="server" Columns="35" /></p>
<p>
Subject:<br />
<asp:TextBox ID="txtSubject" runat="server" Columns="50" /></p>
<p>
Body:<br />
<asp:TextBox ID="txtBody" runat="server" Columns="75" TextMode="MultiLine" Rows="6" /></p>
<p>
<asp:Button ID="btnSend" runat="server" Text="Send Mail" style="height: 26px" />
<asp:FileUpload ID="FileUpload1" runat="server" /></p>
</div>
</form>
</body>
</html>
===
Contacts/source vb.net
===
Imports System.Net.Mail
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
Dim Mail As New MailMessage
Mail.From = New MailAddress(txtToAddress.Text)
Mail.To.Add(New MailAddress("developerahmed.mohamed852@gmail.com"))
Mail.Subject = txtSubject.Text
Mail.Body = txtBody.Text
Mail.IsBodyHtml = True
'Dim ImagePath As String = Server.MapPath("images/twitter_icon.png")
'Dim AttachmentImage As New Attachment(ImagePath)
'Mail.Attachments.Add(AttachmentImage)
If FileUpload1.HasFile Then
'Dim msg As New MailMessage("from@here.com", "to@there.com")
'msg.Subject = "File"
'msg.Body = "See file in attachment"
Dim attach As New Attachment(FileUpload1.FileContent, FileUpload1.FileName)
Mail.Attachments.Add(attach)
End If
Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient("smtp.gmail.com")
smtpClient.Port = " 25"
smtpClient.EnableSsl = True
smtpClient.Send(Mail)
End Sub
End Class
وعند تجربه الارسال على الجهاز يتم الارسال بنجاح لكن السيرفير يظهر خطاء وهو
Server Error in '/' Application. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.43.109:25 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.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.43.109:25 Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.43.109:25] System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +225 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +279 [WebException: Unable to connect to the remote server] System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +6054548 System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +314 System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21 System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +322 System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +146 System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +170 System.Net.Mail.SmtpClient.GetConnection() +50 System.Net.Mail.SmtpClient.Send(MailMessage message) +1484 [SmtpException: Failure sending mail.] System.Net.Mail.SmtpClient.Send(MailMessage message) +1811 Default2.btnSend_Click(Object sender, EventArgs e) +430 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.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) +5563 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


