hi everyone
when I run default.aspx below error occurs
The system cannot find the file specified
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.ComponentModel.Win32Exception: The system cannot find the file specified Source Error:
Line 135: {
Line 136:
Line 137: conn.Open();
Line 138: SqlDataReader _dr = _cmd.ExecuteReader();
Line 139: while (_dr.Read())
|
Source File: D:\New folder\amlakresponsiv\AmlakeAbdi\Default.aspx.cs Line: 137 Stack Trace:
and codes:
private void GetaboutInfo()
{
using (SqlConnection conn = General.GetConnection())
{
using (SqlCommand _cmd = General.GetCommand("about_details", conn))
{
conn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())
{
string numberT = toPersianNumber(_dr["Tell"].ToString());
Lbltell.HRef = "tel://" + numberT;
Lbltell.InnerHtml = numberT;
string number = toPersianNumber(_dr["Mobile"].ToString());
LblMobile.HRef = "tel://" + number;
LblMobile.InnerHtml = number;
Lblemail.Text = _dr["Email"].ToString();
Lbladd.Text = toPersianNumber(_dr["Address"].ToString());
}
}
}
}
I don't know where is the problem and I use visualstudio2022 and sqlserver2019
<connectionStrings>
<add name="DigimasterConnectionString" connectionString="Data Source=.;Initial Catalog=amlakeabdi;User ID=sa;Password=2019" providerName="System.Data.SqlClient"/>
<add name="Excel03ConString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES'"/>
<add name="Excel07+ConString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 8.0;HDR=YES'"/>
</connectionStrings>