Deployment

Setup/Deployment of .Net application

Deploy PDB files into production to ease exception report investigation.

For a long time I believed that PDB as a part of debugging information should not be included in production deployment. Recently my colleague suggested to copy them to simplify exception investigations. The following SO discussion convinced us that it is a good idea ( at least for web sites). http://stackoverflow.com/qu... These files will not be exposed to the public if kept in the right places (website\bin). ......

Using CTT to modify config files for different environments

We previously tried to use msbuild to adjust configuration files for different environments. Recently I found C onfig Transformation Tool(CTT) on CodePlex and with addition of global replace using powershell it is enough and easier to do all required modifications Content of ChangeConfig.cmd: ctt s:..\web.config t:WebConfig.CTT d:..\web.config powershell.exe -command "Get-Content ..\Remoting.config | ForEach-Object { $_ -replace '//localhost/ServicesCI/', '//ServerName01/ServicesCI/' } | Set-Content ......

MSbuild Task FileUpdate to replace content in text files

I wanted to replace some strings in files using my deployment MSbuild script. I've noticed that MSBuild Community Tasks Project has RegexReplace task. But when I've looked in documentation (By the way, it will be good if Reference help will be available online, not only from download) I've realized that the task is applicable for strings(e.g file names) not to content within a file. Almost accidently in one of the posts i've found a reference to FileUpdate task, that support Regex and does content ......

EntitySpaces API: How to get esQueryItem column name.

In constructor columnName is passed as parameter. public esQueryItem ( esDynamicQuery query, string columnName ) However I wasn't able to fint the property ColumnName or something similar.After some time I understood, that they use implicit operator stringpublic static implicit operator string ( esQueryItem item ) which does the magic. However the explicit read-Only property ColumnName will be useful. By the way the help shows 2 different operators as the sameImplicit(esQueryItem)To... (to use ......

Error in WEBCA_SetTARGETSITE during installation of Web Setup Project on Vista.

I have a MSI package created using Visual Studio 2005 Web Setup Project on Windows 2003 Server. When I tried to install it on Vista(home premium) with IIS7 installed, the setup failed with Action ended: WEBCA_SetTARGETSITE. Return value 3. Fortunately, when I've installed the optional "IIS 6 Management Compatibility" option within IIS7, the installation succeeded ......

Update appSettings in App.Config for executable.

I wanted programmatically (for administrator) to update configuration settings for .Net 2.0 executable. The new in VS 2005 Properties.Settings class saves only user-scope settings, not application scope, which is inconvinient. I've decided to use The easiest way to read/write AppSettings from the very good article Read/Write App.config with .NET 2.0/Enterprise Library However I noticed two issues: config.AppSettings.Settings (KeyValueConfigurationColle... class) has Add and Remove methods, but ......

Invoke Executable as custom action during Install.

I've used MS Installer class to provide custom actions during setup in a few projects(e.g.see Using VS 2005 Web Setup Project with custom actions).However if you have some complex logic to do as a part of setup, it is possible that some exception will occur. I don't like to hide exceptions, and they are shown to the user,causing installation to rollback. It is not good, becuse sometimes user wants to ignore exception and use installation even if some custom action failed.I found that moving code ......

Batch to Logging Worker Process Recycling Events in IIS 6.

I want to log Worker Process Recycling Events in IIS 6.0 (IIS 6.0) , but ther is no UI for this. I've created batch file and decided to post it here, because current instructions have a few typos.You should modify value of AppPoolName as appropriate. :rem IISLoggingWorkerProcessRecy... from http://www.microsoft.com/te... EnableEvent=trueset AppPoolName=ASP.NET v2.0%systemDRIVE%cd %systemDRIVE%\inetpub\admin... ......

Intermittent execution of custom action for installation of product upgrade.

I've recently posted Custom action condition to run for a new or upgraded product., but I found that the custom action doesn't always call executable. I removed any custom action conditions, but it still doesn't always produced the same resultI had to install ORCA, and found that my Custom Action has source _5C6AF63299974A76AD78EA44FC... (reference to MSIAssembly table ) and type 1042(Custom Action Type 18 + msidbCustomActionTypeInScript 1024)The CustomAction guid key has entry in InstallExecuteSequence ......

Custom action condition to run for a new or upgraded product.

I have a custom action condition (in Visual Studio Web Setup Project) that I want to run for installation of a new or upgraded product. I do not want to run it on repair (and also during uninstall). First of all I tried “Not Installed” condition. But it doesn't work for version upgrade. I've tried Not Remove=”ALL” but it also doesn't work for version upgrade( it seems that deleting previous version set the property Remove=”ALL”) I've tried UPGRADINGPRODUCTCODE ......

How to open web.config file from custom action installer class, located in DLL.

One of the readers of the my post "Using VS 2005 Web Setup Project with custom actions" asked how to pick web.config file. that is actually part of the web project, from custom action installer class located in a separate DLL. With an assumption that DLL with installer class located in the BIN folder of the web project , you can do the following: Dim asm As System.Reflection.Assembly = System.Reflection.Assembly.... sConfigFileName As String = FSHelperLib.AppSettingsHelp... ......

Set a property for ISSWebFile in subfolder.

Recently I posted class that I am using to Programmatically set IIS Authentication for a page. Later I found that initial implementation almost never worked because files in subfolders usually do not have explicit entries in the metabase, but inherit all properties from the parent. I've added code to create metabase entry (similar to this). But if the file is in subfolder, not in the virtual directory, adding the SchemaClassNames="IIsWebFile" doesn't work (see discussion Creating Virtual Directories ......

Configuration.Save Method parameters combination

I've reported to MS that documentation of Configuration.Save Method (ConfigurationSaveMode, Boolean) is not detailed enough and they provided the clarification: The ConfigurationSaveMode parameter can have one of the following values: Full Causes all properties to be written to the configuration file. This is useful mostly for creating information configuration files or moving configuration values from one machine to another. Minimal Causes only properties that differ from inherited values to be ......

Using Configuration.Section to access subsection

I have a section in Web.Config: <applicationSettings> <FSBsnsCsLib.Properties.... ... </FSBsnsCsLib.Properties... </applicationSettings> I've tried to access inner section using shortcut “Section/Subsection&#... string sSectionName="applicationSe... sectSettings = (ClientSettingsSection)conf... but it returned null. The correct way is the following: const ......

Setup of new version using .Net 2.0 causes System.BadImageFormatException

I had a .Net 1.1 application with Setup project and RemovePreviousVersions=true. After I converted it to .Net 2.0, I've tried to install it on machine where previous version was installed. It caused System.BadImageFormatException exception. I believe that new .Net 2.0 Setup failed to uninstall .Net 1.1 application due to .Net framework versions mismatch. I've desided to change UpgradeCode, that will be considered as new application, and it allowed me to install new version. Alternatively user can ......

Dynamic Web Services reference URL in Visual Studio 2005

I am using dynamic URLBehavior for some web services and during Setup change web services URLs to appropriate value (based on MSDN article). According to MSDN2: If you set the URL behavior of the Web reference to dynamic, the application obtains the URL at run time from the appSettings element of your application's configuration file. However I've noticed that app.config file has entries for the same URL in both appSettings and <applicationSettings>. After reading the generated code (Reference.vb/cs) ......

«July»
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789