diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-02 19:27:55 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-02 19:27:55 -0800 |
commit | e0d87fa9d98d9461867cb636115559a1d0bcb82b (patch) | |
tree | ee1cf39491135f712413c64b0402df371ed252d3 | |
parent | e6eebec4ce99b9be0b3f450eb976259ccaa91ce4 (diff) | |
download | DotNetOpenAuth-e0d87fa9d98d9461867cb636115559a1d0bcb82b.zip DotNetOpenAuth-e0d87fa9d98d9461867cb636115559a1d0bcb82b.tar.gz DotNetOpenAuth-e0d87fa9d98d9461867cb636115559a1d0bcb82b.tar.bz2 |
Removed the fragile magic code for db creation.
-rw-r--r-- | projecttemplates/RelyingPartyLogic/Database.cs | 15 | ||||
-rw-r--r-- | projecttemplates/WebFormsRelyingParty/GettingStarted.htm | 18 |
2 files changed, 9 insertions, 24 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Database.cs b/projecttemplates/RelyingPartyLogic/Database.cs index d7efeac..f162b95 100644 --- a/projecttemplates/RelyingPartyLogic/Database.cs +++ b/projecttemplates/RelyingPartyLogic/Database.cs @@ -38,20 +38,7 @@ namespace RelyingPartyLogic { DatabaseEntities dataContext = DataContextSimple; if (dataContext == null) { dataContext = new DatabaseEntities(); - try { - dataContext.Connection.Open(); - } catch (EntityException entityEx) { - var sqlEx = entityEx.InnerException as SqlException; - if (sqlEx != null) { - if (sqlEx.Class == 14 && sqlEx.Number == 15350) { - // Most likely the database schema hasn't been created yet. - HttpContext.Current.Response.Redirect("~/Setup.aspx"); - } - } - - throw; - } - + dataContext.Connection.Open(); DataContextTransaction = (EntityTransaction)dataContext.Connection.BeginTransaction(); DataContextSimple = dataContext; } diff --git a/projecttemplates/WebFormsRelyingParty/GettingStarted.htm b/projecttemplates/WebFormsRelyingParty/GettingStarted.htm index 9a3fbb7..c4fb3aa 100644 --- a/projecttemplates/WebFormsRelyingParty/GettingStarted.htm +++ b/projecttemplates/WebFormsRelyingParty/GettingStarted.htm @@ -1,19 +1,17 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" > +<html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>Getting started</title> + <title>Getting started</title> </head> <body> - <p> - Your OpenID and InfoCard relying party web site is nearly ready to go. You just - need to create your SQL database where user accounts will be stored. <b> - Just build and start your web site </b>and visit Default.aspx. You'll get - further instructions there. + Your OpenID and InfoCard relying party web site is nearly ready to go. You just + need to create your SQL database where user accounts will be stored. <b>Just build and + start your web site</b> and visit <b>Setup.aspx</b>. You'll get further instructions + there. </p> <p> - Creating your database is almost totally automated, so it should be a piece of - cake.</p> - + Creating your database is almost totally automated, so it should be a piece of cake. + </p> </body> </html> |