• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Wednesday, 09 Jan 2013 09:50

Handy for a batch maintenance operation a customer had to run on a few hundreds servers: they basically needed to do what’s described in this article but in a script rather than from the IIS GUI.

From Shared Configuration (Appendix 3):

By default, IIS includes two main providers for securing properties. These providers are located in the applicationHost.config file's <configProtectedData> configuration section and are defined in the <providers> element. The AesProvider is specific to dealing with encryption and decryption for properties that are in the system.webServer section. The IISWASOnlyRsaProvider is specific to dealing with encryption and decryption for properties that are in the system.applicationHost section. These keys are in the iisConfigurationKey and iisWasKey key containers and are machine-specific. In a Web farm scenario, if encryption is required, then a key from one machine - usually the one that created the applicationHost.config file - is exported and brought into the other machines so that secure properties can be decrypted and used by the Web server

So just copy the .config files from “C:\Windows\System32\Inetsrv\config” and use aspnet_regiis –px to export the Keys:

aspnet_regiis -px "iisConfigurationKey" "D:\iisConfigurationKey.xml" -pri

To import the Keys on another machine run the following:

aspnet_regiis -pi "iisConfigurationKey" "D:\iisConfigurationKey.xml"

The parameter after the -pi is the name of the key container to be imported. In this case, it is the "iisConfigurationKey" key container. The other key container that IIS uses is the "iisWasKey" key container.

 

Carlo

The difference between the right word and the almost right word is the difference between lightning and a lightning bug.

Mark Twain

Author: "Carlo Cardella" Tags: "IIS"
Send by mail Print  Save  Delicious 
Date: Wednesday, 09 Jan 2013 09:30

I saw this error some time ago while working on an eCommerce solution. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server. Redirect/move happens like it should, but after approximatively 2 minutes after posting an order the user receives an http error 502.
The order is correctly processed by SAP but the web applications is built in a way that the user is getting a confirmation page when the order is processed: this page is never presented to the user due to the 502 error.

FREB gave us further details about the error: 502.3, 2147954417 which translates into ERROR_INTERNET_OPERATION_CANCELLED.

This lead me to this post which describes a different error but based on the same principle and the solution still applies to our scenario: we increased the proxy timeout to 5 minutes to accommodate all reasonably long running requests and the problem was solved.

appcmd.exe set config  -section:system.webServer/proxy /timeout:"00:05:00"  /commit:apphost

 

 

Carlo

It's not the size of the dog in the fight, it's the size of the fight in the dog.

Mark Twain

Author: "Carlo Cardella" Tags: "IIS, ARR"
Send by mail Print  Save  Delicious 
Date: Monday, 15 Nov 2010 11:00

Suppose you have a web application which authenticates clients through a smartcard certificate and everything is working fine, then you decide to move your web application to Windows Server 2008 (which is a good decision in many ways Winking smile) but your users are suddenly complaining about slow performance, pages are loading slower than they used to do and you cannot find any explanation on the network infrastructure, everything seems to be properly configured on the client and on the server… what is happening?

Well, as you can imagine this is what happened to a customer I worked with recently. A closer look at the client showed that every time a new object in the page was loaded (images, script files, css…) the smartcard was checked for the certificate, resulting in a major performance loss.

