Na versão 2.0 do ASP.NET, com a grande gama de controles a nosso dispor para melhor trabalharmos o front-end (UI), temos ainda classes para manipular os usuários em nossa Base de Dados. Classes que utilizam o Provider Model Design Pattern, e assim conseguÃmos ter um código genérico, independentemente de que Banco de Dados (ou qualquer outro tipo de repositório) estamos a utilizar na nossa aplicação. Assim como o Profile, o ASP.NET também utiliza o Providers para gerenciar a segurança, sendo eles, dois providers: MembershipProvider e o RoleProvider. O MembershipProvider é utilizado para gerir os usuários (armazenando, criando, excluindo e alterando) …
aspnet_regsql
ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe) The ASP.NET SQL Server Registration tool is used to create a Microsoft SQL Server database for use by the SQL Server providers in ASP.NET, or to add or remove options from an existing database. The Aspnet_regsql.exe file is located in the [drive:]\WINDOWS\Microsoft.NET\Framework\versionNumber folder on your Web server. You can run Aspnet_regsql.exe without any command-line arguments to run a wizard that will walk you through specifying connection information for your SQL Server installation, and installing or removing the database elements for the Membership, Role Manager, Profile, Web Parts Personalization, and Health Monitoring features. (Setting session …
ASP to ASP.NET: Code Behind
Os arquivos criados em ASP.NET possuem a extensão .aspx . Você pode usar qualquer editor de texto para digitar o código de uma página ASP.NET. No ASP tinhamos o código que era executado dentro das tags que atualmente não é mais compilado e seu uso não aconselhado, pois evita a mescla de código de servidor juntamente com o código HTML. Uma das grandes inovações é o CodeBehind . Com ele é possÃvel separarmos o código da programação do código HTML. O CodeBehind (neste artigo escrito em VB.Net) ao compilar o aplicativo esse código é “encapsulado” dentro da DLL, sendo necessário …
ATLAS
“Atlas” is a free framework for building a new generation of richer, more interactive, highly personalized standards based Web applications. This new Web development technology from Microsoft integrates client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ‘Atlas’ offers you the same type of development platform for client-based Web pages that ASP.NET offers for server-based pages. And because ‘Atlas’ is an extension of ASP.NET, it is fully integrated with server-based services. “Atlasâ€? makes it possible to easily take advantage of AJAX techniques on the Web and enables you to create ASP.NET pages with a rich, responsive UI …
Ajax (AJAX – Asynchronous Javascript And Xml)
Mas afinal, o que é esse tal de Ajax? Ajax é a abreviação de Asynchronous JavaScript And XmlHttpRequest e se você nunca ouviu falar dessa tecnologia, é bom correr e começar a dar uma olhada em sites como o Gmail, Google Earth, dentre outros. É claro que a Microsoft, que está atenta a esses “detalhes” não ficaria simplesmente olhando tudo acontecer, e tchã tchã tchã tchã… Atlas. Mas isso é assunto para um próximo artigo. Para os interessados, podem dar uma olhada no endereço Atlas. Mas voltando ao Ajax, essa não é uma tecnologia recente pra falar a verdade, mas …
ASP.NET 2.0 (Whidbey) new features
Uma mudança fundamental no processo de desenvolvimento é a possibilidade de se criar aplicações web SEM A NECESSIDADE DE SE TER O IIS INSTALADO. Isto se deve ao fato de o Whidbey possuir seu próprio servidor web embutido de forma que não é necessário o acesso administrativo para o debug das aplicações. Este servidor visa, entre outros objectivos, aumentar a segurança no desenvolvimento uma vez que estas aplicações não poderão ser acedidas remotamente, só estando disponÃveis ao navegador local. Ao se fechar o Whidbey, o servidor embutido é removido da memória. Este recurso não proÃbe à queles que desejam continuar …
Purpose of Session variables
In most of the web sites, when a user log In in the login page, they set few variables to session. if (bLoginSuccess = true) then Session(“UserId”) = txtLoginName.Text Session(“Name”) = GetUserNameFromDatabase(txtLoginName.Text) else Response.Redirect (“LoginError.aspx”) end if The above code stores the user’s userid into a session variable called “UserId”. All other pages will check if the user id is set in the session and if not, it will give an error message saying “you have not logged in”. dim userId as string = Session(“UserId”) if ( userId = “” ) then Response.Redirect(“Login.aspx”) else Response.Write (“Welcome ” & Session(“Name”)) end …
ASP.NET Session Object
ASP.NET provides a class called HttpSessionState, which is part of the namespace System.Web.SessionState. Just like Request and Response objects, an HttpSessionState object is also created automatically for you in ASP.NET pages. This object is called “Session”. You can access various methods and properties of this object. What is in a session ? A session has several information including a session ID. Some information is created and used by the server itself. But the most important use of session is, it allows to store custom information. You can store any key-value pairs in session. How to store and retrieve values in …
ASP.NET Session Object
ASP.NET provides a class called HttpSessionState, which is part of the namespace System.Web.SessionState. Just like Request and Response objects, an HttpSessionState object is also created automatically for you in ASP.NET pages. This object is called “Session”. You can access various methods and properties of this object. What is in a session ? A session has several information including a session ID. Some information is created and used by the server itself. But the most important use of session is, it allows to store custom information. You can store any key-value pairs in session. How to store and retrieve values in …
SQL Server: TIMESTAMPS
The SQL Server timestamp data type has nothing to do with times or dates. SQL Server timestamps are binary numbers that indicate the relative sequence in which data modifications took place in a database. The timestamp data type was originally implemented to support the SQL Server recovery algorithms. It further states Never use timestamp columns in keys, especially primary keys, because the timestamp value changes every time the row is modified. I’d suggest using a DATETIME or SMALLDATETIME column in this case. DATETIME columns can store dates from January 1st, 1753 through December 31st, 9999 (there’s that Y10K problem) and …