DRIVE EFFICIENCY THROUGH AUTOMATED IT.
SAVE COST THROUGH CONSOLIDATION OF IT.
WANT TO KNOW MORE ABOUT STRATEGIC CONSULTING CLICK HERE.
MICROSOFT / RISUAL HYPER-V CLOUD EVENT 22ND MARCH 2011 CLICKHERE.

Archive

Posts Tagged ‘IIS’

SCOM 2007 R2 Reporting reports "Client found response content type of ‘text/html’, but expected ‘text/xml’"

December 22nd, 2011 paulw Comments off

When attempting to access the reporting part in the SCOM console we found that we were getting an error message similar to the one below:

 image

This is caused by IIS using a 32bit worked process on a 64bit system.

To resolve this we had to run the following:

 

1. Open a command prompt and CD to C:InetpubAdminscripts

2. Type in the following and press enter:

cscript adsutil.vbs find Enable32BitAppOnWin64

3. Type in following and press enter:

cscript %SYSTEMDRIVE%inetpubadminscriptsadsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0

4. Type in following and press enter:

%SYSTEMROOT%Microsoft.NETFramework64v2.0.50727aspnet_regiis.exe –i

If you then go back into SCOM and open the Reporting part you should no longer get an error:

image

Cheers

Paul

Categories: Uncategorized Tags: ,

Server Manager IIS Error – WebDAV

October 27th, 2011 steveh Comments off

I came across the following error message recently whilst troubleshooting an SCCM Distribution Point;

————————————————————————————————————————–
There was an error while performing this operation.

Details:
Filename: \?C:inetpubwwwrootweb.config
Line number: <LineNumber>
Error:  Cannot add duplicate collection entry of type ‘<XXX>‘ with unique key attribute ‘<YYY>‘ set to ‘<ZZZ>‘.
————————————————————————————————————————–

Client’s were downloading packages via SMB rather than over HTTP which prompted me to check if WebDAV had been configured… upon clicking on the WebDAV feature configuration page the error appeared.

Turns out this was quite a simple fix – WebDAV had been configured at the Server Level, rather than at the Site level which a) resulted in this error and b) seemingly broke WebDAV and was the cause of the issue with the DP. Simply delete the configuration at the Server Level, and set your configuration at the site level.

Thanks
SteveH

 

IIS 7.0 Https site doesn’t work ‘Page Cannot Be Displayed’

April 6th, 2011 Daniel Davies Comments off

Came across an issue recently where after a reboot we were unable to access our IIS site via it’s https address with the following error in Internet Explorer ‘Page Cannot be Displayed’

In the application event log we had the following ‘Schanel error’.

Event ID 36870

A fatal error occurred when attempting to access the SSL server credential private key. The error code returned from the cryptographic module is 0x8009030d. The internal error state is 10001.

This error occurs when you import your certificate into the ‘Certificates (Local Computer)’ personal store by dragging and dropping it from the the ‘Certificates – Current User’ personal store.

To get around this issue you have to import directly to the ‘Certificates (Local Computer)’ personal store and then apply this certificate to the IIS https binding and reboot.

Then your HTTPS site should all be working again Smile

Categories: Uncategorized Tags: , ,

URL Rewrite module for IIS7

August 16th, 2010 Rob Comments off

As part of a larger project I’ve been involved with which uses an IIS7 web application (I’ve been helping the client with their infrastructure and integrating the application with AD) we hit an issue where some 3rd party pieces of code were using absolute links *tut tut*! rather than relative ones, this had the side effect that a user would start off their session using an SSL secured https session & after performing certain tasks would find themselves on http.  Not ideal!  The application also has a requirement that the web servers are able to connect to themselves on port 80 – this could not be changed & interfering with this connection would break functionality.

To resolve this I’ve implemented the Microsoft URL Rewrite module 2 for IIS7, with the following configuration:

  1. Download and install the IIS URL re-writing module: http://www.iis.net/download/urlrewrite
  2. Go to the site in IIS manager & navigate to URL Rewrite in the right hand pain
  3. Create a new inbound rule with the following settings:
  4. Match URL:
    1. Requested URL: ‘Matches the pattern’
    2. Using: ‘Regular Expressions’
    3. Pattern: ‘(.*)’
    4. Ignore Case: ‘True’
  5. Conditions:
    1. Input ‘{HTTPS}’ Type ‘Matches the pattern’ Pattern ‘^OFF$’
    2. Input ‘{LOCAL_ADDR}’ Type ‘Does not match the pattern’ Pattern ‘127.0.0.1’
  6. Action: ‘Redirect’ Redirect URL: ‘https://{HTTP_HOST}/{R:1}’ Append Query String: True Redirect type: ‘See Other (303)’

This will not only correct broken URLs which get returned but will redirect users who hit the site via http to https which is a requirement for the service.

Handy fix – I’d often use TMG / ISA to resolve this but this customer’s solution does not feature those products (the site is being deployed internally).

 

Rob

