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 8 Hosting - HostForLIFE.eu :: Dynamic Compression Issue in IIS 8.5

clock December 6, 2019 11:49 by author Peter

Windows Server 2012 R2 comes with IIS 8.5, and in this release an issue has been found in relation to the Dynamic Compression module.  The module sets the “Vary” header which is used to specify caching properties that the browser uses to determine whether the response should be cached or not. 

In IIS 8.0 and earlier, the Dynamic Compression module was overwriting the Vary header with the value “Accept-Encoding”, and as it happens this is the correct value to ensure that dynamic content is correctly cached – but – according to IIS it should be appending this value to the existing value and not overwriting it.

As it happens, this was supposed to be fixed in IIS 8.5 but the fix appears to be broken.  In IIS 8.5 (which ships with Windows Server 2012 R2) the Vary header is being set to “*” and the “Accept-Encoding” from the Dynamic Compression module is not appended.  The result of this is that no dynamic content is being cached by the browser.

Workaround

Thankfully there is an easy workaround in IIS 8.5 for this:

1. Select an IIS site, and go to Configuration Editor

2. Select system.web/caching/outputCache section, then set the omitVaryStar property to true

Setting this value results in the Vary header being returned with a value of “Accept-Encoding” and the browser then caches the dynamic content.



IIS 8.0 Hosting UK - HostForLIFE.eu :: How to Fix HTTP Error 500.21 in IIS?

clock November 15, 2019 11:52 by author Peter

If you've setup another IIS site and application pool and using a .NET application, you may run into this problem:
HTTP Error 500.21 – Internal Server Error Handler “ExtensionlessUrlHandler-Integrated-4.0″ has a bad module “ManagedPipelineHandler” in its module list.

And here is the solution to solve this error:
First, Run the "aspnet_regiis.exe" program from Command Line (in the Command Prompt) and type this syntax:

run %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

Note: if your computer is 64 bit, then use the following:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –i
Restart IIS.

If above solution doesn’t work for you, try the other method below:
Click Start -> All Programs -> Accessories -> Run
In the Open textbox paste in the following line

For silent repair on 32 bit computer with .Net Framework version 4.0.30319 use:
%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

For silent repair on 64 bit computer with .Net Framework version 4.0.30319 use:
%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

Click OK to start the repair
After, the repair ran for a few minutes, restart IIS.



IIS 8.0 Hosting UK - HostForLIFE.eu :: How to Fix HTTP Error 500.21 in IIS?

clock November 15, 2019 11:52 by author Peter

If you've setup another IIS site and application pool and using a .NET application, you may run into this problem:
HTTP Error 500.21 – Internal Server Error Handler “ExtensionlessUrlHandler-Integrated-4.0″ has a bad module “ManagedPipelineHandler” in its module list.

And here is the solution to solve this error:
First, Run the "aspnet_regiis.exe" program from Command Line (in the Command Prompt) and type this syntax:

run %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe –i

Note: if your computer is 64 bit, then use the following:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe –i
Restart IIS.

If above solution doesn’t work for you, try the other method below:
Click Start -> All Programs -> Accessories -> Run
In the Open textbox paste in the following line

For silent repair on 32 bit computer with .Net Framework version 4.0.30319 use:
%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

For silent repair on 64 bit computer with .Net Framework version 4.0.30319 use:
%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

Click OK to start the repair
After, the repair ran for a few minutes, restart IIS.



IIS 8.0 Hosting UK - HostForLIFE.eu :: How to Fix Troubleshoot HTTP 400 Bad Request error on IIS ?

clock November 8, 2019 10:25 by author Peter

There's a J2EE app running on the Tomcat with ISAPI redirector on IIS 8 of Windows Server 2012. Recently the customer got the error related to an AJAX request. At the point when debugging the issue, I figured out that the IIS returns HTTP 400 Bad Request error instead of passing along the url for the Tomcat to handle it.In the IIS log record, there's no record for this appeal nor lapse log not one or the other.

Go to the IIS admin:
Website > Advanced Settings > Limits > Maximum URL Segments: 32
Request Filtering module > Edit Feature Settings:
Maximum URL Length: 4096
Maximum query string: 2048

