November 27, 2011

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

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".



1) First go to following location
    C:\Windows\System32\inetsrv\config
2) Open the application "applicationHost.config"



Go to<sectionGroup name="system.webServer">
in  this node


Set every section's overrideModeDefault="Allow"


or particular node if you know which on is giving issue


<section name="handlers" overrideModeDefault="Deny" />

Asp.net MVC requested page cannot be accessed because the related configuration data for the page is invalid.



HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.


Description: i got this error when i tried to deployed the asp.net mvc application on the IIS 7.5. As IIS 7.5 is very different from IIS 6.0 some setting also differ.
It was working perfectly on IIS 6.0

System Configuration on which this error occurred

Windows 7 64 bit
IIS 7.5
Asp.net 2.0/3.5 with MVC 2,3


Solution: it worked for me, it may also work for you.


Go to browser, on error page check the section "Config Source"


you will find error in specific section.
for example my error was


<system.webServer>
 <handlers


do following as per your error 

1) first go to following location
    C:\Windows\System32\inetsrv\config
2) Open the application "applicationHost.config"


go to particular section in my case


<sectionGroup name="system.webServer">
  <section name="handlers" overrideModeDefault="Deny" />


Change overrideModeDefault="Allow"

3) Reset IIS 


You may also have to perform following in addition to above step. but following steps are optional. 


b)  Set application pool to 32 bit:
  • Open IIS, 
  • Select application pool option, 
  • Now on right side select the desired app pool, 
  • Now on right side bar. select option: "Advanced Settings..." 
  • There is option "Enable 32 bit application" set it to true:
  • Now press ok.., Reset IIS
c) Set "managed pipline mode" to Classic:
if step a does not work. perform following.
  • Double click the application pool
  • select classic in  "managed pipline mode" option.

asp-net MVC HTTP Error 403-14 - Forbidden

Asp.net MVC Error: HTTP Error 403.14 - Forbidden 
The Web server is configured to not list the contents of this directory.

OR

A default document is not configured for the requested URL, and directory browsing is not enabled on the server, 

Description: i got this error when i tried to deployed the asp.net mvc application on the IIS 7.5. As IIS 7.5 is very different from IIS 6.0 some setting also differ.
It was working perfectly on IIS 6.0

System Configuration on which this error occurred

Windows 7 64 bit
IIS 7.5
Asp.net 2.0/3.5 with MVC 2


Solution: it worked for me, it may also work for you.

a)  Set application pool to 32 bit:

  • Open IIS, 
  • Select application pool option, 
  • Now on right side select the desired app pool, 
  • Now on right side bar. select option: "Advanced Settings..." 
  • There is option "Enable 32 bit application" set it to true:
  • Now press ok.., Reset IIS

b) Set "managed pipline mode" to Classic:
if step a does not work. perform following.
  • Double click the application pool
  • select classic in  "managed pipline mode" option.



 

November 26, 2011

Enable Basic Authentication in IIS 7.5, option not visible

Enable Basic authentication in IIS 7.5 version. In previous version 6.0 it was easily available and used.

How to enable basic authentication in Internet information services 7 / 7.5


There are two ways to enable basic authentication in 7
1)  Enable authentication in control panel


a) Open control panel
b) click on Programs and Features
c)  click on Turn Windows features on off.. wait it may take some time to load...
d)  select Internet information services. expand it via clicking on + plus sign
drill down further... like in following snapshot.






















Select Basic authentication like in picture and press ok.
e) Restart   IIS.. open command prompt with admin permission., type iisreset and enter..
or directly open the iis via typing inetmgr in run. and right click on iis icon in right top.. select stop... after that again right click on iis icon.. now select start

2) second way to enable the basic authentication:

Open command prompt with admin rights.

a) type cd
b) type c:
c) type cd %windir%\system32\inetsrv
d) type appcmd set config /section:basicAuthentication /enabled:true

press enter after each step.

November 09, 2011

How to know Which Sql server version / service pack installed

Sql server has some cryptic nos to know the what version of sql server and what service pack is actually installed on your machine.

To to Sql server management studio on the machine where sql server is installed
click help/about. and match the version from below list.

or Run ...> regedit....> HKLM -> software-> microsoft.>.mssqlserver..>. currentversion

RTM (Gold, no SP)SP1SP2SP3SP4
 SQL Server 2012
     codename Denali
-
 SQL Server 2008 R2
     codename Kilimanjaro
10.50.1600.110.50.2500
 SQL Server 2008
     codename Katmai
10.00.1600.2210.00.253110.00.400010.00.5500
 SQL Server 2005
     codename Yukon
9.00.1399.069.00.20479.00.30429.00.40359.00.5000
 SQL Server 2000
     codename Shiloh
8.00.1948.00.3848.00.5328.00.7608.00.2039
 SQL Server 7.0
     codename Sphinx
7.00.6237.00.6997.00.8427.00.9617.00.106


referenced from sqlserverbuilds.blogspot.com