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

European IIS 7.5 Hosting - Amsterdam :: How to Host a KeePass Database in IIS 7.5

clock December 12, 2013 10:27 by author Patrick

KeePass is an open source password manager. The passwords are stored in a database with the .kdbx extension. The database can be on your local file system or on a web server. If you put the database on an IIS webserver, you can access it from KeePass, but if you try to save, you get a 404 error.This is because the StaticFile HTTP handler in IIS only supports the GET method and KeePass requires PUT, MOVE and DELETE, in addition to GET.

To add support for this, a custom HTTP handler has to be added to the webserver. The HTTP handler is a C# library project with a class that implements IHttpHandler. A reference to System.Web needs to be added.

To add the handler, put the following in web.config:

Put the library DLL in a folder named "bin" on the web site.

Now, you should be able to save your KeePass database!



European IIS 7.5 Hosting - Amsterdam :: Managing IIS 7.5 (Final Chapter)

clock September 16, 2013 07:13 by author Ronny

After we read the post about Istalling IIS Services, continue with Using New IIS Services, and previous post about Hosting Applications, now time for final chapter post titled Managing IIS 7.5. The biggest improvement in IIS 7 .5 is in the area of management.  Windows Server 2008 R2 includes a number of IIS configuration tools that were previously available only as separate downloads, and Microsoft has enhanced many of the existing tools.

Automating IIS administration with Windows powerShell
As in many other areas of the Windows Server 2008 R2 operating system, Microsoft is emphasizing Windows PowerShell as an important tool for managing IIS 7.5. The IIS PowerShell snapin provides dozens of new cmdlets and enables administrators to manage IIS properties in several different ways.

Selecting Windows PowerShell Modules from the Administrative Tools program group loads the system modules included with Windows Server 2008 R2, including the WebAdministration module that provides the IIS functionality. You can also import the module manually from any Windows PowerShell prompt by using the following command:
Import-Module   WebAdministration

Once you have access to the IIS Windows PowerShell snap-in, you can display all of the cmdlets it contains by using the following command:
Get-Command  –pssnapin WebAdministration

The snap-in uses three different types of cmdlets, as follows:

  • PowerShell provider cmdlets
  • Low-level configuration cmdlets
  • Task-oriented cmdlets

These cmdlet types correspond to three different methods of managing IIS from the Windows PowerShell prompt, as described in the following sections

Using the IIS powerShell provider
The IIS PowerShell provider creates a hierarchical IIS namespace that administrators can navigate just like a file system directory structure. When you type iis: and press Enter at a Windows PowerShell prompt (with the WebAdministration module imported), the prompt changes to PS IIS:> and typing the dir command displays not the file system, but the top level of the IIS namespace, as follows:

Name
----
AppPools Sites SslBindings

After changing to the Sites directory with the cd  Sites command, the dir command displays a list of the IIS sites on the server, as follows:

Name

ID

State

Physical  Path

Bindings

----

--

-----

-------------

--------

Default Web

Site 1

Started

%SystemDrive%\inetpub\wwwroot

http *:80:

The Get-Item cmdlet enables you to display selected sites in the same format. By piping the results of the Get-Item cmdlet to the Select-Object cmdlet, you can display all of the properties of a selected site,

Generic cmdlets such as Get-Item and Select-Object are part of the standard Windows PowerShell interface. Any module that includes a provider hierarchy must support them. Once within the IIS hierarchy, you can use low-level configuration cmdlets to manage specific IIS elements without having to type extended path names.

Using Low-Level Configuration Cmdlets
IIS 7.0, first released as part of Windows Server 2008, represents a complete revision of the IIS architecture, and extensibility was a major priority of that revision. This new architecture, carried over into the IIS 7.5 release in Windows Server 2008 R2, is schema driven and uses XML-based configuration files, which are two major contributing factors to its complete extensibility. This extensibility complicates the process of developing a Windows PowerShell management strategy, however.  Cmdlets might have static parameters that enable them to manage specific properties of an element, but if a third-party developer creates an IIS extension that adds new properties to that element, the existing cmdlets cannot manage them.

Therefore, the IIS Windows PowerShell snap-in includes low-level configuration cmdlets that you can use to view and manage all of the hundreds of IIS configuration settings, including custom settings added by IIS extensions. One set of these low-level cmdlets, concerned with IIS configuration elements, is as follows:

  • Add-WebConfiguration, Adds a collection element to an existing IIS configuration collection
  • Backup-WebConfiguration, Creates a backup of an IIS configuration
  • Clear-WebConfiguration, Removes configuration settings from the specified loca- tion
  • Get-WebConfiguration, Gets an IIS configuration element at a specified location
  • Restore-WebConfiguration, Restores IIS configuration elements from a previously executed backup
  • Select-WebConfiguration, Returns Web configuration objects
  • Set-WebConfiguration, Sets an IIS configuration element to a specified value

