WebPages project

The WebPages project is the start-up ASP.NET web application.

/Account/ActivateAccount.aspx

A Web page that a newly registered user needs to visit in order to sign in for the first time. An e-mail with a personal link to this page is sent after the user has registered by /Account/Register.aspx. The request parameter "Id" should contain the user id of the user that is to be activated, if not an error is displayed.



After the user has activated his account a confirmation e-mail is sent to the user.


/Account/ChangePassword.aspx

A Web page that allows a user to change his/her password.




A confirmation e-mail is sent to the user after the password has been changed.


/Account/Login.aspx

A Web page that allows the user to sign in using his/her username or e-mail address and password.


/Account/Logout.aspx

A Web page that signs the user out.

/Account/Register.aspx

A Web page that lets a user create a new account.





Note: After the user has registered an e-mail is sent with a link to /Account/ActivateAccount.aspx to activate the user account and to validate the e-mail address of the user. The domain here is by default www.myapp.com, change the domain to the correct value for your development, staging, or production environment.


/Account/ResetPassword.aspx

A Web page that lets the user reset his/her password if they have forgotten it. The user must answer the question he/she entered when he/she created the account.







The new automatically generated password is sent to the users e-mail address.


/Account/UnlockAccount.aspx

A Web page that allows the user to unlock his/her user account in the case it has been locked out. After unlocking a confirmation is sent to the users e-mail address.

/Account/User.aspx

A Web page that shows the user profile. If the profile page belongs to the user that is viewing it the user can upload a picture and enter his/her gender. Here you can add/remove you own fields, the default fields are just there as an example.

The default portrait field scales the uploaded image to a thumbnail and stores the processed image in the Azure Blob Storage. The gender field is stored in the Azure Table Storage.


Querystring parameters

By default our own user profile page is displayed, if you want to see another users profile page then you can add the user name to the "name" querystring parameter, like this:

http://example.com/Account/User.aspx?name=Admin

The example above would show Admin's user profile page.


/Account/Web.config

Contain rules of which sub-pages are visible to which user roles.

/Admin/InitApp.aspx

A Web page that initializes the AzureProviders application. You need to visit this page once to create:
  • Azure tables
  • Azure queue
  • Azure blob storage
  • Admins role
  • Admin user & profile

There is no harm in calling this page more than once.

History of InitApp.aspx

In earlier versions of AzureProviders this page was removed and the code moved to Global.asax or the Azure Role OnStart() method, but this attempt ultimately failed because of the context of the processes than ran them, and so the /Admin/InitApp.asp web page was re-implemented again.

If you have a better way of doing the initialization of AzureProviders then please let me know, but make sure that you have tested that it works in staging/production first and not just your development environment, like I mistakenly did.

/Admin/Roles.aspx

A Web page that lists all the ASP.NET Role Provider roles.


/Admin/Sessions.aspx

A Web page that lists all the active ASP.NET Session Provider sessions.

/Admin/Statistics.aspx

A Web page that shows the total number of registered users and the number of online users.


/Admin/Users.aspx

A Web page that lists all the ASP.NET Membership Provider users.


/Admin/Web.config

Contain rules of which sub-pages are visible to which user roles.

Email.resx

E-mail message resources like e-mail header and footer.

Profile.resx

Resources used by the ASP.NET Profile Provider.

/Bll/AzureMembershipProvider.cs

Business logic for a custom ASP.NET Membership Provider that stores all its data in the Azure Table Storage.

Note: If you are only interested in the membership provider code and not the rest of AzureProviders, then it is sufficient to copy this file and the membership provider deceleration from Web.config.

/Bll/AzureProfileProvider.cs

Business logic for a custom ASP.NET Profile Provider that stores all its data in the Azure Table and Blob Storage.

Note: If you are only interested in the profile provider code and not the rest of AzureProviders, then it is sufficient to copy this file and the profile provider deceleration from Web.config.

/Bll/AzureRoleProvider.cs

Business logic for a custom ASP.NET Role Provider that stores all its data in the Azure Table Storage.