To make the story short, the behavior is controlled by client certificate negotiation, specifically by SSLAlwaysNegoClientCert which in IIS 7 has been moved to http.sys (see http://learn.iis.net/page.aspx/110/changes-between-iis-60-and-iis-7-security/); you can configure the  <access> element as described or using netsh with a command such as the following:

netsh http add sslcert ipport=0.0.0.0:$port certstorename=MY certhash=$Certhash appid=$Appnr sslctlidentifier=$CTLlijst sslctlstorename=CA clientcertnegotiation=enable

Carlo

Quote of the day:
Human beings are perhaps never more frightening than when they are convinced beyond doubt that they are right. - Laurens Van der Post
Author: "carloc" Tags: "IIS, Security"
Send by mail Print  Save  Delicious 
Date: Monday, 15 Nov 2010 11:00

Suppose you have a web application which authenticates clients through a smartcard certificate and everything is working fine, then you decide to move your web application to Windows Server 2008 (which is a good decision in many ways Winking smile) but your users are suddenly complaining about slow performance, pages are loading slower than they used to do and you cannot find any explanation on the network infrastructure, everything seems to be properly configured on the client and on the server… what is happening?

Well, as you can imagine this is what happened to a customer I worked with recently. A closer look at the client showed that every time a new object in the page was loaded (images, script files, css…) the smartcard was checked for the certificate, resulting in a major performance loss.

To make the story short, the behavior is controlled by client certificate negotiation, specifically by SSLAlwaysNegoClientCert which in IIS 7 has been moved to http.sys (see http://learn.iis.net/page.aspx/110/changes-between-iis-60-and-iis-7-security/); you can configure the  <access> element as described or using netsh with a command such as the following:

netsh http add sslcert ipport=0.0.0.0:$port certstorename=MY certhash=$Certhash appid=$Appnr sslctlidentifier=$CTLlijst sslctlstorename=CA clientcertnegotiation=enable

Carlo

Quote of the day:
Human beings are perhaps never more frightening than when they are convinced beyond doubt that they are right. - Laurens Van der Post
Author: "carloc" Tags: "IIS, Security"
Send by mail Print  Save  Delicious 
Date: Friday, 29 Oct 2010 16:40

I recently come across an interesting request which read like this:

A simple webapplication with one Textbox and one label. The Textbox has Autopostback=”true” and has an event listener attached to the TextChanged event. In the TextChanged event the label’s text is set to the text in the textbox. A javascript function “formats” the value of the textbox on the keyUp event.   The ”problem” The postback is not fired for a textbox if a javascript function sets the value of the textbox in the keyDown or keyUp event. This only occurs in IE (IE 8, IE 7, FF 3.6.8, Opera 10.6 and Chrome 5 has been tested). No javascript errors or any kind of error message, the postback is just not being fired.

And here’s a sample page to reproduce the problem:

<%@ Page Language="vb" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" EnableViewStateMac="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

<script type="text/javascript" language="javascript">
function FormatTextBox(obj) {
//This is just a dummy function that adds $ as the first character.
var value = obj.value

if (value.length > 0 && value.charAt(0) != '$')
value = '$' + value;

obj.value = value; // This line causes the autopostback not to fire. This only happens if the value of the input
                               // is set in the keyup or keydown event and only in IE.
}
</script>

<script language="vbscript" runat="server">
'Just to have something happening during the autopostback.
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Label1.Text = TextBox1.Text
End Sub
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeyup="return FormatTextBox(this);" AutoPostBack="true"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>

Type something in the textbox then hit TAB (or click somewhere on the white page) and you’ll see nothing happens, while you should have a postback and the Label should reflect the text you typed (plus the “$” sign added by the FormatTextBox function). Interestingly enough if you type only one character in the TextBox you’ll have the problem, if you type in two or more characters then everything will work. Another interesting effect: if you type the dollar sign (“$”) which happens to be the sign added by javascript, you’ll never have an automatic postback no matter how many “$” you’ll type in.

Why is it happening? Well, any time you type a new character into the TextBox, IE compares the new value to some internal 'initial' value that it it keeping to see if the text has changed.  However, when you set the value of the TextBox programmatically, IE makes the assumption that you know what just happened and that it doesn't have to fire the onChange event.  So it resets its internal tracking value to be the same as the value you just programmatically set.  Then when you tab out of focus, the two values are the same and no onChange event gets fired.

So, how to deal with it? The easiest solution is to use the OnBlur event or,

if you really need to hook on the onkeyup event, is to track the state of the TextBox on your own and force the onchange event to fire, even if you programatically set the TextBox value.  Use a TextBox like this:

<asp:TextBox ID="TextBox1" runat="server" onkeyup="FormatTextBoxDirty(this)" 
onblur="if (this.dirty){this.onchange();}" AutoPostBack="true" />

and javascript like this:

function FormatTextBoxDirty(obj) {
obj.dirty = false; // This prevents firing onchange twice in the event that we don't modify the value
if (obj.value.length > 0 && obj.value.charAt(0) != '$') {
obj.value = '$' + obj.value;
obj.dirty = true;
}
}

Here’s the working page:
<%@ Page Language="vb" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" EnableViewStateMac="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript" language="javascript">
function FormatTextBox(obj) {
//This is just a dummy function that adds $ as the first character.
var value = obj.value

if (value.length > 0 && value.charAt(0) != '$')
value = '$' + value;

obj.value = value; // This line causes the autopostback not to fire. This only happens if the value of the input
                               // is set in the keyup or keydown event and only in IE.
}

function FormatTextBoxDirty(obj) {
obj.dirty = false; // This prevents firing onchange twice in the event that we don't modify the value
if (obj.value.length > 0 && obj.value.charAt(0) != '$') {
obj.value = '$' + obj.value;
obj.dirty = true;
}
}

</script>
<script language="vbscript" runat="server">
'Just to have something happening during the autopostback.
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Label1.Text = TextBox1.Text
End Sub
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeyup="FormatTextBoxDirty(this)" onblur="if (this.dirty){this.onchange();}"
AutoPostBack="true" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>

 

P.s.
Thanks to Steve Molloy for this help on this matter.


Carlo

Quote of the day:
Minds are like parachutes: they only work when they are open – Anonymous

Author: "carloc" Tags: "Internet Explorer, Scripting/ASP"
Send by mail Print  Save  Delicious 
Date: Friday, 29 Oct 2010 16:40

I recently come across an interesting request which read like this:

A simple webapplication with one Textbox and one label. The Textbox has Autopostback=”true” and has an event listener attached to the TextChanged event. In the TextChanged event the label’s text is set to the text in the textbox. A javascript function “formats” the value of the textbox on the keyUp event.   The ”problem” The postback is not fired for a textbox if a javascript function sets the value of the textbox in the keyDown or keyUp event. This only occurs in IE (IE 8, IE 7, FF 3.6.8, Opera 10.6 and Chrome 5 has been tested). No javascript errors or any kind of error message, the postback is just not being fired.

And here’s a sample page to reproduce the problem:

<%@ Page Language="vb" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" EnableViewStateMac="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>

<script type="text/javascript" language="javascript">
function FormatTextBox(obj) {
//This is just a dummy function that adds $ as the first character.
var value = obj.value

if (value.length > 0 && value.charAt(0) != '$')
value = '$' + value;

obj.value = value; // This line causes the autopostback not to fire. This only happens if the value of the input
                               // is set in the keyup or keydown event and only in IE.
}
</script>

<script language="vbscript" runat="server">
'Just to have something happening during the autopostback.
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Label1.Text = TextBox1.Text
End Sub
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeyup="return FormatTextBox(this);" AutoPostBack="true"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>

Type something in the textbox then hit TAB (or click somewhere on the white page) and you’ll see nothing happens, while you should have a postback and the Label should reflect the text you typed (plus the “$” sign added by the FormatTextBox function). Interestingly enough if you type only one character in the TextBox you’ll have the problem, if you type in two or more characters then everything will work. Another interesting effect: if you type the dollar sign (“$”) which happens to be the sign added by javascript, you’ll never have an automatic postback no matter how many “$” you’ll type in.

Why is it happening? Well, any time you type a new character into the TextBox, IE compares the new value to some internal 'initial' value that it it keeping to see if the text has changed.  However, when you set the value of the TextBox programmatically, IE makes the assumption that you know what just happened and that it doesn't have to fire the onChange event.  So it resets its internal tracking value to be the same as the value you just programmatically set.  Then when you tab out of focus, the two values are the same and no onChange event gets fired.

So, how to deal with it? The easiest solution is to use the OnBlur event or,

if you really need to hook on the onkeyup event, is to track the state of the TextBox on your own and force the onchange event to fire, even if you programatically set the TextBox value.  Use a TextBox like this:

<asp:TextBox ID="TextBox1" runat="server" onkeyup="FormatTextBoxDirty(this)" 
onblur="if (this.dirty){this.onchange();}" AutoPostBack="true" />

and javascript like this:

function FormatTextBoxDirty(obj) {
obj.dirty = false; // This prevents firing onchange twice in the event that we don't modify the value
if (obj.value.length > 0 && obj.value.charAt(0) != '$') {
obj.value = '$' + obj.value;
obj.dirty = true;
}
}

Here’s the working page:
<%@ Page Language="vb" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" EnableViewStateMac="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript" language="javascript">
function FormatTextBox(obj) {
//This is just a dummy function that adds $ as the first character.
var value = obj.value

if (value.length > 0 && value.charAt(0) != '$')
value = '$' + value;

obj.value = value; // This line causes the autopostback not to fire. This only happens if the value of the input
                               // is set in the keyup or keydown event and only in IE.
}

function FormatTextBoxDirty(obj) {
obj.dirty = false; // This prevents firing onchange twice in the event that we don't modify the value
if (obj.value.length > 0 && obj.value.charAt(0) != '$') {
obj.value = '$' + obj.value;
obj.dirty = true;
}
}

</script>
<script language="vbscript" runat="server">
'Just to have something happening during the autopostback.
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Label1.Text = TextBox1.Text
End Sub
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeyup="FormatTextBoxDirty(this)" onblur="if (this.dirty){this.onchange();}"
AutoPostBack="true" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>

 

P.s.
Thanks to Steve Molloy for this help on this matter.


Carlo

Quote of the day:
Minds are like parachutes: they only work when they are open – Anonymous

Author: "carloc" Tags: "Internet Explorer, Scripting/ASP"
Send by mail Print  Save  Delicious 
Date: Tuesday, 27 Jul 2010 19:58

Stephen King fans like me for sure know Night Shift, a collection of 19 short stories I first read almost (oh, my…) almost 20 years ago. In Italian the title of this collection has been translated as “A volte ritornano” which literally means Sometimes they come back. This is exactly what I thought yesterday when I got yet another version of the “503 Service Unavailable” error: after I have already written about this error here and here, I’m writing the third post about it. I’m wondering if I’ll end up with a 19 post collection as Night Shift has… Who me?

Anyway, here’s the new story: the application pools of this web server were failing with the following error

(eventid 281) The worker process for application pool 'MSExchangeOWAAppPool' encountered an error 'Unrecognized attribute 'precondition' trying to read global module configuration data from file '\\?\C:\inetpub\temp\apppools\MSExchangeOWAAppPool.config', line number '281'.  Worker process startup aborted.

As you can see the precondition keyword is mistyped (it should be preCondition, capital “C”) and if we changed the .config file mentioned in the error message we were able to start our application pool but randomly (most of the time after a reboot, though) the problem came back. Interesting to note is the path of the .config file mentioned in the error: C:\inetpub\temp\AppPools\xxxxxx.config Nerd smile

This is where Configuration Isolation stores the application pool specific configuration files:

IIS worker processes do not have Read access to applicationHost.config. How, then, are they able to read any of the configuration set in this file?

The answer lies in the configuration isolation feature provided by IIS 7.0, which is always on by default. Instead of enabling IIS worker processes to read applicationHost.config directly when reading the configuration file hierarchy, IIS generates filtered copies of this file and uses these copies as a replacement of applicationHost.config when configuration is read inside the IIS worker process.

The reason for doing this is to prevent IIS worker processes from application pool A to be able to read configuration information in applicationHost.config that is intended for application pool B. Because applicationHost.config may contain sensitive information, such as the user name and password for custom application pool identities, as well as user name and password for virtual directories, allowing all application pools to access applicationHost.config would break application pool isolation.

WAS is responsible for generating the temporary application pool configuration files that each IIS worker process uses as a replacement of applicationHost.config. These files are placed by default in the %SystemDrive%\Inetpub\Temp\Apppools directory and are named AppPoolName.config. As mentioned earlier, these files are configured to allow access only to the IIS worker processes in the corresponding application pool, by using the IIS APPPOOL\AppPoolName Application Pool SID.

Note This process occurs automatically each time applicationHost.config is changed and therefore does not require any manual action from the administrator outside of normal configuration procedures.

Each application pool configuration file contains the configuration in applicationHost.config, with the following information removed:

  • All application pool definitions in the system.applicationHost/applicationPools configuration section. Only WAS is required to read this configuration section.
  • Any Web site definitions in the system.applicationHost/sites configuration section for sites that do not have applications in the current application pool.
  • Any configuration in location tags for specific Web sites, applications, or URLs that do not reside inside the applications in the current application pool.

Caution All application definitions (and their virtual directory definitions, possibly containing user name and password credentials) for any site that has at least one application in the current application pool will be present in the application pool configuration file. To disable this behavior and include only the application definitions for applications in the application pool, set the IsolationWholeSiteInclude DWORD value to 0 in the HKLM\System\CurrentControlSet\Services\WAS\Parameters key and perform an IISRESET. This may break applications in sites with applications in multiple application pools when they attempt to map physical paths for URLs in other applications.

Keep in mind that global configuration settings set in the applicationHost.config (without using location tags to apply them to specific Web sites, applications, or URLs) are not filtered. Each application pool configuration file will contain all of these settings.

Configuration isolation is a key part of the application pool isolation strategy in IIS 7.0. It is enabled by default to provide configuration isolation for server-level configuration in applicationHost.config. For strategies on achieving proper application pool isolation, see the section titled "Isolating Applications" earlier in this chapter.

Caution Configuration stored in .NET Framework machine.config and root web.config files is not isolated. Only configuration stored in applicationHost.config is isolated.

So, this means the mistyped entry very likely originates from applicationHost.config… We do not know what (or who Winking smile) changed this since I have the same roles and features installed on my machine as the customer had on his server, but after fixing the typo in the centralized configuration file the problem disappeared.

 

Carlo

Quote of the day:
To avoid situations in which you might make mistakes may be the biggest mistake of all. - Peter McWilliams

Author: "carloc" Tags: "IIS, .NET Framework"
Send by mail Print  Save  Delicious 
Date: Tuesday, 27 Jul 2010 19:58

Stephen King fans like me for sure know Night Shift, a collection of 19 short stories I first read almost (oh, my…) almost 20 years ago. In Italian the title of this collection has been translated as “A volte ritornano” which literally means Sometimes they come back. This is exactly what I thought yesterday when I got yet another version of the “503 Service Unavailable” error: after I have already written about this error here and here, I’m writing the third post about it. I’m wondering if I’ll end up with a 19 post collection as Night Shift has… Who me?

Anyway, here’s the new story: the application pools of this web server were failing with the following error

(eventid 281) The worker process for application pool 'MSExchangeOWAAppPool' encountered an error 'Unrecognized attribute 'precondition' trying to read global module configuration data from file '\\?\C:\inetpub\temp\apppools\MSExchangeOWAAppPool.config', line number '281'.  Worker process startup aborted.

As you can see the precondition keyword is mistyped (it should be preCondition, capital “C”) and if we changed the .config file mentioned in the error message we were able to start our application pool but randomly (most of the time after a reboot, though) the problem came back. Interesting to note is the path of the .config file mentioned in the error: C:\inetpub\temp\AppPools\xxxxxx.config Nerd smile

This is where Configuration Isolation stores the application pool specific configuration files:

IIS worker processes do not have Read access to applicationHost.config. How, then, are they able to read any of the configuration set in this file?

The answer lies in the configuration isolation feature provided by IIS 7.0, which is always on by default. Instead of enabling IIS worker processes to read applicationHost.config directly when reading the configuration file hierarchy, IIS generates filtered copies of this file and uses these copies as a replacement of applicationHost.config when configuration is read inside the IIS worker process.

The reason for doing this is to prevent IIS worker processes from application pool A to be able to read configuration information in applicationHost.config that is intended for application pool B. Because applicationHost.config may contain sensitive information, such as the user name and password for custom application pool identities, as well as user name and password for virtual directories, allowing all application pools to access applicationHost.config would break application pool isolation.

WAS is responsible for generating the temporary application pool configuration files that each IIS worker process uses as a replacement of applicationHost.config. These files are placed by default in the %SystemDrive%\Inetpub\Temp\Apppools directory and are named AppPoolName.config. As mentioned earlier, these files are configured to allow access only to the IIS worker processes in the corresponding application pool, by using the IIS APPPOOL\AppPoolName Application Pool SID.

Note This process occurs automatically each time applicationHost.config is changed and therefore does not require any manual action from the administrator outside of normal configuration procedures.

Each application pool configuration file contains the configuration in applicationHost.config, with the following information removed:

  • All application pool definitions in the system.applicationHost/applicationPools configuration section. Only WAS is required to read this configuration section.
  • Any Web site definitions in the system.applicationHost/sites configuration section for sites that do not have applications in the current application pool.
  • Any configuration in location tags for specific Web sites, applications, or URLs that do not reside inside the applications in the current application pool.

Caution All application definitions (and their virtual directory definitions, possibly containing user name and password credentials) for any site that has at least one application in the current application pool will be present in the application pool configuration file. To disable this behavior and include only the application definitions for applications in the application pool, set the IsolationWholeSiteInclude DWORD value to 0 in the HKLM\System\CurrentControlSet\Services\WAS\Parameters key and perform an IISRESET. This may break applications in sites with applications in multiple application pools when they attempt to map physical paths for URLs in other applications.

Keep in mind that global configuration settings set in the applicationHost.config (without using location tags to apply them to specific Web sites, applications, or URLs) are not filtered. Each application pool configuration file will contain all of these settings.

Configuration isolation is a key part of the application pool isolation strategy in IIS 7.0. It is enabled by default to provide configuration isolation for server-level configuration in applicationHost.config. For strategies on achieving proper application pool isolation, see the section titled "Isolating Applications" earlier in this chapter.

Caution Configuration stored in .NET Framework machine.config and root web.config files is not isolated. Only configuration stored in applicationHost.config is isolated.

So, this means the mistyped entry very likely originates from applicationHost.config… We do not know what (or who Winking smile) changed this since I have the same roles and features installed on my machine as the customer had on his server, but after fixing the typo in the centralized configuration file the problem disappeared.

 

Carlo

Quote of the day:
To avoid situations in which you might make mistakes may be the biggest mistake of all. - Peter McWilliams

Author: "carloc" Tags: "IIS, .NET Framework"
Send by mail Print  Save  Delicious 
Date: Friday, 23 Jul 2010 14:15

Lots of stuff kept me busy over the last few months and this blog has been a bit too quiet… let me try to revamp it a bit (new graphic layout will come later).

I recently worked on an interesting case where a simple GridView with pagination enabled was not working as expected: every time we clicked a different page (note, page referred to the GridView pages, not .aspx pages…) we were quickly brought back to the first page: no errors logged anywhere (IIS logs, Fiddler, event viewer… nothing really useful there). Then we decided to make a quick test: we bypassed the ISA proxy and everything started working fine, no way to reproduce the problem again; needless to say, as soon as we reconfigured the proxy in IE the problem came back.

My colleague Alvar works also on ISA cases and suggested the article POST requests that do not have a POST body may be sent to a Web server that is published in ISA Server 2006 and this actually did the trick, problem solved! Thanks Alvar Smile

 

Carlo

Quote of the day:
Great people talk about ideas, average people talk about things, and small people talk about wine. - Fran Lebowitz
Author: "carloc" Tags: ".NET Framewor, ISA Server"
Send by mail Print  Save  Delicious 
Date: Friday, 23 Jul 2010 14:15

Lots of stuff kept me busy over the last few months and this blog has been a bit too quiet… let me try to revamp it a bit (new graphic layout will come later).

I recently worked on an interesting case where a simple GridView with pagination enabled was not working as expected: every time we clicked a different page (note, page referred to the GridView pages, not .aspx pages…) we were quickly brought back to the first page: no errors logged anywhere (IIS logs, Fiddler, event viewer… nothing really useful there). Then we decided to make a quick test: we bypassed the ISA proxy and everything started working fine, no way to reproduce the problem again; needless to say, as soon as we reconfigured the proxy in IE the problem came back.

My colleague Alvar works also on ISA cases and suggested the article POST requests that do not have a POST body may be sent to a Web server that is published in ISA Server 2006 and this actually did the trick, problem solved! Thanks Alvar Smile

 

Carlo

Quote of the day:
Great people talk about ideas, average people talk about things, and small people talk about wine. - Fran Lebowitz
Author: "carloc" Tags: ".NET Framewor, ISA Server"
Send by mail Print  Save  Delicious 
Date: Wednesday, 28 Apr 2010 20:23

I’ve been using the new Arc Keyboard for a few weeks now and I’m very pleased with it, I like it especially for typing. But (there is always a “but” Winking smile)… Unfortunately I have to say this keyboard is not very practical when working with Windbg or Visual Studio (at least with the Italian layout) where you have to type special characters such as tilde (~) or braches ( { } ). Well, it is possible to get braches with the key combination ATL GR+SHIFT+è for the open one and ALT GR+SHIFT++ or ALT+123 and ALT+125 on the numpad if available and despite the weird key combination I got used to press it with only one hand and my typing flow was acceptable, even on a laptop where the numpad cannot be used. Anyway I’ve not been able to find how to get the tilde sign on an Italian keyboard without using the numpad combination (ALT+126), this means I cannot use neither my laptop nor the Arc Keyboard for coding… Should I use two different keyboards, then? No way Shifty

Bing came to the rescue and pointed me to the Keyboard Layout Creator that, among other things, allows to modify and extend an existing keyboard layout adding new keys and key combinations, and it’s easy to use, too Smile.

So I started loading the Italian keyboard layout and decided to use the ALT GR key as my function key for my new key combinations: it’s easy to check which keys are already assigned and which are free:

Italian standard keyboard layoout

Now just double-click a key on the keyboard to get this dialog:

assign new key

Now just add the new key in the box with the corresponding control key combination (I chose CTRL+ALT+<key>) to assign it; after some quick tests I came up with the following layout which I’m using on all my machines now:

custom keyboard layout

From the Project menu is possible to validate and test the new keyboard layout and also the Build DLL and Setup Package that creates a MSI setup package to install the new keyboard. Once installed, the new keyboard can be enabled from the Text Services and Input Languages dialog (click on Change keyboard on Region and Language dialog, Keyboarda and Languages tab), choose your custom keyboard layout as the Default input language:

input languages

Hope you’ll enjoy your new keyboard layout as I’m doing with mine Nerd smile.

Carlo

Quote of the day: Read, every day, something no one else is reading. Think, every day, something no one else is thinking. Do, every day, something no one else would be silly enough to do. It is bad for the mind to be always part of unanimity. - Christopher Morley
Author: "carloc" Tags: "Productivity, Tools"
Send by mail Print  Save  Delicious 
Date: Wednesday, 28 Apr 2010 20:23

I’ve been using the new Arc Keyboard for a few weeks now and I’m very pleased with it, I like it especially for typing. But (there is always a “but” Winking smile)… Unfortunately I have to say this keyboard is not very practical when working with Windbg or Visual Studio (at least with the Italian layout) where you have to type special characters such as tilde (~) or braches ( { } ). Well, it is possible to get braches with the key combination ATL GR+SHIFT+è for the open one and ALT GR+SHIFT++ or ALT+123 and ALT+125 on the numpad if available and despite the weird key combination I got used to press it with only one hand and my typing flow was acceptable, even on a laptop where the numpad cannot be used. Anyway I’ve not been able to find how to get the tilde sign on an Italian keyboard without using the numpad combination (ALT+126), this means I cannot use neither my laptop nor the Arc Keyboard for coding… Should I use two different keyboards, then? No way Shifty

Bing came to the rescue and pointed me to the Keyboard Layout Creator that, among other things, allows to modify and extend an existing keyboard layout adding new keys and key combinations, and it’s easy to use, too Smile.

So I started loading the Italian keyboard layout and decided to use the ALT GR key as my function key for my new key combinations: it’s easy to check which keys are already assigned and which are free:

Italian standard keyboard layoout

Now just double-click a key on the keyboard to get this dialog:

assign new key

Now just add the new key in the box with the corresponding control key combination (I chose CTRL+ALT+<key>) to assign it; after some quick tests I came up with the following layout which I’m using on all my machines now:

custom keyboard layout

From the Project menu is possible to validate and test the new keyboard layout and also the Build DLL and Setup Package that creates a MSI setup package to install the new keyboard. Once installed, the new keyboard can be enabled from the Text Services and Input Languages dialog (click on Change keyboard on Region and Language dialog, Keyboarda and Languages tab), choose your custom keyboard layout as the Default input language:

input languages

Hope you’ll enjoy your new keyboard layout as I’m doing with mine Nerd smile.

Carlo

Quote of the day: Read, every day, something no one else is reading. Think, every day, something no one else is thinking. Do, every day, something no one else would be silly enough to do. It is bad for the mind to be always part of unanimity. - Christopher Morley
Author: "carloc" Tags: "Productivity, Tools"
Send by mail Print  Save  Delicious 
Date: Wednesday, 28 Apr 2010 20:23

I’ve been using the new Arc Keyboard for a few weeks now and I’m very pleased with it, I like it especially for typing. But (there is always a “but” Winking smile)… Unfortunately I have to say this keyboard is not very practical when working with Windbg or Visual Studio (at least with the Italian layout) where you have to type special characters such as tilde (~) or braches ( { } ). Well, it is possible to get braches with the key combination ATL GR+SHIFT+è for the open one and ALT GR+SHIFT++ or ALT+123 and ALT+125 on the numpad if available and despite the weird key combination I got used to press it with only one hand and my typing flow was acceptable, even on a laptop where the numpad cannot be used. Anyway I’ve not been able to find how to get the tilde sign on an Italian keyboard without using the numpad combination (ALT+126), this means I cannot use neither my laptop nor the Arc Keyboard for coding… Should I use two different keyboards, then? No way Shifty

Bing came to the rescue and pointed me to the Keyboard Layout Creator that, among other things, allows to modify and extend an existing keyboard layout adding new keys and key combinations, and it’s easy to use, too Smile.

So I started loading the Italian keyboard layout and decided to use the ALT GR key as my function key for my new key combinations: it’s easy to check which keys are already assigned and which are free:

Italian standard keyboard layoout

Now just double-click a key on the keyboard to get this dialog:

assign new key

Now just add the new key in the box with the corresponding control key combination (I chose CTRL+ALT+<key>) to assign it; after some quick tests I came up with the following layout which I’m using on all my machines now:

custom keyboard layout

From the Project menu is possible to validate and test the new keyboard layout and also the Build DLL and Setup Package that creates a MSI setup package to install the new keyboard. Once installed, the new keyboard can be enabled from the Text Services and Input Languages dialog (click on Change keyboard on Region and Language dialog, Keyboarda and Languages tab), choose your custom keyboard layout as the Default input language:

input languages

Hope you’ll enjoy your new keyboard layout as I’m doing with mine Nerd smile.

Carlo

Quote of the day: Read, every day, something no one else is reading. Think, every day, something no one else is thinking. Do, every day, something no one else would be silly enough to do. It is bad for the mind to be always part of unanimity. - Christopher Morley
Author: "carloc" Tags: "Productivity, Tools"
Send by mail Print  Save  Delicious 
Date: Saturday, 13 Mar 2010 22:58

Download it from the IDEVDataCollector page Smile.

Don’t expect too sophisticated coding techniques (at least it gets the job done), let me know what you think, I’m open for suggestions and feature requests Nerd.

Carlo

Quote of the day: ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sir Arthur Conan Doyle

Author: "carloc" Tags: "IDEVDataCollector"
Send by mail Print  Save  Delicious 
Date: Saturday, 13 Mar 2010 22:58

Download it from the IDEVDataCollector page Smile.

Don’t expect too sophisticated coding techniques (at least it gets the job done), let me know what you think, I’m open for suggestions and feature requests Nerd.

Carlo

Quote of the day: ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sir Arthur Conan Doyle

Author: "carloc" Tags: "IDEVDataCollector"
Send by mail Print  Save  Delicious 
Date: Saturday, 13 Mar 2010 22:58

Download it from the IDEVDataCollector page Smile.

Don’t expect too sophisticated coding techniques (at least it gets the job done), let me know what you think, I’m open for suggestions and feature requests Nerd.

Carlo

Quote of the day: ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. - Sir Arthur Conan Doyle

Author: "carloc" Tags: "IDEVDataCollector"
Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Mar 2010 15:04

It took me some time (mostly because of other demanding tasks and commitments I have for my daily job) but finally I have just updated IDEVDataCollector to support IIS 6, it’s available at the tool main page: http://blogs.msdn.com/carloc/pages/idevdatacollector.aspx.

Give it a try and let me know what you think Nerd

P.s.
Yes, I’m planning to release the source code too, stay tuned!

 

Carlo

Quote of the day:
Clothes make the man. Naked people have little or no influence on society. - Mark Twain
Author: "carloc" Tags: "ASP.NET, IIS, Tools, Troubleshooting, ID..."
Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Mar 2010 15:04

It took me some time (mostly because of other demanding tasks and commitments I have for my daily job) but finally I have just updated IDEVDataCollector to support IIS 6, it’s available at the tool main page: http://blogs.msdn.com/carloc/pages/idevdatacollector.aspx.

Give it a try and let me know what you think Nerd

P.s.
Yes, I’m planning to release the source code too, stay tuned!

 

Carlo

Quote of the day:
Clothes make the man. Naked people have little or no influence on society. - Mark Twain
Author: "carloc" Tags: "ASP.NET, IIS, Tools, Troubleshooting, ID..."
Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Mar 2010 15:04

It took me some time (mostly because of other demanding tasks and commitments I have for my daily job) but finally I have just updated IDEVDataCollector to support IIS 6, it’s available at the tool main page: http://blogs.msdn.com/carloc/pages/idevdatacollector.aspx.

Give it a try and let me know what you think Nerd

P.s.
Yes, I’m planning to release the source code too, stay tuned!

 

Carlo

Quote of the day:
Clothes make the man. Naked people have little or no influence on society. - Mark Twain
Author: "carloc" Tags: "ASP.NET, IIS, Tools, Troubleshooting, ID..."
Send by mail Print  Save  Delicious 
Date: Monday, 01 Feb 2010 16:07

Over the last couple of months among other things I’ve been working on a tool to automatically the logs and information in my team we usually ask at the beginning of a new Support Call: all standard things such as IIS logs, event logs, .config files etc… Not all of those files are necessary for every case (as usual it depends on the problem at hand), but experience tells me the more information we have about the environment, the more chances we have to spot small inconsistencies, configuration problems etc… that sometimes can lay unnoticed and interfere with our work.

So, enter our guest:

IDevDataCollector

IDevDataCollector

I tried to keep the UI as simple and organized as possible, utilization is very easy, just run it and click the “Collect” button, sit there a couple of minutes (how much exactly will depend on the logs collected) and you’re done Smile. Please note that I’m still working on it, this is just a preview release but I’d love to have your feedback/bug reports/feature requests etc…, keeping in mind that the scope of this tool is to facilitate troubleshooting and data collection for IIS/ASP.NET related problems, I am not interested (and probably do not have the time) to build an omnicomprehensive tool to replace everything else we have today Nerd.

So, here is the list of what it collects so far:

  • IIS
    • IIS logs
    • IIS configuration (content of C:\Windows\System32\Inetsrv\config for IIS 7, metabase.xml for IIS 6)
    • HttpErr logs
    • Freb logs (IIS 7 only)
  • ASP.NET
    • .config files and .browser files under .NET Framework installation folder(s): all versions available on the machine
    • .config files for the sites/vdirs configured in IIS (the list of sites and applications is dynamically read from the config store)
    • ASP.NET setup logs
    • ACLs for the sites and applications defined in IIS (the list of sites and applications is dynamically read from the config store)
    • Result from browsing get_aspx_version.aspx (the page does not exist, this is made on purpose to get the 404 error page from IIS)
  • Event Logs
    • Application
    • Security (not enabled by default)
    • System
  • Environment
    • System information (uses msinfo32.exe, might take a few minutes to complete)

Important: it currently works only with IIS 7 (hence on Vista/Windows 7/Windows 2008 and Windows 2008 R2).

Already on the “to do” list:

  • Enable Windows 2003 (IIS6) support
  • Support IIS7 shared configuration
  • Collect local policy information for the worker process account
  • Collect custom event logs (in case one is used to store custom application messages)
  • Improve performances and enhance application logging
  • Implement a log report (such a summary HTML page or similar) for easy access and review to the collected information
  • Automatically compress the collected logs for an easier transfer
  • Suggestions?

The dedicated page is http://blogs.msdn.com/carloc/pages/idevdatacollector.aspx, let me know what if think! Wink

Carlo

Quote of the day:
In archaeology you uncover the unknown. In diplomacy you cover the known. - Thomas Pickering
Author: "carloc" Tags: "ASP.NET, IIS, Tools, Troubleshooting, ID..."
Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader