PDA

View Full Version : فروم دات نت



faramarz_s
سه شنبه 25 آذر 1382, 15:03 عصر
http://www.merat.org/home.jpg

فروم دات نت را دانلود نموده و اکنون نمی دانم چگونه باید برای آن فروم تعریف کرده و ...
لطفا در همه موارد لازم مرا راهنمایی فرمایید. :wink:

faramarz_s
پنج شنبه 27 آذر 1382, 21:17 عصر
جناب نصیری :wink: :?:

Vahid_Nasiri
پنج شنبه 27 آذر 1382, 21:53 عصر
شما هنگامیکه با آی دی و پسورد مدیریتی وارد می شوید می توانید به لینک بالای صفحه برای ورود به قسمت مدیریت سایت دسترسی داشته باشید. در اینجا می توان گروه اصلی و فوروم ها را تعریف کرد.

faramarz_s
جمعه 28 آذر 1382, 09:56 صبح
بله این مطلب را از فروم خود asp.netمتوجه شده بودم و
ID:admin
Pass:admin
هست.اما موقعی که این دو را برای رجیستر بکار می برم به آدرس ایمیل نیاز هست:
که با پیغام خطای زیر مواجه می شوم:


Server Error in '/AspNetForums' Application.
--------------------------------------------------------------------------------

Email template not found for EmailTemplateID 4
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: AspNetForums.Components.EmailTemplateNotFoundExcep tion: Email template not found for EmailTemplateID 4

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:


[EmailTemplateNotFoundException: Email template not found for EmailTemplateID 4]
AspNetForums.Data.SqlDataProvider.GetEmailTemplate Info(Int32 EmailTemplateID) +309
AspNetForums.Emails.SendEmail(String username, EmailTypeEnum emailType, Int32 postID, String bcc, String deleteReason) +232
AspNetForums.Users.CreateNewUser(User user, Boolean needToSendEmail) +160
AspNetForums.Controls.CreateUser.CreateUser_Click( Object sender, EventArgs e) +160
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
جوابی که در فروم asp.net به من داده شد


Re: Email Template Problem!!!!
Posted: 12-18-2003 10:12 PM
I had ever see the same error.
In Email.cs class defined function :
public static bool SendEmail(String username, EmailTypeEnum emailType, int postID, string bcc, string deleteReason) {

// if we don't wish to send emails at all, bail out now
if (!Globals.SendEmail)
return false;

// both the username and bcc field can't be empty
if (username.Length == 0 && bcc.Length == 0)
return false;

if (bcc == null)
bcc = "";

// if we were passed in a username, get the username info
String strEmail = "";
User user = null;
int dbTimezoneOffset;
int iTimezoneOffset = Globals.DBTimezone;

dbTimezoneOffset = iTimezoneOffset;

if (username.Length > 0) {

user = Users.GetUserInfo(username, false);
strEmail = user.Email;
iTimezoneOffset = user.Timezone;
}

// read in the email
EmailTemplate email = GetEmailTemplateInfo((int) emailType);

// Constrcut the email
MailMessage msg = new MailMessage();

if (bcc.Length > 0 && emailType != EmailTypeEnum.MessageDeleted) {
msg.Bcc = bcc;
} else {
msg.To = strEmail; // assumes strEmail was set
}

msg.From = email.From;
msg.Subject = FormatEmail(email.Subject, user, postID, iTimezoneOffset, dbTimezoneOffset, null);
msg.Priority = email.Priority;
msg.Body = FormatEmail(email.Body, user, postID, iTimezoneOffset, dbTimezoneOffset, deleteReason) + "\n";
SmtpMail.SmtpServer = Globals.SmtpServer;

try {
SmtpMail.Send(msg);
} catch (Exception) {
return false;
}

return true;
}

You can mofdify command following : SmtpMail.SmtpServer = Globals.SmtpServer;
SmtpMail.SmtpServer is an address of email sever exists, so that you can modify this value.


But I can't understand what to do!!!!! :oops:
Please help me :wink:

Vahid_Nasiri
جمعه 28 آذر 1382, 11:00 صبح
این فایلی را که به شما گفتند باز کنید و تغییرات گفته شده را اعمال نمایید.
سپس دوباره کل پروژه را کامپایل کنید درست می شود.

faramarz_s
یک شنبه 30 آذر 1382, 16:33 عصر
Hi

Please look at command following in web.config file
<add key="smtpServer" value="default" /> <!-- Can specify SMTP Server to use to send out emails. Use "default" to use the default Windows 2000 SMTP Server -->
you can modify string value="default", string "default" can be IP address of email server you used.
This value used in command SmtpMail.SmtpServer = Globals.SmtpServer; i had listed over.
Other hand, you can view and modify source code in Engine directory because after installation you will have the following directory structure :
<installation point>\Engine
<installation point>\AspNetForums
Good luck
این جدیدترین پاسخی است که آمده حالا من باید آی پی را 127.0.0.1قرار بدهم؟
http://merat.org/pic/smtp.jpg
<add key="smtpServer" value="127.0.0.1" />