This problem occurs during project migration today,SQL Server does not exist or access is denied
This is a normal problem. Generally, there is a solution. Check 1433 --> check the connector --> patch SP3.
In general, it is normal to patch SQL Server SP3 in Windows 2003.
But today's situation is different. In order to simplify the problem, I took the shortest database connection code, which was generated by Microsoft ASP. NET web matrix.
// Insert page code here
//
System. Data. dataset myquerymethod (){
String connectionstring = "Server = \ '192. 168.191.5 \ '; user id = \ 'devuser \'; Password = \ devuserpw \ '; database = \ 'aioa \'";
System. Data. idbconnection dbconnection = new system. Data. sqlclient. sqlconnection (connectionstring );
String querystring = "select [aioa_tabs]. * from [aioa_tabs]";
System. Data. idbcommand dbcommand = new system. Data. sqlclient. sqlcommand ();
Dbcommand. commandtext = querystring;
Dbcommand. Connection = dbconnection;
System. Data. idbdataadapter dataadapter = new system. Data. sqlclient. sqldataadapter ();
Dataadapter. selectcommand = dbcommand;
System. Data. dataset = new system. Data. dataset ();
Dataadapter. Fill (Dataset );
Return dataset;
}
Let's take a look at the running situation in Microsoft ASP. NET web matrix.
Note: matrix comes with a Micro web server and does not require IIS to parse Asp.net.
Copy the same code to Vs and then run it.
The environment is different. Is there a problem with IIS? Afternoon of depressing problem