S
Shawn Zheng
Help:
I have two problems in ASP.NET:
1. SmtpMail.Send did not work. I have tried both remote and local SMTP
servers. the codes are :
MailMessage Message = new MailMessage();
Message.To = txtEmail.Text;
Message.From = emailaddress;
Message.Subject = "subject";
Message.BodyFormat = MailFormat.Html;
Message.Body = "<HTML><BODY>" + strMessage+ "</BODY></HTML>";
SmtpMail.SmtpServer = smtpserver;
SmtpMail.Send(Message);
Message = null;
where emailaddress is a string defined somewhere. smtpserver is a string
predefined as either "(local)" or Email server of my internet provider.
2. SqlConnection to SQL 2000 server in Windows 2003 server is rejected. I
have tried two type of connections, trusted and standard. the following are
the connection strings that I have tried:
"Initial Catalog=databasename;Data Source=sqlServerInstanceName; Integrated
Security=SSPI;user id=sa"
and
"Initial Catalog=databasename;Data Source=sqlServerInstanceName; "
I have add serverMachine\ASPNET to SQL 2000 login and added to the database
user. I also granted permissions to this account.
Shawn
I have two problems in ASP.NET:
1. SmtpMail.Send did not work. I have tried both remote and local SMTP
servers. the codes are :
MailMessage Message = new MailMessage();
Message.To = txtEmail.Text;
Message.From = emailaddress;
Message.Subject = "subject";
Message.BodyFormat = MailFormat.Html;
Message.Body = "<HTML><BODY>" + strMessage+ "</BODY></HTML>";
SmtpMail.SmtpServer = smtpserver;
SmtpMail.Send(Message);
Message = null;
where emailaddress is a string defined somewhere. smtpserver is a string
predefined as either "(local)" or Email server of my internet provider.
2. SqlConnection to SQL 2000 server in Windows 2003 server is rejected. I
have tried two type of connections, trusted and standard. the following are
the connection strings that I have tried:
"Initial Catalog=databasename;Data Source=sqlServerInstanceName; Integrated
Security=SSPI;user id=sa"
and
"Initial Catalog=databasename;Data Source=sqlServerInstanceName; "
I have add serverMachine\ASPNET to SQL 2000 login and added to the database
user. I also granted permissions to this account.
Shawn