The following command can be used to delete all the sites in IIS Express appcmd.exe list site /xml | appcmd delete site /in
Category: Windows
All related to windows OS
Debugging HTTP 500 Internal server Error in web applications
The following are the possible reasons to be checked for There may be two <system.web> section in the web.config file Custom configSource pointing config files may not be present in the published directory Enable the <customErrors mode="Off"></customErrors> in the web.config file under the <system.web> section
Encrypting parts of web.config file in asp.net
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 ringEncryptionTest" SITE "ConnectionStringEncryptionTest" (id:4,bindings:http/*:99:,state:Started) CD to the directory … Continue reading Encrypting parts of web.config file in asp.net
To restore a Database from a bak file
In order to restore a database that was backed up from an existing server or a remote server, the following sql command can be used RESTORE DATABASE [MyDb] FROM DISK='C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\Backup\MyDb.bak' WITH MOVE 'MyDb' TO 'C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\DATA\MyDbdata.mdf', MOVE 'CelloV45_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL11.LOCAL\MSSQL\DATA\MyDblog.ldf'
Configuring AD FS 3.0 in Windows Server 2012 R2
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
Run a Program as Administrator
In order to run a program as an administrator in Windows 7, right click that application > Compatibility > Check the "Run this program as Administrator" option and then click on "Apply" and "Ok". The following screenshot shows the properties window.
Disable file preview in Visual Studio
In order to stop visual studio from showing a file preview on clicking the file in the solution explorer, we can turn it off using the following step Go To: Tools > Options > Environment > Tabs and Windows, you can disable it by unckecking "Solution explorer" under Preview tab. This is applicable only for … Continue reading Disable file preview in Visual Studio
Changing the System Date time from batch file
The following are the commands to change the system date time using the command prompt or from the batch files. @ECHO OFF REM - the following line is used to set the date given after date as the system date date 04/23/2014 REM - the following command prints the system date, just to make sure … Continue reading Changing the System Date time from batch file
Using IIS Express from the Command Line
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 … Continue reading Using IIS Express from the Command Line