|
|
ASP.NET process recycling
|
Total Hit (1850) |
Application recycling is a great feature that lets you configure an application so that ASP.NET automatically shuts it down and restarts it after a given period or a given number of client requests, or when it consumes more memory than the specified threshold. This feature is a lifesaver if the appl
....Read More |
Rating
|
|
|
Centralize ASP.NET settings in one file
|
Total Hit (1841) |
Although ASP.NET lets you distribute web.config files over all the application's subdirectories, it surely doesn't force you to do so. You can keep all the application settings in its main web.config file, while enforcing different settings on a directory-by-directory base, if you want. The key to t
....Read More |
Rating
|
|
|
Change script timeout through ASP.NET configuration files
|
Total Hit (4515) |
The httpRuntime tag in ASP.NET configuration files lets you determine several behaviors of ASP.NET at the machine or site, including the global value for script timeout. Here's the complete syntax for this tag:
«Code LangId=4»
<httpRuntime executionTimeout="seconds"
maxRequestLengt
....Read More |
Rating
|
|
|
Prevent unauthorized changes to ASP.NET configuration files
|
Total Hit (1843) |
Some ASP.NET settings are so critical that the system administrator should prevent them from being changed by individual applications. This ability is especially crucial for servers that host multiple applications written by different developers. In this case, the administrator can prevent undesired
....Read More |
Rating
|
|
|
Reduce Server Too Busy errors with the httpRuntime tag
|
Total Hit (2768) |
The httpRuntime tag in ASP.NET configuration files lets you determine several features of ASP.NET at the machine or site level, including the how ASP.NET uses multi-threading. Here's the complete syntax for this tag:
«Code LangId=4»
<httpRuntime executionTimeout="seconds"
maxReques
....Read More |
Rating
|
|
|
Registering ASP.NET on IIS after installing the .NET Framework
|
Total Hit (1999) |
If you install the .NET Framework on a system that has IIS already installed, IIS is automatically configured to handle requests to ASP.NET pages, and to redirect the execution to the ASP.NET runtime. However, it may happen that you installed the framework on a Windows 2000 Professional system where
....Read More |
Rating
|
|
|
Use custom error pages in ASP.NET
|
Total Hit (1939) |
The tag in ASP.NET configuration files affects how error pages are managed in an ASP.NET application and whether developers can redirect users to their custom error pages when an exception is thrown. The syntax for this tag is:
<customErrors mode="On|Off|RemoteOnly" defaultRedirect="url">
<e
....Read More |
Rating
|
|
|
Associating a custom bitmap to a web or Windows custom control
|
Total Hit (2861) |
When you create a custom Windows or Web control, compile it and add it to the Visual Studio .NET's Toolbox, the control is added to the toolbox with a default bitmap representing a gear. This might be fine if you're developing the controls for your own use, but it surely isn't what you want if you'r
....Read More |
Rating
|
|
|
|
Relative Urls in user controls
|
Total Hit (2711) |
Urls that you set in user-control's child controls are relative to the user control's directory, not to the host page's directory. Say for example that you have an user-control located under the /UserControls directory, and the host page under the / root directory. The user-control exposes a custom
....Read More |
Rating
|
|
|
Calling web services from behind a proxy server
|
Total Hit (2136) |
When you use a web service's proxy class, the calls to the web service might fail if you're behind a proxy server. To solve the problem, you set the Proxy property of a web service's proxy class to an instance of WebProxy, that contains the HTTP proxy settings needed for the web method calls. Here's
....Read More |
Rating
|
|
|
Make read-only properties visible to Web Services clients
|
Total Hit (2102) |
Read-only and write-only properties in a Web Service class aren't visible to the Web Service client. The reason is that XML serialization doesn't support these sort of properties, and read-only and write-only properties aren't included in the Web Services Description Language (WSDL) documentation.
....Read More |
Rating
|
|
|
Disable .NET security
|
Total Hit (2086) |
The .NET Framework enforces secuity at several levels. For example, assemblies downloaded from the Internet have very limited permissions (especially after installing the Service Pack 1 of the Framework). This means that many operations that would be legal in some cases may throw an exception in oth
....Read More |
Rating
|
|
|
Correct installation of Server service on Windows NT4 for SQL
|
Total Hit (2761) |
It is especially important to correctly set Windows NT4's Server service in "Application Server" mode to ensure that the Server service doesn't absorb all the available hardware resources while providing network services for file management. As its name suggests, when in "Application Server" mode, r
....Read More |
Rating
|
|
|
Enumerate all the indexes in a SQL Server database
|
Total Hit (4094) |
The indexing schema plays a fundamental role in performance tuning, and tools such as the Index Tuning Wizard that can suggest efficient schemas on the grounds of a database usage. Once the indexing schema has been completed, you should document it in order to know which tables have primary keys, wh
....Read More |
Rating
|
|
|
Enumerate the users' rights on a DB's objects
|
Total Hit (2808) |
SQL Server provides several security levels, and the control that the system administrators can pursue over the DB's objects is extremely accurate. It's often useful to know which rights each user has. As you might know already, a lot of administrative SQL Server tasks can be performed through the p
....Read More |
Rating
|
|
|
Extract records by their record number
|
Total Hit (3001) |
SQL Server, and the SQL language in general, doesn't support record numbers, so you can't extract a set of records if you know their position in the resultset. This missing capability would be extremely convenient when displaying pages of data in an ASP program. For example, if each page contains 10
....Read More |
Rating
|
|
|
How to improve performance with pinned tables
|
Total Hit (2592) |
SQL Server experts know that the DB engine never accesses directly the data pages on disk; rather it uses a special module called "Cache Manager". It is possible, by using some T-SQL commands, to force the selected tables to stay in the buffer for a longer time. This technique increases the performa
....Read More |
Rating
|
|
|
How to restore a SQL Server database marked as "suspect"
|
Total Hit (10827) |
At times a database appears to be marked as "suspect" in the Enterprise Manager. SQL Server marks a database as suspect with it can't access the database. What happens at a low level is that SQL Server sets one of the bits in the status field in the sysdatabases table.
In general, this problem ha
....Read More |
Rating
|
|
|
Improve I/O throughput of intelligent subsystems to favor SQL Server
|
Total Hit (2491) |
One of the peculiar features of Microsoft SQL Server is its capability to keep alive multiple threads at the same time for performing I/O operations. The configuration options that affects how many threads available for these operations is max async IO. The default value for this option is 32, which
....Read More |
Rating
|
|
|
|
Perform an MSDE database backup through Transact-SQL
|
Total Hit (2712) |
The MSDE database engine is 100% compatible with SQL Server and subject to the same license policy of the Jet engine. One of the fundamental differences between MSDE and SQL Server is the lack of any graphical tool for the administration. Many users take advantage of Access 2000 as administrative fr
....Read More |
Rating
|
|
|
Restore the SQL Server master database
|
Total Hit (2863) |
Restoring a corrupted master database is one of the most difficult tasks you may have to deal with. If this catastrophic event happens, here's how to proceed.
First, you need to rebuild the master database. Details on this operation depend on the SQL Server version you run. With SQL Server 6.5 t
....Read More |
Rating
|
|
|
|
Creating a scrollable DataGrid
|
Total Hit (2924) |
When you create a DataGrid, it would be often good to specify its height, and have the DataGrid show a scrollbar if the content is longer than the given height. This would allow to make up a fixed layout that doesn't get messed up if there are a few or a lot of lines/records to show. The DataGrid co
....Read More |
Rating
|
|
|
Hiding controls defined within templates to some users
|
Total Hit (2704) |
It happens frequently that you want to hide some input controls or links if the current user is not logged in (it runs with the anonymous account), or if the logged user is not a member of a specific group. For example, you may want to hide the Edit/Delete buttons to users that are not Administrator
....Read More |
Rating
|
|
|
Implementing a two-way sorting for the DataGrid control
|
Total Hit (2692) |
DataGrid's sorting functionality is not automatic, the control takes care of "just" rendering the column headers as hyperlinks, and gives you the ability to handle the click on those links, by means of the SortCommand event. Then you manually sort the records (by means of a new DataView from an exis
....Read More |
Rating
|
|
|
Moving the focus on a control when the page loads
|
Total Hit (2614) |
ASP.NET doesn't provide a built-in method for giving a control the input focus when the page loads. In fact, you can assign the TabIndex properties to controls on a page, but you can't use this property to set the initial focus on a control of your choice.
The following procedure provides you wit
....Read More |
Rating
|
|
|
Showing a graphical checkmark on DataGrid's boolean columns
|
Total Hit (2711) |
While working with template-based controls such as the Repeater, DataList or DataGrid, it often happens that you don't want to show just plain text as it is retrieved from the data source, but want to interpret the data and represent it in other ways. For example, you may want to show a graphical ch
....Read More |
Rating
|
|