diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-31 22:01:16 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-31 22:01:16 -0700 |
commit | c94c7f8197eda673947a9d1e0c0b3f3c4efca94f (patch) | |
tree | 0f978cfc2de70c54ac81e11d4339da04dff9f27f /samples/OAuthServiceProvider/Default.aspx.cs | |
parent | 7d38eefb65928a1e80036ec006b0e129dc2cface (diff) | |
download | DotNetOpenAuth-c94c7f8197eda673947a9d1e0c0b3f3c4efca94f.zip DotNetOpenAuth-c94c7f8197eda673947a9d1e0c0b3f3c4efca94f.tar.gz DotNetOpenAuth-c94c7f8197eda673947a9d1e0c0b3f3c4efca94f.tar.bz2 |
Split the OAuthServiceProvider sample into two samples: OAuthAuthorizationServer and OAuthResourceServer.
Renamed OAuthConsumer to OAuthClient.
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 |