Search This Blog

Deploying MVC4 website in IIS in Windows Server 2008 R2

First step, publish the website, and then deploy it in IIS.
Error: Forbidden error, directory listing disabled
Solution: Add [module runAllManagedModuleForAllRequests=true]   to web.config under system.webServer node.

 [system.webServer]
    [validation validateIntegratedModeConfiguration="false" /]
[modules runAllManagedModulesForAllRequests="true" /]
........
[system.webServer]


Another option, is not to use this method , instead use
[modules]
  [remove name="UrlRoutingModule-4.0" /]
  [add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" /]
[/modules]

2. Error : Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'.

Cause:  using EF 5.0 with .net 4
Since, i was not using EF, i removed it with Nuget. As i created the website with the default Internet application template, it came along with.

3. Oracle Dataaccess inconsistencies
Solution: copied all the oracle odp.net dll to bin.