Skip to main content

Posts

Showing posts with the label IIS

How to set up an HTTP/HTTPS redirect in IIS

In order to force a secure connection on our website, it is necessary to set up a certain HTTP/HTTPS redirection rule. This way, anyone who enters your site using a link like “domain.com” will be redirected to “https://domain.com” or “https://www.domain.com” (depending on your choice) making the traffic encrypted between the server and the client side. Steps to setup an IIS HTTPS redirect: Download and install the URL Rewrite module. Open the IIS Manager console and select the website you would like to apply the redirection to in the left-side menu: Double-click on the URL Rewrite icon. Click Add Rule(s) in the right-side menu. Select Blank Rule in the Inbound section, then press OK. Enter any rule name you wish. In the Match URL section: Select Matches the Pattern in the Requested URL drop-down menu Select Regular Expressions in the Using drop-down menu Enter the following pattern in the Match URL section: (.*) Check ...

IIS, Registering the ASP.Net with IIS server

You need to start command prompt by typing cmd at the Run command and then execute the command prompt with Administrator rights by right clicking and choosing Run as administrator from the context menu.   Then on the command prompt you need to navigate to the Directory that has the aspnet_regiis.exe file for that you need to type   CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319\   Then you need to type the following command and hit enter to register ASP.Net with IIS   aspnet_regiis -i  

IIS, There was an error when trying to connect. Do you want to retype your credentials and try again?

IIS 8 error on windows server 2012 insufficient permission There was an error when trying to connect. Do you want to retype your credentials and try again? Details: Filename: \?\C:Windows\system32\inetsrv\config\redirection.config Error: Cannot read configuration file due to insufficient permissions screenshot: Solution: Steps to short out this issue: go to C:\Windows\Microsoft.Net\Framework64\v2.0.50727\CONFIG\machine.config here you got the redirection tag like the below <configurationredirection enabled="true" password="[enc:IISCngProvider:X0ObCWwZ4+PrTHiFVPtzFeCcL8u5P6KUOYfo1/0QrgZWATA5pKWqHvD8nL2crNJKyyqr4z/rBdLPjdRcaLxAMMj4l+lvp5EXXKSXueolvyGa34F4QZfbBVCM6oVNcq3M368TOTVjJv4POVFQWvu0MDVlGgReglXB+Lw5BRI4Htw=:enc]" path="C:\Windows\System32\inetsrv\config\import\" username="Administrator"> </configurationredirection"></li"> you need to change this to <configurationRedirection /> Th...

Redirect incoming requests to specific URLs in IIS 7

The Rule "aboutus" is redirect a specific page to a another page. The Rule "legal" is to redirect the all html files from a folder to a specific page. <system .webserver="">         <rewrite>           <rules>             <rule name="aboutus">               <match url="^about-us.html$"></match>               <action type="Redirect" url="/index.html"></action>             </rule>             <rule name="Legal">               <match url="^Legal/(.*).html$"></match>               <action type="Redirect" url="/index.html"></action>             </rule>          ...