All is well. The url that makes blunder meets those design since it has recently few segments and the length is around 380 characters - a long ways behind the utmost settings. At that point I attempted to shorten the url a little bit and then a little bit.. and then finally it worked. It seems there's a limit around 300 characters.

Google around to to enable the error log and I found How to troubleshoot HTTP 400 errors. At that point go to  Error logging in HTTP APIs. Download the Enable HTTP API lapse logging  Microsoft Fix it 50634 to introduce it, yet it said the current OS is not matched! In spite of the fact that the direction applies for Windows Server 2012 Standard as the application is running on.
So have to go to regedit and configure the Http.sys registry settings with following parameters:
EnableErrorLogging: Decimal 1
ErrorLogFileTruncateSize: Decimal 10 (MB)
ErrorLoggingDir: C:\inetpub\logs\LogFiles

Then do : net stop HTTP
It will asks you to confirm another services also:
   Windows Remote Management (WS-Management)
   Windows Event Collector
   World Wide Web Publishing Service


Then do: net start HTTP
The HTTP Service service was started successfully.
Check the website, it will stop. Start HTTP again, but it said the HTTP service is already started!
So go to the services manager to start World Wide Web Publishing Service, then Windows Remote Management (WS-Management) and Windows Event Collector

Then test again and see the error log file with a record just shows a very simple error reason: URL. There's a breaking point setting called UrlSegmentMaxLength with 260 characters of course! I felt that brought about the issue in light of the fact that the full url with space name that worked when there's around 300 characters.  So go to regedit and add UrlSegmentMaxLength with 1000 characters value to the HTTP parameters and restart http, w3svc, winrm and wecsvc services again.

I ask why the MS didn't make it for an every particular site like the Maximum URL Segments and effectively to set. In any case we'll need to arrange in the Windows registry that requires to restart entire administrations and influence all sites.

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.



European IIS 10 Hosting - HostForLIFE.eu :: How to Change Application Pool Identities in IIS 7/8 With PowerShell

clock October 25, 2019 11:06 by author Peter

This question was asked so many times, and in this occasion I am going to share with you how to change application pool identities in IIS 8 using PowerShell, there are several ways to do so, and one of my favorite ways to get and change information about an application pool is through the IIS Provider that’s loaded when importing the WebAdministartion module.

You can get basic information about the pool using the Get-Item cmdlet.
PS> Get-Item -Path IIS:\AppPools\MyTest | format-List *

In that picture you can see that a list of application pool settings and information is displayed, but you will also see that some seem hidden from you. ProcessModel contains the identity information in a property named IdentityType The one we want for the application pool identity is ProcessModel. You can retrieve the information from ProcessModel by using the Get-ItemProperty cmdlet.

PS> Get-ItemProperty -Path IIS:\AppPools\MyTest -Name ProcessModel

ProcessModel contains the property IdentityType that holds the application pool identity. Now, if you are one of those hip PowerShell folks you know that you can get this information without reading a long list on the screen with the following:

PS> Get-ItemProperty -Path IIS:\AppPools\MyTest -Name ProcessModel | Select-object IdentityType

But this is IIS and things work better if you change how you operate just a little bit. So, instead of using Select-Object to grab the IdentityType, I’m going to accomplish that in a slightly different approach.  Notice the –Name parameter below:

PS> Get-ItemProperty -Path IIS:\AppPools\MyTest -Name ProcessModel.IdentityType

It’s a bit unusual, but this will make it much easier to change the IdentityType with the Set-ItemProperty cmdlet. Before I show you how to change the application pool identity, the values for the identity are Int32 (numbers). here are the identities and their corresponding numbers.

LocalSystem = 0
LocalService = 1
NetworkService = 2
SpecificUser = 3
ApplicationPoolIdentity = 4

So, to change the application pool identity using the Set-ItemProperty to something like “NetWorkService” would look like this:

PS> Set-ItemProperty -Path IIS:\AppPools\MyTest -Name ProcessModel.IdentityType -value 2