Using task-Oriented Cmdlets
In addition to the low-level configuration cmdlets, the IIS Windows PowerShell snapin includes a large collection of cmdlets designed to simplify common IIS maintenance tasks, such as creating, removing, starting, and stopping specific IIS elements. One set of task- oriented cmdlets, concerned with managing IIS sites, is as follows:

  • Get-Website
  • New-Website
  • Remove-Website
  • Start-Website
  • Stop-Website

Unlike the low-level cmdlets, the task-oriented cmdlets do not rely on the IIS namespace (although they can utilize it), and they use static parameters to configure specific properties . For example, to create a new Web site, you might use a command like the following:
New-Website  –Name Intranet –Port 80 –HostHeader intra.example.local –PhysicalPath "$env:systemdrive\inetpub\intranet" -Ssl

This command creates a new site with the name Intranet, using the default port number value 80, and using the host header value intra.example.local to differentiate this site from other sites that use the same address and port number.  The Web site will use content files located in the \inetpub\intranet folder on the computer’s system drive, and it will allow users to connect with SSL encryption by using the HTTPS: prefix in their URLs.

Once you have created the site, you can even use the Windows PowerShell interface to create new content .  After switching to the site directory in the IIS hierarchy with the command cd\sites\Intranet, you can use the following command to open a Notepad window containing a new Index .html file:
notepad "$(Get–WebFilePath .)\index.html"

Using IIS administration pack extensions
The IIS Administration Pack is a downloadable collection of extensions for IIS 7.0.  In Windows Server 2008 R2, most of the contents of the Administration Pack are included in the IIS 7.5 implementation.  For example, the ASP .NET and FastCGI configuration capabilities described earlier in this chapter were originally part of the Administration Pack, and are now incorporated into the default user interface of the Internet Information Services (IIS) Manager console in Windows Server 2008 R2. Also accessible through the console are the features described in the following sections .

Using Configuration editor
Configuration Editor is a graphical tool that enables administrators to view and manage any setting in any of the IIS configuration files. Because the tool is based on the IIS configuration schema, it can even manage custom settings without any interface modifications. In addition, once you have performed your modifications, the Configuration Editor can generate a script that duplicates those modifications for execution on other servers.

For example, you can use Configuration Editor to create a new IIS site, setting the same parameters as the New-Website Windows PowerShell cmdlet if desired. To do this, you open the Configuration Editor in the Internet Information Services (IIS) Manager console at the server level and, in the Section drop-down list, select system .applicationHost/sites.

When you open the Collection Editor window, you see the server’s existing Web sites and an interface for creating a new one, you can configure a multitude of settings for the new site, after which it appears as part of the collection

