IIS 7.5 and IIS 8.0 European Hosting

BLOG about IIS 7.5 Hosting, IIS 8.0 Hosting and Its Technology - Dedicated to European Windows Hosting Customer

IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: How to Use Appcmd.exe to Perform Common IIS Administrative Task?

clock July 4, 2019 12:11 by author Peter

IIS provides a new command-line tool, AppCmd.exe, to configure and query objects on your Web server, and to return output in text or XML. In this article, I will explain how to perform common IIS administrative tasks such as creating new sites, stopping/starting services, and viewing status of the site.

AppCmd.exe allows you to perform just about all the typical management functions you would want to perform using the CLI instead of the GUI. For example, here are some of the things that AppCmd.exe can do:

  •     Start and stop IIS web sites
  •     Create IIS websites, applications, application pools, and virtual directories
  •     Show running IIS processes and list currently executing requests
  •     Import, export, and search IIS ASP.NET configurations

Five ways that you can use AppCmd.exe to make your IIS website administration easier:

Sure, you can do just about everything in the IIS management MMC (GUI) that you can do with AppCmd.exe at the command line but GUI interfaces also have their disadvantages. To name a few, with a GUI you cannot do repetitive tasks quickly (like with a Windows Desktop Shortcut) nor can you use output from one AppCmd.exe output and send it to an AppCmd Action. Here are 5 ways that using AppCmd.exe can make your IIS website administration easier:

1. Start and Stop IIS websites from the command line

This is actually very simple. If you don’t know the name of your sites, just do:

Appcmd list sites

Now that you know what sites you have, you can start and stop your IIS web sites like this:
Appcmd start sites “Default Web Site” (or whatever site you want to start)

2. Add a new website

Adding a new website is easy. Just use:
Appcmd add sites /name:”Dave’s Site” /id:12 /bindings:http://mysite.com:80

Like this:

While this may add a new website, that website may not be as complete as a site added in the GUI unless all command options are added then an application is added for it. To get a more fully functioning IIS site, use the following two commands:
AppCmd add site /name:ddsite /id:99 /bindings:http/*:81: /physicalPath:C:\ddsite
AppCmd add app /site.name:DDSite /path:/ddapp /physicalPath:C:\sites\ddsite

3. Listing objects that meet certain information

Using the list command is easy. I showed you how to list our websites running on the server in #1, above. Notice in the output how you can see that the sites are running or not (the sites state). You can also list all objects (like sites) that meet certain criteria. For example, this command lists all sites that are stopped. Here is an example:

4. Backing up you IIS configuration

AppCmd.exe can backup your IIS configuration using the add backup command. You can also list your commands with the list backup command the and the restore backup can put your backup data back where it needs to go with the restore backup command.

Below, you see me backing up my IIS configuration then listing out what backups were available after that.

5. Report on IIS configurations

AppCmd has the power to report on your IIS configurations and export that configuration to a text file. To do this, just run:
Appcmd list site “sitename” /config
Here is what the output looks like:

IIS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc.

 



IIS 8.0 Hosting with Free ASP.NET Hosting - HostForLIFE.eu :: Hosting WCF Service in IIS 8.0

clock June 26, 2019 11:58 by author Peter

In this tutorial, I’ll explain how to install WCF in IIS 8.0. So in order to host our WCF Service in IIS, use the following simple step-by-step approach. First, Add a website to our solution. select the “ASP.NET Empty web Site” example. For web location, select “HTTP” rather than “File System” and provide the path and press the “OK” button.

Next step, add the Reference of the StudentService project to our web site, in other words StudentIISHost.

Next, Add a reference of System.ServiceModel to the web site. And then, Add a new .svc file to our web site project as.

Then write the following configuration for System.ServiceModel in the web.config :
<system.serviceModel> 
     <behaviors> 
           <serviceBehaviors> 
                  <behavior name=”StudentServiceBehavior”> 
                       <serviceMetadata httpGetEnabled=”true”/> 
                       <serviceDebug includeExceptionDetailInFaults=”false”/> 
                  </behavior> 
           </serviceBehaviors> 
      </behaviors> 
      <services> 
          <service behaviorConfiguration=”StudentServiceBehavior” name=”StudentService.StudentService”> 
           <endpoint address=”http://localhost/StudentIISHost/MyStudentHost.svc” 
                 binding=”wsHttpBinding” 
                 contract=”StudentService.IStudentService”> 
            <identity> 
                <dns value=”localhost”/> 
            </identity> 
          </endpoint> 
          <endpoint address=”mex” 
                binding=”mexHttpBinding” 
                contract=”IMetadataExchange”/> 
          </service> 
       </services> 
   </system.serviceModel> 

Finally, Access the hosted WCF Service, in other words StudentService using the following path.
http://localhost/StudentIISHost/MyStudentHost.svc

I hope this WCF Tutorial will help you to understand the implementation for hosting a WCF Service in Internet Information Services (IIS).

IIS 8.0 Hosting with Free ASP.NET Hosting

Try our IIS 8.0 Hosting with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service for the next 3 days. Once your trial period is complete, you decide whether you'd like to continue.



IIS 8.0 Hosting with Free ASP.NET Hosting - HostForLIFE.eu :: Configure IIS to Require SSL on both Federation Servers

clock April 24, 2019 12:11 by author Peter

In this post, let me tell you about how to configure IIS to require SSL on both Federation Servers. First step, open the Administrative Tools from the Start menu as shown on the following picture:

And then, in the Administrative Tools many options will be available, among these options one will be for IIS Manager. Double-click on this option to open it as shown on the below picture:

The IIS Manager Wizard will open. On the left hand side will be the Connections Pane.

Next step, expand the Server Name available under the Connection Pane, on expanding an option will appear named "Sites", again expand this option. This will bring the default Website under the IIS.

Click on this default Website, on clicking an option will come in the center Pane named SSL Settings, double-click on it to open it.

Now, check the "Require SSL" and then select on the "Accept Client Certificate".


Go to the Actions Pane and then select on the "Apply" button to apply the changes made.

IIS 8.0 Hosting with Free ASP.NET Hosting

Try our IIS 8.0 Hosting with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service for the next 3 days. Once your trial period is complete, you decide whether you'd like to continue.



IIS 8.0 Hosting - HostForLIFE.eu :: DHCP Installation in Windows Server 2016 Using Powershell

clock March 29, 2019 09:24 by author Peter

Now, I want to do the same thing, but this time, using PowerShell. We can easily achieve this with the help of PowerShell and typing a few simple commands.

Before we begin with DHCP installation process, first we need to make sure that it’s not installed in our Server 2016. We can verify this in two ways., which are given below.

  • Using Server Manager.
  • Using PowerShell.

As you can see below, I opened my Server Manager to check (Left side , under Dashboard), if DHCP is already installed, as we can see in the screenshot given below, DHCP Server roles are not installed yet.

Server Manager
Let’s verify this, using PowerShell. All you need to do is, just open your PowerShell and type the command given below.

Get-WindowsFeature


You can notice in the screenshot given above, install Sate for DHCP says “Available”, which means that it’s available for the installation and it’s not installed yet. Thus, we can continue with our installation process..

To install this DHCP server role using PowerShell, we need to use the command given below.

Install-WindowsFeature -Name ‘DHCP’
After installing this DHCP Server role, type the commands given below to install DHCP Management Tools.


We have successfully installed DHCP Server role and all the required tools to manage it. We can verify this in two ways. We can go back to Server Manager to see, if there is a DHCP Server role, the other way is suing PowerShell…Let’s first verify this, using Server Manager.

Go to —> Server Manager and check for DHCP under Roles and Server Groups (See the screenshot given below.)

We can also verify this using PowerShell, using the command given below.
Get-WindowsFeature.

 

HostForLIFE.eu IIS 8.0 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



IIS 8.0 Hosting - HostForLIFE.eu :: How to Fix PUT/POST/DELETE Verb Errors On Site ?

clock March 13, 2019 09:41 by author Peter

A customer was getting errror when utilizing PUT/POST/DELETE verbs on their web application as of late. The error looks like this:
<h2>405 - HTTP verb used to access this page is not allowed.</h2>

<h3>The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access</h3>

After some troubleshooting the error was disengaged to the way that WebDav was installed on the server and was catching those requests for its own service use.

Instead of removing Webdav from the server, we made a go at searching for an alternate solution. Thankfully somebody on Twitter comprehended the issue and gave an illustration of changes to make to the customer's web.config record with a specific end goal to disable (remove) the Webdav module for simply that particular webpage without requiring any requiring managerial activities on the server.

The code updates to make to your web.config record to intention this error are:
<configuration>
  <system.webServer>
    <handlers>
      <remove name="WebDAV" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <modules>
      <remove name="WebDAVModule" />
    </modules>
  </system.webServer>
</configuration>

HostForLIFE.eu IIS 8.0 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: IIS Express Failed to Register URL - Access is Denied

clock March 1, 2019 10:34 by author Peter

I was working on a web application, and suddenly the application stopped running on the browser and I got this error message,

“Unable to connect to the configured development Web server. Failed to register URL http://localhost :57660/ for site “sandbox” application “/”. Error description: Access is denied. (0x80070005)”

I tried many things like restarting Visual Studio and running Visual Studio as administrator but nothing worked. Finally, after spending a few hours on it I got the solution, so here I am sharing the solution.

Open windows registry and browse parameters in HTTP where you can see what URLs are allowed to be bound to services without admin privileges. The parameter is called ListenOnlyList and it needs to be set to the address that exists on your machine.

You need to configure this parameter by running the following in the administrative command prompt:

 
Once IP address is successfully added, you can see ListenOnlyList added in the registry with correct value.

Now run your web application again. I hope that will resolve your problem.

IIS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service for the next 3 days. Once your trial period is complete, you decide whether you'd like to continue.



IIS 8.0 Hosting France - HostForLIFE.eu :: How to Exploit the URL Rewrite Module for IIS to Handle Redirects to HTTPS?

clock February 14, 2019 10:23 by author Peter

We saw as problems URL Canonicalization can be solved in a declarative means a component of IIS, called URL Rewrite Module, which can be configured by specifying the appropriate rules of web.config. Another typical requirement in the management of a website is to make sure that applications that involve sensitive data (such as a page for payment by credit card) are carried out using the HTTPS protocol. How can we manage, however, requests that are received incorrectly using HTTP? A first solution may be to set the flag RequireSSL IIS for the particular folder that we want to protect (or maybe of all the site), as shown below:

The effect of this setting is that if a user visits the page via HTTP, IIS will raise 403.4 HTTP status code (Forbidden), displaying the standard error (or a custom version, if specified):

An alternative certainly more pleasant for the user is that instead of automatically redirected to the HTTPS address and, for this purpose, we can exploit once again the URL Redirect Module, by setting a rule similar to the following:

<rule name="ToHttps" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{URL}" pattern="(secure/.*)" />
    <add input="{HTTPS}" pattern="ON" negate="true" />
  </conditions>
  <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>

It applies to all addresses in input:

  • Pointing to a folder called secure
  • They are not using HTTPS

Hopefully we can eliminate the first condition, if we want the rule applies to the entire website and not to a particular folder. The final effect, specified in the node Action, is to perform a Redirect to the same page, but with the correct protocol.

Sometimes you may also need the opposite, ie postponing from HTTPS to HTTP. A typical example is when the SSL certificate covers only a subdomain of our site (for example secure.miosito.com) and therefore we want all the other pages are open in HTTP. In this case the rule to be created is very similar to the previous one:

<rule name="ToHttp" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{URL}" pattern="(secure/.*)" negate="true" />
    <add input="{HTTPS}" pattern="ON" />
  </conditions>
  <action type="Redirect" url="http://{HTTP_HOST}/{R:1}" />
</rule>

HostForLIFE.eu IIS 8.0 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



IIS 8.0 with Free ASP.NET Hosting - HostForLIFE.eu :: Generating SSL Certificate Request (CSR) with Certreq

clock January 11, 2019 11:01 by author Peter

Today, I will show you how to generate SSL certificate request (CSR) with Certreq. Certreq.exe is a command-line utility included on Windows Servers. It allows you to quickly generate a certificate request without having to use Windows's laborious GUI.

Step 1: Creating a config file

Open a text editor and paste the text below in the file:

;--- request.inf ---

[Version]
Signature="$Windows NT$"

[NewRequest]
; Replace Country with the 2-letter ISO code for your country
; Replace State with your state or province, without abbreviation
; Replace City with your city
; Replace Organization with your company
; Replace Organization_Unit with your department, or remove OU=Organizational_Unit entirely
; Replace www.example.com with the hostname you're requesting a certificate for
; For a wildcard SSL certificate, this would be *.example.com
Subject = "CN=www.example.com, OU=Organizational_Unit, O=Organization, L=City, S=State, C=Country"
; Key Exchange - for encryption
KeySpec = 1 
; 2048 bits minimum, 3072 or 4096 are valid too
KeyLength = 2048
; Needed if you need to export the certificate to another server
Exportable = TRUE
; Indicates a server certificate, not a user certificate
MachineKeySet = TRUE
SMIME = False
UserProtected = FALSE
; Generate a new private key
UseExistingKeySet = FALSE
; RSA key
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"

ProviderType = 12
; Standard of CSR's
RequestType = PKCS10
; Digital signatures and encryption
KeyUsage = 0xa0

[EnhancedKeyUsageExtension]
; Server authentication
OID=1.3.6.1.5.5.7.3.1

;------------------------------

Step 2: Generate a Certificate Request

Generate your CSR with the following command:

C:\>certreq -new request.inf request.csr

Open the .csr file, and copy its contents in Kinamo's CSR application form, including the BEGIN CERTIFICATE REQUEST and END CERTIFICATE REQUEST lines.

Step 3: Install an SSL certificate with Certreq

The .cer file you receive from the Certificate Authority can easily be installed by saving the file on the server you generated the CSR on, for instance as cert.cer, and by executing the following command at the prompt:

C:\>certreq -accept cert.cer

IIS 8.0 with Free ASP.NET Hosting
Try our IIS 8.0 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service for the next 3 days. Once your trial period is complete, you decide whether you'd like to continue.



IIS 8.0 Hosting Germany - HostForLIFE.eu :: How To Access A Folder With No Default Document

clock October 31, 2015 01:02 by author Rebecca

In this post, I will tell you how to access a folder with no document in IIS. It's easy, just follow these steps:

Step 1

Create a folder called Original--IIS-Files

Step 2

Move all the files into folder Original-IIS-Files

Step 3

Navigate to your web server. By default, the Web Server will render the following message when the folder has no default documents.

And you're done! Simple, right?

HostForLIFE.eu IIS 8.0 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.

 



IIS 8.0 Hosting France - HostForLIFE.eu :: How to Configure DNS Record for Sub Domain

clock October 16, 2015 11:34 by author Rebecca

In this article, I will tell you how to configure DNS record for sub domain.

Step 1

Open your domain control panel then go to DNS manager.

Step 2

Add following A records for domain.com and www.domain.com which point to IIS server IP address:

domain.com  IN A XXX.XXX.XXX.XXX
www.domain.com  IN A XXX.XXX.XXX.XXX
service.domain.com IN A XXX.XXX.XXX.XXX

First two rows will ensure that whenever user browse domain.com or www.domain.com at that time it will be routed to IIS server and rest will be take care by IIS then it will serve public site. The third row in above is important for next step.

Step 3

Now add following wildcard CNAME record:

*.domain.com  IN CNAME service.domain.com

In above wildcard entry ensure that any sub domain request for domain.com will be routed to server which is pointed by service.domain.com.

In IIS setup, you have to edit website binding to include domain.com and www.domain.com as host header, by this way you can tell IIS that any request from domain.com and www.domain.com will be handled by this particular website. So, whenever user browse domain.com or www.domain.com it is serving public website without any problem.

While in case of sub domain it is showing error that “The connection was reset” this is because IIS does not found host header entry for requested domain in any websites. So, you need to add host header entry in service.domain.com website created in IIS setup because service.domain.com is actual website which is going to serve hosted service application when it is browse from sub domain. Use the following code to add host header entry programmatically in IIS:

private string GetWebSiteId(string serverName, string websiteName)

{

    string result = "-1";

 

    DirectoryEntry w3svc = new DirectoryEntry(string.Format("IIS://{0}/w3svc", serverName));

 

    foreach (DirectoryEntry site in w3svc.Children)

    {

        if (site.Properties["ServerComment"] != null)

        {

            if (site.Properties["ServerComment"].Value != null)

            {

                if (string.Compare(site.Properties["ServerComment"].Value.ToString(),

                                        websiteName, true) == 0)

                {

                    result = site.Name;

                    break;

                }

            }

        }

    }

 

    return result;

}

       

private void AddHostHeader(string hostHeader, string websiteID)

{

    DirectoryEntry site = new DirectoryEntry("IIS://localhost/w3svc/" + websiteID);

    PropertyValueCollection serverBindings = site.Properties["ServerBindings"];

 

    serverBindings.Add(hostHeader);

 

    Object[] newList = new Object[serverBindings.Count];

    serverBindings.CopyTo(newList, 0);

 

    site.Properties["ServerBindings"].Value = newList;

    site.CommitChanges();

}  

 

AddHostHeader("127.0.0.1:80:user1.domain.com", GetWebSiteId("localhost", "service.domain.com"));

HostForLIFE.eu IIS 8.0 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in