Categories: Uncategorized Tags: ,

Redirect IIS Websites Homepage with IIS 7.0

January 7th, 2010 Daniel Davies Comments off

You may come across an issue from time to time.  Where you have an IIS website and when you type the URL of the IIS Site into your IE it brings up a homepage, but you would like to change the homepage for reason such as you would like to allow users to access a specific part of the site easier.

 For example

You have gave your IIS site a host header of “test” but you would like users to hit a different web page within the site when they simply type the host header in.

Currently they are hitting the below webpage when typing http://test

image

But this is not the page you want them to hit when they type in http://test we would like them to be redirected to http://test/test2 (Below Page)

image 

Resolution

To get this to work we will first have to create a htm file which redirects us to our desired site “http://test/test2

1, Open IIS Manager

2, Now expand the console until you get to your website and then switch to content view.

image

3, Right Click and press explore

image

4, Now we need to create the HTM in this location “C:Test”

5, Now open notepad and type the following in and put the url of what you want as your homepage and save it in the location we found out above and name it default.htm (Code Below was supplied by Rob http://risualblogs.com/blog/author/robb/)

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<html>
<head>
<title></title>
<meta http-equiv=”REFRESH” content=”0;url=http://Type Your URl”></HEAD>
<BODY>
</BODY>
</HTML>

6, Now we need to make the “default.htm” the default document. So go back into the IIS Console  and switch back to Features View and double click Default Document.

image

7, Now simply press add and type in the name of the htm file and hit ok

image

8, The final thing we need to do is to move the default.htm file to the top of the default document list so it takes precedence. So simply click default.htm and press move up.

image

9, You will get a message pop up simply press yes as this is what we want to do

image

10, Now when you type in your host header URL (http://test ) you will get redirected to the correct page (http:testTest2).

Hope this Helps You :)

Categories: Uncategorized Tags: ,

IIS – How to tackle multiple web servers & keep them in sync

December 23rd, 2009 Rob Comments off

I’ve recently been engaged on a project where we have multiple web servers (IIS7.5 on 2008r2 for those interested) which require exactly the same content and configuration (they’re sitting behind a Forefront TMG server using a web farm).  The configuration in IIS for this application happens to be complicated & while I have documented how to configure the servers, doing it over and over will not only be tedious but probably introduce some human error. 

To resolve this issue I implemented IIS 7’s shared configuration and put a process in to replicate the content between web servers.

You will need a domain account (or local account on each web server if your web servers aren’t domain joined) which will be used to access the shared configuration (it only does this – your web applications continue to run under what ever application pool identity you have set) and a file share to store the configuration on.

Assuming you’re at the stage of having a configured web server with the IIS configuration how you want it you need to export the configuration:

  1. On the first web server / machine which will host the shared configuration create a directory & share it giving full share and ntfs permissions to the service account created, all other permissions should be removed.
  2. In IIS manager on the server with IIS configured as per the previous steps click on the server node in the left pane, then open shared configuration in the right pane, then finally select the export configuration option on the right, store the export in the directory created in step 1, entering an encryption key (this should be recorded as it is needed for all nodes which will be accessing the shared configuration).
  3. When exported tick the ‘Enable shared configuration’ box, enter the UNC path to the configuration (eg \machinenameiisconfig) enter the username domainserviceaccount and the password for that account, press apply, you will be prompted for the encryption key provided in step 2.
  4. Restart the server to apply configuration, then check IIS is still functioning and the IIS manager can be accessed.

The above steps will reconfigured your already configured web server to work from the shared configuration, now we need to replicate the web content and configure all other web servers to work from the same configuration.

There are several ways of replicating the physical content, DFSR is one option, however I chose not to use it as the content on the web servers is staying static so frequent updates to the other nodes will not be required and it gives the operator responsible for the servers more control over how content updates are deployed.  So instead I used robocopy (which has been built in since Vista / Server 2008) to mirror the content from the configured server to all others (this was executed on the web server to be copied to):

 

robocopy \configuredwebserverc$inetpubwwwroot c:inetpubwwwroot /MIR

 

Once the file content was in place two quick steps are required to configure IIS to use the shared configuration:

  1. Open IIS manager, click on the server name in the left pane, then select the shared configuration option in the right pane, tick the ‘Enable shared configuration’ box, enter the UNC path to the configuration as specified on the first web server (eg \machinenameiisconfig) enter the username domainserviceaccount and the password for that account, press apply, you will be prompted for the encryption key.
  2. Restart the server to apply configuration, then check IIS is still functioning and the IIS manager can be accessed.
    This process will replicate all application pools and IIS configuration, however if you have ODBC data sources etc.. (things external to IIS which your web applications are using) then you will need to find a way to replicate these settings as well. 
    An important point is how IIS behaves if the configuration becomes unavailable, under Server 2008 (not R2) if the configuration disappears IIS will essentially stop, under R2 the server will detect this, continue working and reconnect when the configuration source comes back online.  You can enable offline files for added resiliency should you require it.