How to: Decrypt a web.config File

The Web services of Microsoft Dynamics Mobile - Server Components can be configured by using Internet Information Services (IIS) Manager, or by editing the web.config files for the Web services. During the installation of Microsoft Dynamics Mobile - Server Components, you can encrypt the web.config files, and you can then decrypt them later because you want to make changes to the configuration after installation. The web.config files can be encrypted and decrypted at any time.

This topic describes how to decrypt an encrypted web.config file

To decrypt the web.config file for the deployment and logging service

  1. In a command prompt, navigate to the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder.

    This folder contains the aspnet_regiis.exe administration utility that allows you to modify ASP.NET settings.

    NoteNote

    If you have installed the .NET Framework to a different location, change the path accordingly.

  2. Type the following string.

    aspnet_regiis.exe -pd "connectionStrings" -app "/VIRTUALFOLDER" 
    

    In the example, VIRTUALFOLDER is a placeholder for the name of the virtual folder for this Web service that you specified during installation.

    For example, if the name of the logging service virtual folder is LoggingService, the following code illustrates the command.

    aspnet_regiis.exe -pd "connectionStrings" -app "/LoggingService"
    

To decrypt the web.config file for the document service

  1. In a command prompt, navigate to the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder.

    This folder contains the aspnet_regiis.exe administration utility that allows you to modify ASP.NET settings.

    NoteNote

    If you have installed the .NET Framework to a different location, change the path accordingly.

  2. Type the following string.

    aspnet_regiis.exe -pd "appSettings" -app "/VIRTUALFOLDER" 
    

    In the example, VIRTUALFOLDER is a placeholder for the name of the virtual folder for this Web service that you specified during installation.

    For example, if the name of the document service virtual folder is DocumentService, the following code illustrates the command.

    aspnet_regiis.exe -pd "appSettings" -app "/DocumentService"
    

To decrypt the web.config file for the management service

  1. In a command prompt, navigate to the C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder.

    This folder contains the aspnet_regiis.exe administration utility that allows you to modify ASP.NET settings.

    NoteNote

    If you have installed the .NET Framework to a different location, change the path accordingly.

  2. To decrypt the encryption key section, type the following string.

    aspnet_regiis.exe -pd "appSettings" -app "/VIRTUALFOLDER"
    

    In the example, VIRTUALFOLDER is a placeholder for the name of the virtual folder for this Web service that you specified during installation.

    For example, if the name of the management service virtual folder is MobileServerManagement, the following code illustrates the command.

    aspnet_regiis.exe -pd "appSettings" -app "/MobileServerManagement"
    
  3. To decrypt the database connection string section, type the following string.

    aspnet_regiis.exe -pd "connectionStrings" -app "/VIRTUALFOLDER" 
    

    In the example, VIRTUALFOLDER is a placeholder for the name of the virtual folder for this Web service that you specified during installation.

    For example, if the name of the management service virtual folder is MobileServerManagement, the following code illustrates the command.

    aspnet_regiis.exe -pd "connectionStrings" -app "/MobileServerManagement"
    

Security

We recommend that you encrypt the web.config files. You can do this either as part of the installation process, or at a later time when you have completed configuring your solution. For more information, see How to: Encrypt a web.config File.

See Also

Show: