Hi, Everybody !
i download code of Storefront ,run it in my computer and i have a issue. error messeage is
Cannot open database "AdventureWorks" requested by the login. The login failed.<br>Login failed for user 'HOME-83894A263C\Home'.BODY {
FONT-WEIGHT: normal; FONT-SIZE: 0.7em; COLOR: black; FONT-FAMILY: "Verdana"
}
P {
MARGIN-TOP: -5px; FONT-WEIGHT: normal; COLOR: black; FONT-FAMILY: "Verdana"
}
B {
MARGIN-TOP: -5px; FONT-WEIGHT: bold; COLOR: black; FONT-FAMILY: "Verdana"
}
H1 {
FONT-WEIGHT: normal; FONT-SIZE: 18pt; COLOR: red; FONT-FAMILY: "Verdana"
}
H2 {
FONT-WEIGHT: normal; FONT-SIZE: 14pt; COLOR: maroon; FONT-FAMILY: "Verdana"
}
PRE {
FONT-SIZE: 0.9em; FONT-FAMILY: "Lucida Console"
}
.marker {
FONT-WEIGHT: bold; COLOR: black; TEXT-DECORATION: none
}
.version {
COLOR: gray
}
.error {
MARGIN-BOTTOM: 10px
}
.expandable {
FONT-WEIGHT: bold; CURSOR: hand; COLOR: navy; TEXT-DECORATION: underline
}
Cannot open database "AdventureWorks" requested by the login. The login
failed.
Login failed for user 'HOME-83894A263C\Home'.
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.Data.SqlClient.SqlException: Cannot open database "AdventureWorks"
requested by the login. The login failed.
Login failed for user
'HOME-83894A263C\Home'.
Source Error:
Line 6: System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection("server=.\\SQLExpress;database=AdventureWorks;Integrated Security=true");
Line 7: System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("SELECT * FROM Person.StateProvince WHERE CountryRegionCode='US' ORDER BY StateProvinceCode", conn);
Line 8: conn.Open();
Line 9: using (System.Data.SqlClient.SqlDataReader rdr = cmd.ExecuteReader()) {
Line 10: while (rdr.Read()) { |
My app.config:
<connectionStrings>
<add name="Commerce.MVC.Data.Properties.Settings.Commerce_MVCConnectionString3"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=E:\project\2008\mvcsamples-14811\Commerce.Web\App_Data\Commerce.MVC.mdf;Initial Catalog=Commerce.MVC;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="Commerce.MVC.Data.Properties.Settings.Commerce_MVCConnectionString"
connectionString="Data Source=localhost;Initial Catalog=Commerce.MVC;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="Commerce.MVC.Data.Properties.Settings.Commerce_MVCConnectionString1"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=E:\project\2008\mvcsamples-14811\Commerce.Web\App_Data\Commerce.MVC.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="Commerce.MVC.Data.Properties.Settings.Commerce_MVCConnectionString2"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=E:\project\2008\mvcsamples-14811\Commerce.Web\App_Data\Commerce.MVC.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
What should i do to solve this issue?
thanks all.