Wednesday, July 16, 2014

Bootstrap 3 responsive not working on mobile

I was working on one eCommerce system and it was bootstrapped ... But somehow It was not working as responsive in mobile browsers but it was showing responsive nature in normal browser...

I was missing following line in header section

<meta name="viewport" content="width=device-width, 
initial-scale=1, maximum-scale=1">
And now it started working 
Submit this story to DotNetKicks


Friday, April 4, 2014

301 redirect using web.config

To do 301 permanent redirect add following line of codes in web.config.

<system .webserver>
        <rule name="Redirect to www" patternsyntax="Wildcard" stopprocessing="true">
          <match url="*">
            <add input="{HTTP_HOST}" pattern="">
          <action type="Redirect" url="{R:0}">
</system .webserver>
Submit this story to DotNetKicks


Saturday, January 18, 2014

How do I enable HTTP PUT and DELETE for ASP.NET MVC

  1. GO to Handler Mappings in your IIS Manager
  2. Find ExtensionlessUrlHandler-Integrated-4.0
  3. double click it. 
  4. Click Request Restrictions... button and on Verbs tab, add both DELETE and PUT

Remove WebDav from "Modules" and from "Handler Mappings"

                WebDAVModule, %windir%\System32\inetsrv\webdav.dll, Native, Inherited

Handler Mappings:

                WebDAV, *, Enabled, Unspecified, WebDAVModule, Inherited

Then Restart IIS

It results in a Web.Config change of:

            <remove name="WebDAVModule" />
            <remove name="WebDAV" />

Submit this story to DotNetKicks