In order to encrypt the parts of web.config file, esp: connectionStrings section the following command can be executed
Note down the name of the site in the IIS Web Server [Ex: ConnectionStringEncryptionTest]
Open windows command prompt as an administrator,
Execute the following command
C:\Windows\system32>%systemroot%\system32\inetsrv\APPCMD list site “ConnectionSt
SITE “ConnectionStringEncryptionTest” (id:4,bindings:http/*:99:,state:Started)
CD to the directory where the source code resides, and then execute the following command from a Visual Studio command prompt, again running as “Administrator”
aspnet_regiis.exe -pe "connectionStrings" -app "/" -site "4"
In case of the site being hosted in the default web site, we can use the “-app” parameter alone instead of the -site parameter.
Encryption Note 1
The following screenshots illustrate the various steps to get started with AD FS 3.0
Steps to get started with AD FS 3.0
- Create a web app [MVC 5] in VS
- Enable SSL and copy the URL
Add-AdfsClient -ClientId MyWebClient -Name MyWebClient -RedirectUri “https://localhost:44302/authcallback”
Hope this helps
The following code snippet can be used to run the IIS Express [8.0] in my case to be run from the command line.
The parameters are the path to the main directory, the target libraries [dll’s] should be in a folder called as “bin” inside this given path for the IIS to pick up and run.
The other parameter is the “port” which specifies which port should IIS Express listen for the incoming request. It also logs in the requests and the response status etc in the command line.
Sample : c:\Program Files\IIS Express>iisexpress.exe /path:”C:\Users\Saravanan\Documents\Visual Studio 2012\Projects\console_app_in_iis\console_app_in_iis” /port:8089