diff options
Diffstat (limited to 'samples/OAuthServiceProvider/Default.aspx.cs')
-rw-r--r-- | samples/OAuthServiceProvider/Default.aspx.cs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/samples/OAuthServiceProvider/Default.aspx.cs b/samples/OAuthServiceProvider/Default.aspx.cs deleted file mode 100644 index 9193da4..0000000 --- a/samples/OAuthServiceProvider/Default.aspx.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OAuthServiceProvider { - using System; - using System.Collections.Generic; - using System.Configuration; - using System.IO; - using System.Linq; - using System.Web; - using OAuthServiceProvider.Code; - - public partial class _Default : System.Web.UI.Page { - protected void createDatabaseButton_Click(object sender, EventArgs e) { - string databasePath = Path.Combine(Server.MapPath(Request.ApplicationPath), "App_Data"); - if (!Directory.Exists(databasePath)) { - Directory.CreateDirectory(databasePath); - } - string connectionString = ConfigurationManager.ConnectionStrings["DatabaseConnectionString"].ConnectionString.Replace("|DataDirectory|", databasePath); - var dc = new DataClassesDataContext(connectionString); - if (dc.DatabaseExists()) { - dc.DeleteDatabase(); - } - try { - dc.CreateDatabase(); - - // Fill with sample data. - dc.Clients.InsertOnSubmit(new Client { - ClientIdentifier = "sampleconsumer", - ClientSecret = "samplesecret", - Name = "Some sample client", - }); - dc.Users.InsertOnSubmit(new User { - OpenIDFriendlyIdentifier = "=arnott", - OpenIDClaimedIdentifier = "=!9B72.7DD1.50A9.5CCD", - Age = 27, - FullName = "Andrew Arnott", - FavoriteSites = new System.Data.Linq.EntitySet<FavoriteSite> { - new FavoriteSite { SiteUrl = "http://www.microsoft.com" }, - new FavoriteSite { SiteUrl = "http://www.google.com" }, - }, - }); - - dc.SubmitChanges(); - this.databaseStatus.Visible = true; - } catch (System.Data.SqlClient.SqlException ex) { - foreach (System.Data.SqlClient.SqlError error in ex.Errors) { - Response.Write(error.Message); - } - } - } - } -}
\ No newline at end of file |