background preloader

Asp.net

Facebook Twitter

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version. When you use the fully qualified domain name (FQDN) or a custom host header to browse a local Web site that is hosted on a computer that is running Microsoft Internet Information Services (IIS) 5.1 or a later version, you may receive an error message that resembles the following: HTTP 401.1 - Unauthorized: Logon Failed This issue occurs when the Web site uses Integrated Authentication and has a name that is mapped to the local loopback address.

You receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version

Note You only receive this error message if you try to browse the Web site directly on the server. If you browse the Web site from a client computer, the Web site works as expected. Additionally, an event message that resembles the following event message is logged in the Security Event log. Note Sometimes, the strange characters that appear in this event message may resemble the following characters: Ðù² Error while trying to run project: Unable to start debugging on the web server. . ( ) How to back up and restore the registry in Windows ( ) ( ) ( )

La connexion à un partage SMB sur un serveur Windows 2000 peut ne pas fonctionner avec un nom d'alias. Page de démarrage de Mozilla Firefox. C# - Limit URL Parameter Length in Web.Config. ASP.NET Session State. Rob Howard Microsoft Corporation December 28, 2000 Note The code in this article is targeted for the beta version of Microsoft .NET.

ASP.NET Session State

Some of the code may require reworking in order to function correctly on later versions of the .NET Framework. In this month's column we're going to pick up the pace a bit and dive straight into some of the new features of ASP.NET. We'll start by comparing ASP.NET session state with classic ASP, then show code and examples for how you can configure and use ASP.NET session state. A session is defined as the period of time that a unique user interacts with a Web application. Programmatically, session state is nothing more than memory in the shape of a dictionary or hash table, e.g. key-value pairs, which can be set and read for the duration of a user's session. Session("Stocks") = "MSFT; VRSN; GE" On subsequent pages these values are read and the Web application has access to these values without the user re-entering them: Save Scroll Position ASP.NET. This is my way to save the scroll position during a postback.

Save Scroll Position ASP.NET

This code will only save the horizontal scroll position. The concept here is I was doing "freeze panes" and on the right side where you could scroll the columns I needed to save the position of the div where it was scrolled at during a postback. The postback was initiated by sorting columns. So this is how I went about doing it and hope it works well for others out there. First we need a hidden field on the page like this: This field can be anywhere you want on the page it doesn't matter Next we need a piece of javascript as follows: function getScrollPosition() { Automatic Cookie Handling C#/.NET HttpWebRequest+HttpWebResponse. How to: Send Data Using the WebRequest Class. HttpRuntime.Cache vs. HttpContext.Current.Cache - Peter Johnson's Blog. Here's a development tip I came across on one of the ASP.NET discussion lists I'm on, at AspAdvice.com.

HttpRuntime.Cache vs. HttpContext.Current.Cache - Peter Johnson's Blog

Original question: Is there a difference in accessing the Cache of an application when calling HttpRuntime.Cache vs. HttpContext.Current.Cache? I "think" I remember reading about a difference in the two a few years ago, but I don't remember the specifics. This assumes that I am within a web application. Answer from Rob Howard: HttpRuntime.Cache is the recommended technique. Calling the HttpContext does some additional look-ups as it has to resolve the current context relative to the running thread. I use HttpContext.Current in a lot of the code I write too; but touching it as little as possible.

If you're in a component HttpRuntime.Cache is still the recommendation. That said... the differences in performance are not going to be noticeable in 99% of the applications many of us write. Check box Object, dom Checkbox events - Javascript (JS) Tutorial. Dynamically Created Controls in ASP.NET. I spent some time before I found a pattern to work with dynamically created controls in ASP.NET that satisfied my requirements.

Dynamically Created Controls in ASP.NET

I tried multiple approaches and faced multiple problems. If you'd like to avoid getting into the same problems I got, learn about them here first. Why Dynamically Created Controls? While its much easier to create web pages with static controls in ASP.NET, you may need to make your application flexible enough to support custom fields. For example, you may need to generate different form layouts for different report templates. Scenario 1: Creating Controls on Page_Init Event It is the best practice to create controls dynamically in the Page_Init handler.

Vue d'ensemble de l'état de session ASP.NET. Variables de session Session["FirstName"] = FirstNameTextBox.Text; Session["LastName"] = LastNameTextBox.Text; // When retrieving an object from session state, cast it to // the appropriate type.

Vue d'ensemble de l'état de session ASP.NET

ArrayList stockPicks = (ArrayList)Session["StockPicks"]; // Write the modified stock picks list back to session state. Session["StockPicks"] = stockPicks; Identificateurs de session SessionID sans cookie Régénération des identificateurs de session expirés. Vue d'ensemble des cookies ASP.NET. Un cookie est un texte court qui accompagne les demandes et les pages entre le serveur Web et le navigateur. Il contient des informations que l'application Web peut lire chaque fois que l'utilisateur visite le site.

Par exemple, lorsqu'un utilisateur demande une page de votre site, si votre application envoie, en plus de la page, un cookie contenant la date et l'heure, le navigateur de l'utilisateur récupérera la page plus le cookie, qu'il stockera dans un dossier du disque dur local.