Finally, back on the Configuration Editor page, clicking Generate Script in the Actions pane displays script code that will create a new site identical to the one you just added, using managed code (C#), JavaScript, or the Appcmd .exe program at the command prompt, from this window, you can copy the code to a text file to save for later use.

Using request Filtering
The Request Filtering module integrates the capabilities of a separate product called Microsoft Urlscan Filter 3 .1 into the default Internet Information Services (IIS) Manager console in Windows Server 2008 R2. Request Filtering is essentially a graphical interface that inserts code into Web .config files that limits the type of HTTP requests a particular IIS server or site will process. Requests that the filtering mechanism rejects are logged with error codes that indicate the reason for the rejection.

The Request Filtering page, contains seven tabs that enable you to create the following types of filters:

  • File Name Extensions, Filters incoming HTTP requests based on the extension of the file requested .  For example, to prevent IIS from serving any Active Server Pages files, you would add a Deny File Name Extension entry, using the extension .asp.
  • Rules, Filters incoming HTTP requests based on rules that specify text strings that cannot appear in the URL, a query string, or the HTTP header of a request for a par- ticular file extension.
  • Hidden Segments, Filters incoming HTTP requests based on specific segments of a URL.  For example, this enables you to filter out requests for files in the bin folder with- out rejecting requests for files in the binary folder.
  • URl, Filters incoming HTTP requests based on specified character strings in the requested URL.
  • HTTP Verbs, Filters incoming HTTP requests based on the verb specified in the HTTP message.
  • Headers, Filters incoming HTTP requests based on size limits for particular HTTP header values.
  • Query Strings, Filters incoming HTTP requests based on specific query strings. This capability is particularly useful in preventing SQL injection attacks, in which query strings contain escape characters or other damaging code.



European IIS 7.5 Hosting - Amsterdam :: Hosting Applications with IIS 7.5 (Chapter 3)

clock September 10, 2013 05:50 by author Ronny

After we read the post about Istalling and Using New IIS Services, now we continue with Hosting Applications with IIS 7.5, this is a continuation of my previous post titled Using New IIS Services. The IIS 7 .5 implementation in Windows Server 2008 R2 includes some major enhancements in its application hosting capabilities, as described in the following sections.

Running ASP.Net Applications

One of the most significant improvements in IIS 7.5 is that it now supports ASP .NET applications on computers running the Server Core installation of Windows Server 2008 R2. Server Core is a stripped-down version of the Windows Server operating system that eliminates many roles and features and most of the graphical interface.  One of the features not available in Windows Server 2008 Server Core is Microsoft .NET Framework, and IIS requires this fea- ture to support ASP .NET.  Because ASP .NET is one of the most commonly used development environments for Web applications today, this was a major shortcoming.  However, Windows Server 2008 R2 provides support for .NET Framework 2.0, 3.0, 3.5.1, and 4.0 in Server Core; IIS 7.5 can therefore host ASP .NET applications.

The ASP .NET implementation in IIS 7 .5 also now supports different Common Language Runtime (CLR) versions, enabling administrators to switch versions without modifying the underlying IIS infrastructure.  Microsoft has also incorporated this capability into Windows Server 2008 Service Pack 2. You can specify different CLR settings for individual application pools by creating custom ASPNET .config files. To use these files, you add code specifying their locations to the pool’s applicationHost .config file, as in the following example:

<applicationPools>
<add name=”MyApplicationPool” CLRConfigFile=”c:\InetPub\CLRConfigFile.txt”   />
</applicationPools>

IIS 7.5 also includes a new application auto-start feature in its ASP .NET 4.0 implementation. This feature enables an administrator to configure an application pool to start up automatically, while temporarily not processing HTTP requests.  This allows applications requiring extensive initialization to finish loading the data they need or to complete other processes before they begin accepting HTTP requests.  To use this feature, you must add code like the following to the pool’s applicationHost .config file:

<applicationPools>
<add name=”MyApplicationPool” startMode=”AlwaysRunning”   />
</applicationPools>

FastCGI Support in IIS 7.5

FastCGI is a language-independent extension to the Common Gateway Interface (CGI) that enables Web servers to execute applications more quickly and efficiently.  Unlike CGI, which creates a separate process for each incoming request, FastCGI uses a single process to handle multiple requests. IIS uses FastCGI to support the popular PHP scripting language, which makes it one of the more important features of the product.

IIS 7.5 includes a number of enhancements to its FastCGI support, including the following:

  • FastCgI configuration in IIS Manager - The graphical FastCGI administration interface, previously available only in Administration Pack for IIS 7.0, is now fully integrated into the Internet Information Services (IIS) Manager console, as shown in the following graphic.

  • Real-time tuning - In the Edit FastCGI Application dialog box, the Max Instances property specifies the maximum number of FastCGI processes that IIS can launch for each application pool. This equates to the maximum number of FastCGI requests that IIS can process simultaneously for that application. The default value is 4, but in IIS 7.5, if you change the value to 0, the FastCGI module automatically shifts the number of requests up and down, based on the current system load and the number of queued requests.
  • Configuration file monitoring - In the Edit FastCGI Application dialog box, the Monitor Changes To File property enables you to specify the path to a configuration file, such as Php .ini, for each application. When IIS 7.5 detects a change to the specified file, it recycles the FastCGI processes for that application.
  • New error-handling options - IIS 7.5 now provides a choice of four FastCGI error handling options, which you configure in the Edit FastCGI Application dialog box using the Standard Error Mode property. These options enable you to specify what error information IIS logs and how much of it gets returned to users. You can also configure the property to terminate the FastCGI process when an error occurs.
  • Failed request tracing - In IIS 7.5, the FastCGI module can send the information in a process’ STDERR stream to the Failed Request Tracing (FREB) logs maintained by IIS for debugging purposes (as long as Failed Request Tracing is enabled).

Using Managed Service accounts

IIS 7.5 can use the managed service accounts—now supported by Active Directory Domain Services in Windows Server 2008 R2—as service identities, thus eliminating problems caused by expired application pool passwords. The Application Pool Identity is a concept first introduced in IIS 7 .0 which IIS uses to set permissions for an application pool’s configuration file. You can also use it for anonymous authentication in place of the IUSR account. In IIS 7.5, the Application Pool Identity is a man- aged service account, and IIS now uses it to run the W3wp .exe worker process in place of the Network Service account introduced in Windows Server 2003.



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