
- Weather web slices how to#
- Weather web slices install#
- Weather web slices full#
- Weather web slices password#
In this sample, we will use ASP.NET Membership to store the user credentials. DEMO 2 - Using cookies to store user credentials (ASP.NET Membership)Ĭookie-based authentication is flexible and easy to implement however, you should not save any sensitive information (for example, username and password) in plain text in order to avoid security prompts.ĭownload source code: FormsAuthentication.zip
Weather web slices how to#
The next scenario demonstrates how to save sensitive information more securely.
Weather web slices full#
You have full control over cookies from the Web Slice code however, you should avoid storing username and passwords in plain text inside a cookies, as cookies can be easily modified or attached from a malicious user. WebSlice_StoringProfile.Style = color įigure 3: Reading profile from the Web Slice The background color of the Web Slice is set by : protected void Page_Load(object sender, EventArgs e)

The ProfileProvider class simplifies the interaction with the CookieHelper class by providing two methods: GetColor and SaveColor. The CookieHelper class (Figure 1) encapsulates these actions to allow you to more easily read, write, and delete cookies. Likewise, to delete a cookie, subtract a year from its expiration date.

In order to make a cookie persistent across different browser sessions, you need to specify the cookie's expiration, such as: public static void WriteCookie(HttpCookie cookie)Ĭookie.Expires = (31)

Although this demo has been built by using ASP.NET 3.5, you can adapt this concept to any other Web technology or language. This allows us to render different content in the Web Slice preview window. The Web Slice in this demo uses an alternative display view. For more information, please refer to ASP.NET Cookies Overview overview. In this sample we use cookies to store the user profile in the Web site and later retrieve the same information from within the Web Slice. You can use cookies to store non-sensitive information, user preferences, Web Slice settings, and so on. Visual Studio Web Developer 2008 Express EditionĭEMO 1 - Using cookies to store user profileĬookie-based authentication is broadly supported and works regardless of the security settings of the Web Slice.
Weather web slices install#
In order to run and build the samples, you will need to install one or more of the following: You will find three different demos attached to this article, one for each of these scenarios. Web Slices in Internet Explorer 8 can authenticate to their Web site using any of the following:
Weather web slices password#
For example, a Web Slice could automatically supply a username and password in order to retrieve email from a Web server. Many scenarios require some sort of security layer to authenticate the user by remembering credentials across different browsing sessions, a Web Slice becomes more user-friendly. Web Slices can leverage some of the security features of a standard Web page or Really Simple Syndication (RSS) feed.

To learn how to create Web Slices, refer to Subscribing to Content with Web Slices. Web Slices allow you to subscribe to parts of a Web page and view updates directly from the Internet Explorer Favorites bar.
