При запуске приложения я получил ошибку. Когда я вошел в систему как администратор, он работал нормально. После этого при попытке войти в систему как обычный пользователь я получил следующую ошибку:
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 wait operation timed out
Source Error:
Line 30: {
Line 31: DataTable dt = new DataTable();
Line 32: sda.Fill(dt);
Line 33: return dt;
Line 34: }
Source File: h:\Project Code\Tickandtie_472018\App_Code\bindingControl.cs Line: 32
Я приложил файл web.config и строку подключения.
WebConfig
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="login.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
Элементы управления связыванием ##
public class bindingControl
{
string constr = "Password=password;Persist Security Info=True;User ID=tick;Initial Catalog=TickandTie;Timeout=200;Data Source=184.168";
//string constr = "Data Source=.\\SQLEXPRESS;Initial Catalog=TickandTie;Integrated Security=True";
public DataTable DataTableFill(string commandText, CommandType commandType, params SqlParameter[] parameters)
{
using (SqlConnection con = new SqlConnection(constr))
using (SqlCommand cmd = new SqlCommand(commandText, con))
{
cmd.CommandType = commandType;
cmd.Parameters.AddRange(parameters);
con.Open();
using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
{
DataTable dt = new DataTable();
sda.Fill(dt);
return dt;
}
}
}
public DataSet DataSetFill(string commandText, CommandType commandType, params SqlParameter[] parameters)
{
using (SqlConnection con = new SqlConnection(constr))
using (SqlCommand cmd = new SqlCommand(commandText, con))
{
cmd.CommandType = commandType;
cmd.Parameters.AddRange(parameters);
con.Open();
using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
{
DataSet ds = new DataSet();
sda.Fill(ds);
return ds;
}
}
}
(snip) - ошибка возникает во втором методе класса.
Оба логина сработали, но внезапно, похоже, логин пользователя больше не отображается.