Most of the time when an admin needs to change the application pool identity it’s because they want application pool isolation. This means changing the identity to a specific account and password.  Here is an example of how to do that:

PS> Set-ItemProperty -Path IIS:\AppPools\MyTest -Name processmodel.identityType -Value 3
PS> Set-ItemProperty -Path IIS:\AppPools\MyTest -Name processmodel.username -Value Administrator
PS> Set-ItemProperty -Path IIS:\AppPools\MyTest -Name processmodel.password -Value P@ssw0rd



IIS 8 Hosting Germany - HostForLIFE.eu :: WordPress on Windows Server 2012 with IIS 8 and SQL Server 2012

clock October 18, 2019 11:09 by author Peter

Yesterday I decided to install WordPress for my new blog, both because it seemed like good product for the job and also to get some experience in running it (and thus also PHP) on Windows Server 2012 with IIS 8 Hosting. There are some good resources scattered around the web, but none seemed up to date, so I decided to share my notes from the install on here. I’m assuming you already have Windows Server 2012 and SQL Server 2012 installed.

IIS 8 CONFIGURATION
The configuration of IIS 8 is quite easy: you just enable the Web Server role through Server Manager. Just to be complete, the screenshot below shows the options I currently have installed, but keep in mind that I’m also running ASP.NET on my server.

Yesterday I decided to install WordPress for my new blog, both because it seemed like good product for the job and also to get some experience in running it (and thus also PHP) on Windows Server 2012 with IIS 8. There are some good resources scattered around the web, but none seemed up to date, so I decided to share my notes from the install on here. I’m assuming you already have Windows Server 2012 and SQL Server 2012 installed.

