Skip to main content

Posts

Showing posts from May, 2013

IIS Url Rewrite and HTTP POST data

If you play around with IIS Url Rewriting rules and try to do redirects on an HTTP POST you loose your POST data.

To make sure you get the post data you have to set the `redirectType` to `Temporary` within your rules. So the action configuration looks like this

<action redirectType="Temporary" type="Redirect" url="http://{HTTP_HOST}{REQUEST_URI}"> </action>
You may think what scenario warrant a POST request redirect. We faced one such scenario while doing SSO with a federated Identity Provider (IP)  such as Google, Azure AD. In federated authentication scenario once the user is authenticated by the IP, it redirects back to your site with claim tokens in a POST request over secure channel (https). In our case we wanted to redirect to user back http after receiving the request. But any redirects were causing loss of token. By doing a 307 (Temporary) redirect we were able to preserve the post data.

Remote login on Azure Roles

In case you do not follow this guy :), there has been one significant change to Azure which would make developers life much easier while debugging and testing an azure deployment.

You can now enable remote login into azure deployment without requiring you to enable it during the package creation. This means even if the deployment happened with Remote login not enable, you can still enable remote login from azure management portal directly. More details are available here 

So no more forgetting remote login option. Just do a deployment and if required enable remote login from azure management portal.