#1: Need to add local machine host name into binding as well
#2: Disable loopback for IIS
References:
http://support2.microsoft.com/default.aspx?scid=kb;en-us;896861
http://stackoverflow.com/questions/5180851/iis-binding-with-windows-authentication
About loopback for Reflection attack
http://en.wikipedia.org/wiki/Reflection_attack
Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts
Thursday, October 23, 2014
Wednesday, October 22, 2014
Thursday, October 9, 2014
How to prevent image hotlinking in ASP.NET?
In IIS Server by URL rewrite:
http://www.it-notebook.org/iis/article/prevent_hotlinking_url_rewrite.htm
http://www.it-notebook.org/iis/article/prevent_hotlinking_url_rewrite.htm
Monday, September 15, 2014
Optimizing static websites hosted on IIS
- Minify HTML
- Set far-future expiration dates on static resources (JS, CSS, images etc.)
- Use cookieless domains for static files
- Use a CDN
Tuesday, June 3, 2014
Thursday, April 10, 2014
Wednesday, February 12, 2014
How to fix Access denies problem while run ASP.NET MVC project with Windows Authentication in Visual Studio 2012
Open project file with notepad
Change
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
To
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
The full error is:
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server’s administrator for additional assistance.
Change
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
To
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
The full error is:
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server’s administrator for additional assistance.
Wednesday, November 27, 2013
How to solve "This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". "
When deploy a website on IIS Server first time, get following 500 internal server error:
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
The first thing to do is to run
turn on/off Windows features:
So can check if related features are enabled on the server

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
The first thing to do is to run
turn on/off Windows features:
So can check if related features are enabled on the server
Thursday, October 10, 2013
Friday, June 21, 2013
Friday, May 3, 2013
Remove Unwanted HTTP Response Headers
http://blogs.msdn.com/b/varunm/archive/2013/04/23/remove-unwanted-http-response-headers.aspx
Server - Specifies web server version.
X-Powered-By - Indicates that the website is "powered by ASP.NET."
X-AspNet-Version - Specifies the version of ASP.NET used.
Server - Specifies web server version.
X-Powered-By - Indicates that the website is "powered by ASP.NET."
X-AspNet-Version - Specifies the version of ASP.NET used.
Friday, March 22, 2013
What is exception code: 0xe053534f
Mean: soft stack overflow
If hapends in IIS server, check code related to the permision
If hapends in IIS server, check code related to the permision
Thursday, December 6, 2012
How to fix "An unhandled Microsoft.NET Framework exception occured in w3wp.exe"
Change the ApplicationPoolIdentity of the application pool for your project to an account such as Local System.
Thursday, June 7, 2012
How to enable Windows Authentication for IIS 7 on Windows 2008 server?
Solution: Add related role service.
Server Manager -> Roles -> Role Services
Reference: Following link is for Windows 7/Vista
http://blogs.msdn.com/b/hongmeig/archive/2007/08/20/how-do-i-turn-on-windows-authentication-in-iis-7.aspx
Server Manager -> Roles -> Role Services
http://blogs.msdn.com/b/hongmeig/archive/2007/08/20/how-do-i-turn-on-windows-authentication-in-iis-7.aspx
Wednesday, May 9, 2012
How to deploy ASP.NET MVC 3 on IIS 6?
- Install AspNetMVC3Setup.exe
- Make sure web site and application pool are both set the ASP.NET version to 4.0.30319
- Add "Wildcard application maps"
Steps to add "Wildcard application maps":
In property for the website, click the Home Directory tab.
Click the "Configuration..." button. In the "Mappings" tab, click "Insert..."
Next to the "Wildcard application maps" label In the textbox, type in "c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll"
Uncheck the box labeled "Verify that file exists" Click OK
References:
This one is for earlier version of MVC, but idea is the same for Wildcard application maps
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
- Make sure web site and application pool are both set the ASP.NET version to 4.0.30319
- Add "Wildcard application maps"
Steps to add "Wildcard application maps":
In property for the website, click the Home Directory tab.
Click the "Configuration..." button. In the "Mappings" tab, click "Insert..."
Next to the "Wildcard application maps" label In the textbox, type in "c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll"
Uncheck the box labeled "Verify that file exists" Click OK
References:
This one is for earlier version of MVC, but idea is the same for Wildcard application maps
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Friday, March 16, 2012
How to solve access denied problem on IIS 7?
Two ways:
#2 Command line:
icacls c:\inetpub\wwwroot\YourPath /grant "IIS APPPOOL\DefaultAppPool":(OI)(CI)(RX)
#1 Manual
In file explorer, right click, goto security tab, Add IIS APPPOOL\DefaultAppPool into your foldericacls c:\inetpub\wwwroot\YourPath /grant "IIS APPPOOL\DefaultAppPool":(OI)(CI)(RX)
Reference: http://serverfault.com/questions/81165/how-to-assign-permissions-to-applicationpoolidentity-account
Thursday, March 1, 2012
What is IIS Application Pool?
Application pool is a grouping of URLs that is routed to one
or more worker processes. Application pools significantly increase both the
reliability and manageability of a Web infrastructure.
Reference:
http://technet.microsoft.com/en-us/library/cc735247(v=WS.10).aspx
Thursday, April 7, 2011
IIS 7.0 Extensionless UrlRewriting (Short urls)
IIS 7.0 Extensionless UrlRewriting (Short urls): "IIS 7.0 Extensionless UrlRewriting (Short urls)"
Saturday, February 5, 2011
How to publish a asp.net website in Windows 7
1. install the "IIS Metabase and IIS6 Configuration Compatibility" feature under Internet Information Services-Web Management Tools-IIS 6
2. FrontPage 2002 Server Extensions for IIS 7.0
http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1630
3. Compile code to AnyCPU in Build option
2. FrontPage 2002 Server Extensions for IIS 7.0
http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1630
3. Compile code to AnyCPU in Build option
Wednesday, February 2, 2011
Enable content expiration in IIS to optimize ASP.Net website
Enable content expiration in IIS to optimize ASP.Net website
Default setting is Off.
Default setting is Off.
To set the expiration of Web site content
| 1. | In IIS Manager, double-click the local computer; right-click the Web Sites folder, an individual Web site folder, a virtual directory, or a file; and then click Properties. |
| 2. | Click the HTTP Headers tab. |
| 3. | Select the Enable content expiration check box. |
| 4. | Click Expire immediately, Expire after, or Expire on, and type the appropriate expiration information in the corresponding boxes. |
Subscribe to:
Posts (Atom)