Deploy Performance Counter Categories and Counters with the
The easiest way to incorporate performance counters in your .NET application is to use PerformanceCounter components. You can use these components to read values from existing predefined counters, such as memory or processor counters, and you can also read from and write to custom counters that you create. For example, you might use the Server Explorer to create a new performance counter category named MyApp, and then create counters for monitoring your application performance, such as...
Understand How SideBySide Issues Affect Serviced Components
As you update your serviced components, or if you have a scenario where multiple versions of the same component are on the same computer, you can encounter several issues caused by having these components installed side by side. To help you maintain your serviced components, you should adhere to the following advice Do not use globally unique identifiers GUIDs as the GuidAttribute class or ApplicationIDAttribute. Instead use the ApplicationNameAttribute. If you do use a GUID, you need to hard...
Deploy Instrumented Assemblies
If your solution uses Windows Management Instrumentation WMI features, you need to ensure that the core WMI is installed on your target computers. WMI is included as a standard feature in Windows XP, Windows 2000, and Windows Me. Additionally, it is automatically installed by Visual Studio .NET on Windows 95, Windows 98, and Windows NT 4.0. However, if your target computers do not have the core WMI installed, a setup package can be downloaded and installed from MSDN Code Center Note Although it...
COM Interop Deployment Considerations
The interoperability features of .NET allow you to work with existing unmanaged code that is, code running outside the CLR in COM components as well as Microsoft Win32 DLLs. It also allows you to use managed components from your unmanaged, COM-based code. When a .NET component is called from COM, the runtime generates a wrapper object to bridge the gap between the managed and unmanaged environments. In this case, the runtime reads the type information for the component from its assembly...
Package Managed Controls in CAB Files
The most appropriate way to package managed controls is to use a Visual Studio .NET CAB setup project. You can then simply copy the CAB file to your Web server and use the uniform resource locator URL for the CAB as the code base for the managed control in your Web pages. Managed controls are assemblies referenced from Web pages that are downloaded to the user's computer and executed upon demand. They add functionality to Web pages much like Microsoft ActiveX controls hosted in a Web browser...
Install Localized Versions of the NET Framework When Required
When installing Dotnetfx.exe on a computer running the Windows 98 operating system, you must install the localized version of Dotnetfx.exe that corresponds to the localized version of Windows 98 running on the computer. For example, you must install the German version of Dotnetfx.exe on a computer running the German version of Windows 98. This limitation applies only to Windows 98. You can install any language version of Dotnetfx.exe on any language version of Windows Millennium Edition Windows...
Comparing SMS and Active Directory Distribution Strategies
Table 5.4 describes the capabilities of Active Directory and SMS for key software distribution and management issues. Table 5.4 Comparing SMS and Active Directory Group Policies for Software Distribution Issue Active Directory Group Policies SMS Table 5.4 Comparing SMS and Active Directory Group Policies for Software Distribution Issue Active Directory Group Policies SMS Windows Installer events and messages are stored on the local computer, rather than in a central location. If an...
Set Project Properties for Your Windows Installer
To have your installer contain all of the information needed to install correctly, you should manipulate properties that control how your Windows Installer files interact with Windows Installer. The following list describes the Windows Installer file properties that you can manipulate with Visual Studio .NET AddRemoveProgramsIcon. Specifies an icon to be displayed in the Add Remove Programs dialog box on the target computer. This property has no effect when installing on operating systems such...
Deploy IIS Settings
One of the issues that you need to consider as you plan for how to deploy your ASP.NET applications is how to deploy IIS settings along with your solution. If you choose to deploy your Web application with copy operations, such as XCOPY, Windows Explorer, or FTP, IIS settings are not included with that deployment. You will need to apply any required settings separately. You can either do this manually or write IIS scripts for applying the settings to the Web folder. If you use the Visual Studio...
Use an Installer Class to Register Your Serviced Component
In most cases, the process that uses your assembly does not have the required privileges for dynamic registration to occur successfully. For example, when the assembly is used in a Web application, ASP.NET is not able to register your serviced component. ASP.NET does not run with administrative privileges by default unless you set it to run as SYSTEM, which is not recommended for security reasons so when your serviced component attempts to register, it fails with an access denied exception. To...
Deploy HTTP Handlers and HTTP Modules
ASP.NET provides the IHttpHandler and IHttpModule interfaces that allow you to use application programming interfaces APIs that are as powerful as the Internet Server API ISAPI programming interfaces available with IIS, but with a simpler programming model. Hypertext Transfer Protocol HTTP handler objects are functionally similar to IIS ISAPI extensions, and HTTP module objects are functionally similar to IIS ISAPI filters. ASP.NET maps HTTP requests to HTTP handlers. Each HTTP handler enables...
Use the Module Retargetable Folder to Allow Other Developers to Control where
By default, files in your merge modules are installed into the folder locations you specify when you build the .msm file. In some cases, you may want to allow the developer who uses your merge module some flexibility in deciding where files should be installed for their application. For example, if an assembly in a merge module is used by multiple applications, the consumer of the merge module may want to install it in the global assembly cache otherwise, they would install it in the...
Consider Packaging Multitiered Applications in Multiple Installers
For a multi-tiered application, you should build separate installers for each different physical tier. Building separate installers is appropriate for most scenarios because it is extremely complex and in some cases impossible to run an installer on one specific physical tier and have other physical tiers deployed to other computers as part of the same installation process. For example, if you are running the installer on your Web server, it is difficult to deploy your business-logic components...
Use Orca to Create Nested Installations
In certain circumstances, you might need to launch one .msi file from another. This is known as a nested installation. Windows Installer technology supports nested installs, but the setup and deployment projects do not currently natively support them. However, you can use Orca or another .msi file editing tool to add a nested installation action to the custom action table of your primary .msi file in order to have that .msi file launch another one. Nested installations are performed in the same...
Deploy Windows Services with the Servicelnstaller and ServiceProcesslnstaller
Microsoft Windows services, formerly known as Windows NT services, are long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. This makes Windows service applications ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. Windows service...
Deploy and Configure Message Queues with the MessageQueueInstaller Component
You can incorporate message queuing functionality into your .NET applications by using the MessageQueue component in Visual Studio .NET. You can then use the MessageQueueInstaller component to create and configure message queues for your application as you deploy to the production environment. The MessageQueueInstaller component deploys all the settings you have associated with your MessageQueue component, such as path, journal settings, label, and so on, and creates and configures the message...
Upgrade Your Merge Modules
Unlike Windows Installer files, Microsoft merge modules .msm files are not installed on their own. Instead, they are included in Windows Installer files. The components and setup logic you add to your merge module are incorporated with that of the Windows Installer file when the installer is built. Therefore, your merge modules do not interact directly with the Windows Installer service. If you modify the components you have included in a merge module, you need to Update and rebuild the .msm...
Deploy Event Logs with the EventLogInstaller Component
The easiest way to incorporate event logging into your .NET application is to use the EventLog component available in Visual Studio .NET. You can then use the EventLogInstaller component to install and configure the event log to which your application writes. The EventLogInstaller is used during deployment to write registry values that are associated with your event log. You can run the installation component either as a custom action in your Windows Installer file or with the Installutil.exe...
Manage the Deployment of Configuration Files
Configuration files can be used to store information about everything from process models, through application settings, to security and authentication models. There are three main types of configuration files Application configuration files. Application configuration files contain settings specific to an application. This file contains configuration settings that the CLR reads such as assembly binding policy, remoting objects, and so on , and settings that the application can read. The name...