System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform.
-
Hi I m using asp.net with sql server .But when I try to fill Dataset I get the error 'ResourcePool' is not supported on the current platform.' My Code is using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.Web.Mail; using System.Configuration; namespace FinalQc { public class forgetpass : System.Web.UI.Page { SqlConnection Sq; protected System.Web.UI.WebControls.ImageButton btnLogin; protected System.Web.UI.WebControls.TextBox txtMailId; protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.Label lblfrgtpass; protected System.Web.UI.HtmlControls.HtmlForm FrmLog; private void Page_Load(object sender, System.EventArgs e) { } override protected void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.btnLogin.Click += new System.Web.UI.ImageClickEventHandler(this.btnLogin_Click); this.Load += new System.EventHandler(this.Page_Load); } private void btnLogin_Click(object sender, System.Web.UI.ImageClickEventArgs e) { System.Data.DataSet Ds; SqlDataAdapter Sd; string mailId=txtMailId.Text.Trim(); Sq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]); Sd=new SqlDataAdapter("select firstName+lastName,userName,Password from member where email='"+mailId.Trim()+"'", Sq); Ds=new System.Data.DataSet(); Sd.Fill(Ds,"passw"); try { string Unm,Uid,Upass; Unm=Ds.Tables[0].Rows[0].ItemArray.GetValue(0).ToString(); Uid=Ds.Tables[0].Rows[0].ItemArray.GetValue(1).ToString(); Upass=Ds.Tables[0].Rows[0].ItemArray.GetValue(2).ToString(); SmtpMail.SmtpServer = "abc"; MailMessage NewMessage = new MailMessage(); NewMessage.BodyFormat = MailFormat.Text; NewMessage.Priority = MailPriority.High; NewMessage.From = "jitendra@abc.com"; NewMessage.To =mailId; NewMessage.Cc = "jitendra@abc.com"; NewMessage.Subject = "Password Reset Request"; NewMessage.Body = "Dear,"+Unm+"
Your User Name is : "+Uid+"
"+"Password is "+Upass; SmtpMail.Send(NewMessage); } catch(Exception) { Response.Write("Invalid Email Address"); } } } } My web.co -
Hi I m using asp.net with sql server .But when I try to fill Dataset I get the error 'ResourcePool' is not supported on the current platform.' My Code is using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.Web.Mail; using System.Configuration; namespace FinalQc { public class forgetpass : System.Web.UI.Page { SqlConnection Sq; protected System.Web.UI.WebControls.ImageButton btnLogin; protected System.Web.UI.WebControls.TextBox txtMailId; protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.Label lblfrgtpass; protected System.Web.UI.HtmlControls.HtmlForm FrmLog; private void Page_Load(object sender, System.EventArgs e) { } override protected void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.btnLogin.Click += new System.Web.UI.ImageClickEventHandler(this.btnLogin_Click); this.Load += new System.EventHandler(this.Page_Load); } private void btnLogin_Click(object sender, System.Web.UI.ImageClickEventArgs e) { System.Data.DataSet Ds; SqlDataAdapter Sd; string mailId=txtMailId.Text.Trim(); Sq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]); Sd=new SqlDataAdapter("select firstName+lastName,userName,Password from member where email='"+mailId.Trim()+"'", Sq); Ds=new System.Data.DataSet(); Sd.Fill(Ds,"passw"); try { string Unm,Uid,Upass; Unm=Ds.Tables[0].Rows[0].ItemArray.GetValue(0).ToString(); Uid=Ds.Tables[0].Rows[0].ItemArray.GetValue(1).ToString(); Upass=Ds.Tables[0].Rows[0].ItemArray.GetValue(2).ToString(); SmtpMail.SmtpServer = "abc"; MailMessage NewMessage = new MailMessage(); NewMessage.BodyFormat = MailFormat.Text; NewMessage.Priority = MailPriority.High; NewMessage.From = "jitendra@abc.com"; NewMessage.To =mailId; NewMessage.Cc = "jitendra@abc.com"; NewMessage.Subject = "Password Reset Request"; NewMessage.Body = "Dear,"+Unm+"
Your User Name is : "+Uid+"
"+"Password is "+Upass; SmtpMail.Send(NewMessage); } catch(Exception) { Response.Write("Invalid Email Address"); } } } } My web.coWhat's the connection string? Regards, Serge (Logic Software, Easy Projects .NET site)
-
What's the connection string? Regards, Serge (Logic Software, Easy Projects .NET site)
Hi Serge, I m getting what u want to say .As per my understanding about ur question is If u r asking about Connection string then I have stored connection string in my WEB.CONFIG file.I have added a key in web.config and added the value in the following manner and when i want to make any connection i use the following methid SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) SO the connection string will auto apperas in the above code. We can replace the line below SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) with below SqlConnection newSq=new SqlConnection("server=localhost;uid=sa;pwd=sa;database=mydb;") Hope u will be understanding what i wanna say Thanks
-
Hi I m using asp.net with sql server .But when I try to fill Dataset I get the error 'ResourcePool' is not supported on the current platform.' My Code is using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.Web.Mail; using System.Configuration; namespace FinalQc { public class forgetpass : System.Web.UI.Page { SqlConnection Sq; protected System.Web.UI.WebControls.ImageButton btnLogin; protected System.Web.UI.WebControls.TextBox txtMailId; protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.Label lblfrgtpass; protected System.Web.UI.HtmlControls.HtmlForm FrmLog; private void Page_Load(object sender, System.EventArgs e) { } override protected void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); } private void InitializeComponent() { this.btnLogin.Click += new System.Web.UI.ImageClickEventHandler(this.btnLogin_Click); this.Load += new System.EventHandler(this.Page_Load); } private void btnLogin_Click(object sender, System.Web.UI.ImageClickEventArgs e) { System.Data.DataSet Ds; SqlDataAdapter Sd; string mailId=txtMailId.Text.Trim(); Sq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]); Sd=new SqlDataAdapter("select firstName+lastName,userName,Password from member where email='"+mailId.Trim()+"'", Sq); Ds=new System.Data.DataSet(); Sd.Fill(Ds,"passw"); try { string Unm,Uid,Upass; Unm=Ds.Tables[0].Rows[0].ItemArray.GetValue(0).ToString(); Uid=Ds.Tables[0].Rows[0].ItemArray.GetValue(1).ToString(); Upass=Ds.Tables[0].Rows[0].ItemArray.GetValue(2).ToString(); SmtpMail.SmtpServer = "abc"; MailMessage NewMessage = new MailMessage(); NewMessage.BodyFormat = MailFormat.Text; NewMessage.Priority = MailPriority.High; NewMessage.From = "jitendra@abc.com"; NewMessage.To =mailId; NewMessage.Cc = "jitendra@abc.com"; NewMessage.Subject = "Password Reset Request"; NewMessage.Body = "Dear,"+Unm+"
Your User Name is : "+Uid+"
"+"Password is "+Upass; SmtpMail.Send(NewMessage); } catch(Exception) { Response.Write("Invalid Email Address"); } } } } My web.coHi Serge, I m getting what u want to say .As per my understanding about ur question is If u r asking about Connection string then I have stored connection string in my WEB.CONFIG file.I have added a key in web.config and added the value in the following manner jitendra_s wrote: add key="dsn" value="server=192.168.1.158;uid=sa;pwd=sa;database=qcdb;"/ and when i want to make any connection i use the following methid SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) SO the connection string will auto apperas in the above code. We can replace the line below SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) with below SqlConnection newSq=new SqlConnection("server=localhost;uid=sa;pwd=sa;database=mydb;") Hope u will be understanding what i wanna say Thanks This is Jitendra
-
Hi Serge, I m getting what u want to say .As per my understanding about ur question is If u r asking about Connection string then I have stored connection string in my WEB.CONFIG file.I have added a key in web.config and added the value in the following manner jitendra_s wrote: add key="dsn" value="server=192.168.1.158;uid=sa;pwd=sa;database=qcdb;"/ and when i want to make any connection i use the following methid SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) SO the connection string will auto apperas in the above code. We can replace the line below SqlConnection newSq=new SqlConnection(ConfigurationSettings.AppSettings["dsn"]) with below SqlConnection newSq=new SqlConnection("server=localhost;uid=sa;pwd=sa;database=mydb;") Hope u will be understanding what i wanna say Thanks This is Jitendra
Hi Jitendra, Seems that you need to reinstall the latest MDAC version from http://www.microsoft.com/data[^] Regards, Serge (Logic Software, Easy Projects .NET site)