IIS 8 CONFIGURATION
The configuration of IIS 8 is quite easy: you just enable the Web Server role through Server Manager. Just to be complete, the screenshot below shows the options I currently have installed, but keep in mind that I’m also running ASP.NET on my server.I also highly recommend you install PHP Manager (http://phpmanager.codeplex.com/) as it will help us in enabling/disabling PHP extensions from within IIS Manager later on and provides an easy way to access php.ini as well.

PREREQUISITE INSTALLATION
To make things easy, you can install and configure PHP quite easily using the Microsoft Web Platform Installer. When you run the Web Platform Installer (Web PI), you can do a quick search for “sql php” and it comes up a few results. When you select “Microsoft Drivers 3.0 for PHP v5.4 for SQL Server in IIS”, which is what we need, all other prerequisites will be automatically installed as well as dependencies (PHP and URL Rewrite for IIS).

After Web PI finishes, you will have PHP installed and configured for use in IIS. Time to do a little test to see if everything is running smoothly. Create a new file under C:\inetpub\wwwroot\ (or wherever your Default Web Site is pointing to) named test.php with the following content:
<?php echo phpinfo(); ?>

This will output information about your PHP configuration.

Time to try it out: navigate to the page (likely http://localhost/test.php). If you are greeted with a screen with purple blocks of information about your PHP configuration, you’re all set and you can skip ahead to the WORDPRESS INSTALLATION section. Chances are you’re going to be greeted with an IIS 403.1 error screen, however, which is due to the fact that the user account that IIS is currently using for the anonymous access to your site doesn’t have the proper privileges to access your wwwroot (or equivalent) folder on disk. This is solved quite easily by granting this user (called IUSR by default) access to the wwwroot folder through Windows Explorer or your other favorite method.

Retry and bask in the glory of the phpinfo() output.

WORDPRESS INSTALLATION

Now we can start downloading the actual WordPress files and start the installation. First off, grab the latest version (or the version of your choice) of WordPress. We will also need the WP Db Abstraction plugin. After downloading, unblock and unZIP both files in a folder under wwwroot (or your Web Site’s location). Installation of the WP Db Abstraction plugin is quite easy, just follow the steps outlined in the readme.txt:Upload wp-db-abstraction.php and the wp-db-abstraction directory to wp-content/mu-plugins. This should be parallel to your regular plugins directory. If the mu-plugins directory does not exist, you must create it.

Put the db.php file from inside the wp-db-abstraction.php directory to wp-content/db.php
Visit $your_wordpress_url/wp-content/mu-plugins/wp-db-abstraction/setup-config.php to generate your wp-config.php file

Before you perform the last step, though, go to IIS Manager and enter PHP Manager (it’s located on the Features page of your server under IIS). Scroll down and click the “Enable or disable an extension” link. You need to make sure that php_pdo_sqlsrv.dll and php_sqlsrv.dll are both enabled. You can also go ahead and disable the *mysql*.dll extensions. Here’s my list of enabled extensions:

Now we can visit the setup-config.php page as outlined above. The steps here are quite straightforward, so I’m not going to walk you through them. You will need to create a user on your SQL Server 2012 installation with SQL Server authentication that has access to a database that you also need to create to use for your WordPress installation.

One note about this process: I had some issues when choosing the default selected “SQL Server using MS PHP driver” and went with the “PDO SqlSrv” option the second time to eliminate these issues.

If the wizard has trouble automatically creating the wp-config.php file, you can either choose to give IUSR write permissions on the folder you created to hold all your WordPress files or you can manually create the file under that folder and paste the output you see on screen in there (I chose the latter). After the wp-config.php file is created, you can start the installation of WordPress by clicking the link on the bottom of the page you’re on.

WORDPRESS CONFIGURATION

After the install, which should only take a minute tops, you are now ready to log in to your WordPress admin dashboard and start configuring it how you’d like. As you can see, there’s a sample post and comment already waiting for you. If your experience is anything like mine, you will notice that when you navigate to the Posts -> All Posts option on the top left of your dashboard you won’t actually see these posts in the list. It took some hunting around the web to figure this out, but apparently there’s a line in the translations.php file of the WP Db Abstraction plugin that’s causing this (thanks to tm3ister on http://sourceforge.net/projects/wp-sqlsrv/forums/forum/1124403/topic/5004241 for figuring this out!). The solution is to manually edit the translate_limit function in the mu-plugins/wp-db-abstraction/translations/sqlsrv/translations.php file:

Change

// Check for true offset
if ( (count($limit_matches) == 5  )  && $limit_matches[1] != '0' ) {
    $true_offset = true;
} elseif ( (count($limit_matches) == 5 )  && $limit_matches[1] == '0' ) {
    $limit_matches[1] = $limit_matches[4];
}

To

// Check for true offset
if ( (count($limit_matches) == 5  )  && $limit_matches[1] != '0' ) {
    $true_offset = true;
} elseif ( (count($limit_matches) >= 5 )  && $limit_matches[1] == '0' ) {
    $limit_matches[1] = $limit_matches[4];
}

And voila, your posts will now show up.

The last thing we’re going to configure is Permalinks (or pretty URLs) for our posts. When you navigate to Settings -> Permalinks on the admin dashboard, you’ll see some options to rewrite URLs to be more human and search engine friendly. For now, select Custom Structure and enter /%year%/%monthnum%/%postname%/ in the text field and hit Save Changes. The last step is to create a web.config file in our WordPress folder to rewrite the URLs according to this scheme with IIS URL Rewrite. Create a new web.config file (if you don’t have one already) in the folder you installed WordPress to and copy in the following:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="wordpress" patternSyntax="Wildcard">
          <match url="*" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php"/>
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

You’re now all set to use WordPress on Windows Server 2012 with IIS 8 and SQL Server 2012!



IIS 8 Hosting - HostForLIFE.eu :: Fixing "Plugin IISBinding Was Unable To Generate A Target" Error

clock September 6, 2019 11:23 by author Peter

This post teaches how to fix a message:

"ERROR: Plugin IISBinding was unable to generate a target" while enabling the SSL Certificate for your website.

So, let us start.
Open IIS - Internet Information Services (IIS).

Select "Default Web Site" and click on "Bindings...."

Edit "HTTP" host to put your websitURLrl.

Insert your website URL and press "OK".

Continue the process as the original POST recommends.

Fixing Plugin IISBinding Was Unable To Generate A Target

CONCLUSION
This IISBinding error appeared to me when I moved the website from a Server to another before enabling my HTTPS certification. This solution worked for me pretty awesomely. If you find any other solution, please comment below.



IIS 8 Hosting - HostForLIFE.eu :: Fixing "Plugin IISBinding Was Unable To Generate A Target" Error

clock September 6, 2019 11:23 by author Peter

This post teaches how to fix a message:
"ERROR: Plugin IISBinding was unable to generate a target" while enabling the SSL Certificate for your website.

So, let us start.
Open IIS - Internet Information Services (IIS).

Select "Default Web Site" and click on "Bindings...."

Edit "HTTP" host to put your websitURLrl.

Insert your website URL and press "OK".

Continue the process as the original POST recommends.

Fixing Plugin IISBinding Was Unable To Generate A Target

CONCLUSION
This IISBinding error appeared to me when I moved the website from a Server to another before enabling my HTTPS certification. This solution worked for me pretty awesomely. If you find any other solution, please comment below.



IIS 7 Hosting Europe - HostForLIFE.eu :: Managed Pipleline Mode in IIS 7

clock August 23, 2019 11:37 by author Peter

Last week when I was hosting an application on IIS7 when adding an application pool I saw the field "Managed pipeline mode". It has two values in the drop down, "Integrated" and "Classic". I became curious about the the differences between them. After application hosting I changed the value but didn't see any difference. That increased my curiosity to disover the exact differences between them. I read several blogs on this and came to understand the differences between them.

This option exists in the IIS7 or above version of IIS.

Classic
As the word classic means, it is the standard way to do things. It has the same meaning here also. In Classic mode the IIS behaves like in IIS6, it won't use any new features of IIS7 or above. In IIS6 when any request comes to IIS, it identifies the type of request. If it's an ASP.NET request (.aspx, .asmx and so on.) it goes to the ASP.NET pipeline and is handled by the aspnet_isapi.dll and non-ASP.NET requests (HTML, .PHP and so on) are handled in the IIS pipeline.


Integrated
In Integrated all the requests are handled by a single pipeline of IIS. The ASP.NET pipeline is tightly integrated with an IIS pipeline. There is no separate pipeline for ASP.NET requests. Therefore in ASP.NET, HttpModule and Httphandler can be used to handle requests not from ASP.NET, in other words any custom Http module can be applied to a PHP request also.

Benefits of integrated mode over Classic mode:

    ASP.NET HttpModule and Httphandler can be used to handle requests not from ASP.NET (HTML and PHP).
    Integrated mode is much faster so increase the site performance.

When to use Classic Mode
Sometimes legacy applications don't support the IIS 7 architecture and then the Classic mode works. When you select it, Classic mode IIS behaves like an IIS6 version.

IIS 7.0 Hosting with Free ASP.NET Hosting

Try our IIS 7.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 Hosting - HostForLIFE.eu :: How to Install and Register ASP.Net With IISHow to Install and Register ASP.Net With IIS?

clock August 2, 2019 11:01 by author Peter

This article explains how to register ASP.Net with IIS when installing ASP.Net in IIS so that an ASP.Net page can make a request to recognize or respond from IIS. If it is not registered with an Internet Information Services then when you make an ASP.Net page request to the web server (IIS) then the web server will not get a response. And also we will get the error as in the following.

ASP.Net 2.0
“ASP.NET 2.0 has not been registered on the Web Server. You need to manually configure you Web server for ASP.NET 2.0 in order for your site to run correctly.”

(OR)

ASP.Net 4.0
“ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly”

Note: It is an available version of ASP.Net on your system.

Solutions Procedure
To find the location for the aspnet_regiis.exe file, go to the location C:\Windows\Microsoft.NET as in the following:


Kindly check, based on your system's bits (32 0r 64) for the .NET Framework location.

Kindly check whether you're using an ASP.Net version with IIS and based on that you have opened the specified version folder.

Go to a Visual Studio command prompt.
Then you will register ASP.Net with IIS as in the following command (aspnet_regiis.exe):
“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe –I”

Copy and paste to the Visual Studio command prompt.
Then Enter.
You have finished the installation of ASP.Net.



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