.NET news » Search results
Search results for query "data access" (34):
Custom Paging in ASP.NET 2.0 with SQL Server 2005
AllowPaging property to True and add a few lines of code in the PageIndexChanged
event handler and you were done! ASP.NET 2.0's
GridView makes
the process even simpler - just check the Enable Paging option from the GridView's smart tag - no code needed.
Of course nothing is free in life, and the tradeoff you make with the ease of checking a checkbox to enable paging (or, in the DataGrid's case, writing a couple lines of code) is performance. Out of the box, the DataGrid and GridView use default paging, which is a simple paging model that returns all of the records for each every page of data shown. When paging through small amounts of data (dozens to a hundred or so records), this inefficiency is likely outweighed by the ease of adding the feature. However, if you want to page through thousands, tens of thousands, or hundreds of thousands of records the default paging model is not viable.
The alternative to default paging is custom paging, in which you are tasked with writing code that intelligently grabs the correct subset of data. It requires a bit more work, but is essential when dealing with sufficiently-sized data...
Integrating .NET Code and SQL Server Reporting Services
SQL Server Reporting Services versions 2000 and 2005 (SSRS) has many powerful features. SSRS has a well-designed data access engine, a great set of layout tools, and an excellent expression system for creating complex formulas. While the expression system is quite powerful it is not suitable for all applications. This is where SSRS shines. SSRS gives developers the ability to add custom code to their report layouts. This article demonstrates adding custom code to SQL Server Reporting Services reports.
Encrypting Configuration Information in ASP.NET 2.0 Applications
When creating ASP.NET 2.0 applications, developers commonly store sensitive configuration information in the Web.config
file. The cannonical example is database connection strings, but other sensitive information included in the Web.config
file can include SMTP server connection information and user credentials, among others. While ASP.NET is configured, by default,
to reject all HTTP requests to resources with the .config extension, the sensitive information in Web.config
can be compromised if a hacker obtains access to your web server's file system. For example, perhaps you forgot to disallow
anonymous FTP access to your website, thereby allowing a hacker to simply FTP in and download your Web.config file.
Eep.
Fortunately ASP.NET 2.0 helps mitigate this problem by allowing selective portions of the Web.config file to be
encrypted, such as the section, or some custom config section used by your application.
Configuration sections can be easily encrypted using code or aspnet_regiis.exe, a command-line program. Once
encrypted, the Web.config settings are safe from prying eyes. Furthermore, when retrieving encrypted congifuration
settings programmatically in your ASP.NET pages, ASP.NET will automatically decrypt the encrypted sections its reading. In short,
once the configuration information in encrypted, you don't need to write any further code or take any further action to use
that encrypted data in your application.
In this article we'll see how to programmatically encrypt and decrypt portions of the configuration settings and look at
using the aspnet_regiis.exe command-line program. We'll then evaluate the encryption options ASP.NET 2.0 offers.
There's also a short discussion on how to encrypt configuration information in ASP.NET version 1.x.


Syndicate