Note: If you are only interested in the role provider code and not the rest of AzureProviders, then it is sufficient to copy this file and the role provider deceleration from Web.config.

/Bll/AzureSessionStateProvider.cs

Business logic for a custom ASP.NET Session-State Provider that stores all its data in the Azure Table Storage.

Note: If you are only interested in the session provider code and not the rest of AzureProviders, then it is sufficient to copy this file and the session provider deceleration from Web.config.

/Bll/GraphicUtilities.cs

Business logic that lets you create thumbnails and resize images.

/Bll/InitApplication.cs

Business logic that creates:
  • Azure tables
  • Azure queue
  • Azure blob storage
  • Admins role
  • Admin user & profile

/Ccc/EncryptionUtilities.cs

Business logic that makes a MD5 hash from a string.

/Images/

Image file folder.

/Scripts/

JavaScript file folder.

/Styles/

CSS file folder.

About.aspx

Some information about the AzureProviders solution.

Default.aspx

The start page. Demo's the ASP.NET Session-State Provider by showing when the user session was started.

Global.asax

Initializes the Azure Cloud Storage Account when the Web application starts.

Site.master

Master page.

Web.config

<configuration><appSettings>

Key/value's:
  • StaticKey; A static key is used instead of machiekey to encrypt passwords since machinekey changes when in development
  • fromEmail; (default="do-not-reply@example.com") This is the e-mail address that will be the sender on all the e-mails sent by this application
  • AdminName; (default="Admin") By default a administrator user is made and this is its sign in name
  • AdminEmail; (default="admin@example.com") By default a administrator user is made and this is its e-mail
  • AdminPassword; (default="Password") By default a administrator user is made and this is its password
  • AdminQuestion; (default="Color of my first car?") By default a administrator user is made and this is its password retrieval question
  • AdminAnswer; (default="Kiwi") By default a administrator user is made and this is its password retrieval answer
  • AdminRoleName; (default="Admins") By default a role is created to hold administrators and this is its name. Admin is added to this by default
  • ApplicationName; (default="MyApp1") The name of your application, should match the one in the MultiThreadedWorkerRole app.config
  • QueueDequeueRetrySleepSeconds; (default=3600) Number of seconds to wait before retrying if a message was dequeued in the Azure Queue
  • UseNaglingWithTable; (default="false") PUT HTTP requests smaller than 1460 bytes are ineffecient with nagling turned on, see http://blogs.msdn.com/b/windowsazurestorage/archive/2010/06/25/nagle-s-algorithm-is-not-friendly-towards-small-requests.aspx for more information on the subject.
  • UseNaglingWithQueue; (default="false") PUT HTTP requests smaller than 1460 bytes are ineffecient with nagling turned on, see http://blogs.msdn.com/b/windowsazurestorage/archive/2010/06/25/nagle-s-algorithm-is-not-friendly-towards-small-requests.aspx for more information on the subject.

<configuration><system.web><authentication><forms>

Sets the ASP.NET login page to /Account/Login.aspx

<configuration><system.web><membership>

Settings for the custom ASP.NET Membership Provider.

<configuration><system.web><profile>

Settings for the custom ASP.NET Profile Provider.

<configuration><system.web><roleManager>

Settings for the custom ASP.NET Role Provider.

<configuration><system.web><sessionState>

Settings for the custom ASP.NET Session-State Provider.

<configuration><system.net><connectionManagement>

By default ASP.NET only allows 2 concurrent client requests, this is really inefficient as your Azure server instances has capabilities of processing many more simultaneous asynchronous requests. Because of this AzureProviders accepts 48 concurrent client requests by default, but you should really try and find the setting that works best for your solution. See http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83 for more information on the subject.

<configuration><system.net><settings>

By default ASP.NET uses the HTTP Expect 100-Continue pattern, which can be a performance issue if your HTTP operations are small, because of this AzureProviders has turned HTTP Expect 100-Continue off. See http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83 for more information on the subject.

Last edited Oct 14, 2011 at 6:04 PM by ihenriksen, version 18

Comments

No comments yet.