Asp.net: http 403 error on postback
<p>I have deployed an ASP .NET web application on IIS8 with Forms authentication and anonymous authentication enabled. When I Access the Website from Intranet after giving in credentials via Login page, it runs without any problems. But when I Login to the application from Internet as an external user would do, Home page and other pages will load without any problem, but on postback like selected index changed or button click, then Website will throw 403 Forbidden error as follows
 "You don't have permission to Access page.aspx on this Server"</p>

<p>I tried in IE and Chrome, both throws error. I even tried With identity impersonate = true but still it throws same error. I have IUSR having full control on the Folder.</p>

<p>My web.config file Looks like below..</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;!--
    For more information on how to configure your ASP.NET application,  
    please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
    &lt;configuration&gt;
     &lt;configSections&gt;
       &lt;!-- For more information on Entity Framework configuration, visit  
       http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
       &lt;section name="entityFramework" 
       type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, 
       EntityFramework, Version=4.4.0.0, Culture=neutral, 
       PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
      &lt;section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" /&gt;
    &lt;/configSections&gt;
    &lt;connectionStrings&gt;    
     &lt;add name="Test" 
     connectionString="metadata=res://*/Models.xxx_DB.csdl|res://
     */Models.xxx_DB.ssdl|res://*/Models.xxx_DB.msl;provider=
     System.Data.SqlClient;provider connection string=&amp;quot;data  
     source=xxxxxxx\xxx;initial catalog=Test;integrated 
     security=True;pooling=False;multipleactiveresultsets=True;application 
     name=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;system.web&gt;
  &lt;httpHandlers&gt;
    &lt;add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" /&gt;
&lt;/httpHandlers&gt;
&lt;httpModules&gt;
  &lt;add name="BypassCache" type="BypassCacheModule, BypassCacheModuleAssembly" /&gt;
&lt;/httpModules&gt;
&lt;compilation debug="true" targetFramework="4.0"&gt;
  &lt;assemblies&gt;
    &lt;add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /&gt;
    &lt;add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /&gt;
    &lt;add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /&gt;
  &lt;/assemblies&gt;
  &lt;buildProviders&gt;
    &lt;add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /&gt;
  &lt;/buildProviders&gt;
&lt;/compilation&gt;
&lt;authentication mode="Forms"&gt;
  &lt;forms cookieless="UseDeviceProfile" defaultUrl="~/Start.aspx" enableCrossAppRedirects="true" loginUrl="~/Login.aspx" name=".ASPXAUTH" path="/" protection="All" requireSSL="false" slidingExpiration="true" timeout="10080"/&gt;
&lt;/authentication&gt;
&lt;authorization&gt;
  &lt;deny users="?" /&gt;
&lt;/authorization&gt;
&lt;profile defaultProvider="DefaultProfileProvider"&gt;
  &lt;providers&gt;
    &lt;add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
  &lt;/providers&gt;
&lt;/profile&gt;
&lt;membership defaultProvider="DefaultMembershipProvider"&gt;
  &lt;providers&gt;
    &lt;add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /&gt;
  &lt;/providers&gt;
&lt;/membership&gt;
&lt;roleManager defaultProvider="DefaultRoleProvider"&gt;
  &lt;providers&gt;
    &lt;add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /&gt;
  &lt;/providers&gt;
&lt;/roleManager&gt;
&lt;!--
        If you are deploying to a cloud environment that has multiple web server instances,
        you should change session state mode from "InProc" to "Custom". In addition,
        change the connection string named "DefaultConnection" to connect to an instance
        of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
  --&gt;
&lt;sessionState mode="InProc" customProvider="DefaultSessionProvider"&gt;
  &lt;providers&gt;
    &lt;add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" /&gt;
  &lt;/providers&gt;
&lt;/sessionState&gt;
&lt;pages&gt;
  &lt;controls&gt;
    &lt;add tagPrefix="asp" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /&gt;
&lt;/pages&gt;
&lt;httpRuntime requestValidationMode="2.0" shutdownTimeout="120" /&gt;    
&lt;/system.web&gt;
&lt;system.webServer&gt;
  &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
  &lt;defaultDocument&gt;
    &lt;files&gt;
      &lt;add value="Start.aspx" /&gt;
    &lt;/files&gt;
  &lt;/defaultDocument&gt;
  &lt;validation validateIntegratedModeConfiguration="false" /&gt;
&lt;handlers&gt;
    &lt;add name="ReportViewerWebControlHandler" preCondition="integratedMode" 
    verb="*" path="Reserved.ReportViewerWebControl.axd" 
    type="Microsoft.Reporting.WebForms.HttpHandler, 
    Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, 
    PublicKeyToken=89845dcd8080cc91" /&gt;
&lt;/handlers&gt;
&lt;/system.webServer&gt;
 &lt;runtime&gt;
  &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
   &lt;dependentAssembly&gt;
    &lt;assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" /&gt;
    &lt;bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" /&gt;
  &lt;/dependentAssembly&gt;
  &lt;dependentAssembly&gt;
    &lt;assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" /&gt;
    &lt;bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /&gt;
  &lt;/dependentAssembly&gt;
  &lt;dependentAssembly&gt;
    &lt;assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
    &lt;bindingRedirect oldVersion="0.0.0.0-2.1.0.4" newVersion="2.1.0.4" /&gt;
  &lt;/dependentAssembly&gt;
  &lt;dependentAssembly&gt;
    &lt;assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" /&gt;
    &lt;bindingRedirect oldVersion="0.0.0.0-1.4.6.0" newVersion="1.4.6.0" /&gt;
  &lt;/dependentAssembly&gt;
&lt;/assemblyBinding&gt;
&lt;/runtime&gt;
&lt;entityFramework&gt;
 &lt;defaultConnectionFactory 
 type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, 
 EntityFramework"&gt;
  &lt;parameters&gt;
    &lt;parameter value="v11.0" /&gt;
  &lt;/parameters&gt;
&lt;/defaultConnectionFactory&gt;
&lt;/entityFramework&gt;
&lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"  
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;targets&gt;
   &lt;target name="file" xsi:type="File" fileName="${basedir}/Logs/
   ${shortdate}.log" layout="${date}:${callsite}: ${level}: ${message}" /&gt;
  &lt;/targets&gt;
  &lt;rules&gt;
  &lt;logger name="*" minlevel="Info" writeTo="file" /&gt;
&lt;/rules&gt;
&lt;/nlog&gt;
</code></pre>

<p></p>

<p>And HTML Markup for the page is as below</p>

<pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
&lt;asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptLocalization ="true" EnableScriptGlobalization="true"&gt;
&lt;/asp:ToolkitScriptManager&gt;
&lt;br /&gt;
&lt;table class="auto-style1"&gt;
        &lt;tr&gt;
            &lt;td class="col-style11"&gt;&amp;nbsp;&lt;/td&gt;
            &lt;td&gt;
                 &lt;asp:TabContainer ID="TabContainer" runat="server" BorderStyle="None"&gt;
                    &lt;asp:TabPanel ID ="TabPanel_xx" runat="server" HeaderText="xxxxx" BorderStyle="None" Font-Size="Medium"&gt;                            
                        &lt;ContentTemplate&gt;
                           &lt;table class="auto-style1"&gt;
                               &lt;tr&gt;
                                  &lt;td colspan="3"&gt;
                                      &lt;asp:Label ID="Lbl_Heading" runat="server" Text="xxxxxx." Font-Bold="True" Font-Size="Medium" Font-Names="Arial"&gt;&lt;/asp:Label&gt;        
                                  &lt;/td&gt;
                               &lt;/tr&gt;
                               &lt;tr&gt;
                                   &lt;td class="col-style1"&gt;
                                        &lt;asp:Label ID="Lbl_xxxx" runat="server" Text="xxxxx" Font-Size="Medium" Font-Names="Arial"&gt;&lt;/asp:Label&gt;   
                                   &lt;/td&gt;
                                   &lt;td class="col-style2"&gt;
                                       &lt;asp:DropDownList ID="Dl_xxxx" runat="server" width="50%" style="text-align:right" AutoPostBack="true"&gt;&lt;/asp:DropDownList&gt;
                                   &lt;/td&gt;
                                   &lt;td class="col-style3"&gt;
                                   &lt;/td&gt;
                               &lt;/tr&gt;
                               &lt;tr&gt;
                                   &lt;td class="col-style1" style="height:15px"&gt;&lt;/td&gt;
                                   &lt;td class="col-style2" style="height:15px"&gt;&lt;/td&gt;
                                   &lt;td class="col-style3" style="height:15px"&gt;&lt;/td&gt;
                               &lt;/tr&gt;
                           &lt;/table&gt;
                            &lt;br /&gt;
                           &lt;table class="auto-style1"&gt;
                                &lt;tr&gt;
                                    &lt;td&gt;
                                        &lt;asp:FormView ID="FV_xxxx" runat="server" DataSourceID="xxxx" DataKeyNames="xx_Id" Width="53%" Font-Names="Arial"&gt;                                                         
                                            &lt;ItemTemplate&gt;
                                                &lt;hr /&gt;
                                                &lt;h4&gt;Project Name: &lt;%# Eval("xx_Name") %&gt;&lt;/h4&gt;
                                                &lt;table class="auto-style1" &gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="LBl_xx" runat="server" Text='&lt;%# Bind("xxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxxx:&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="Lbl_xxx" runat="server" Text='&lt;%# Bind("xxxxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="Lbl_xxxx" runat="server" Text='&lt;%# Bind("xxxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="Lbl_xxxx" runat="server" Text='&lt;%# Bind("xxxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="Lbl_xxxx" runat="server" Text='&lt;%# Bind("xxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt; 
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="xxxxx" runat="server" Text='&lt;%# Bind("xxxxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt; 
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:Label ID="xxxxx" runat="server" Text='&lt;%# Bind("xxxx") %&gt;'&gt;
                                                            &lt;/asp:Label&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt; 
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:LinkButton ID="EditButton" runat="server" Text="Edit" CommandName="Edit"&gt;Edit&lt;/asp:LinkButton&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;                                                      
                                                &lt;/table&gt;                            
                                            &lt;/ItemTemplate&gt; 
                                            &lt;EditItemTemplate&gt;
                                                &lt;hr /&gt;
                                                &lt;h4&gt;xxxx: &lt;%# Eval("xxxxx") %&gt;&lt;/h4&gt;
                                                &lt;table class="auto-style1" &gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:TextBox ID="xxxx" runat="server" Text='&lt;%# Bind("xxxxx") %&gt;' &gt;&lt;/asp:TextBox&gt;                                                             
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:TextBox ID="xxxx" runat="server" Text='&lt;%# Bind("xxxxx") %&gt;' &gt;&lt;/asp:TextBox&gt;                                                             
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx:&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:TextBox ID="xxxx" runat="server" Text='&lt;%# Bind("xxxxx") %&gt;' &gt;&lt;/asp:TextBox&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:TextBox ID="xxxxx" runat="server" Text='&lt;%# Bind("xxxxxx") %&gt;' &gt;&lt;/asp:TextBox&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;xxxxx :&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:TextBox ID="xxx" runat="server" Text='&lt;%# Bind("xxxxxx") %&gt;' &gt;&lt;/asp:TextBox&gt;                                                               
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt; 
                                                    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
                                                    &lt;tr&gt;
                                                        &lt;td class="form-style1"&gt;&lt;/td&gt;
                                                        &lt;td class="form-style2"&gt;
                                                            &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" Text="Update"/&gt;
                                                            &amp;nbsp;&lt;asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /&gt;
                                                        &lt;/td&gt;
                                                    &lt;/tr&gt;                                                                                                         
                                                &lt;/table&gt;                            
                                            &lt;/EditItemTemplate&gt;                                               
                                        &lt;/asp:FormView&gt;
                                        &lt;asp:EntityDataSource ID="xxxxx" runat="server" ConnectionString="name=Test" DefaultContainerName="Test" 
                                             EnableFlattening="False" EnableUpdate="True" EntitySetName="xxxxx" Where="it.xxx_Id == @xx_Id"&gt;
                                             &lt;WhereParameters&gt;
                                                &lt;asp:ControlParameter ControlID="Dl_xxx" Name="xx_Id" PropertyName="SelectedValue" Type="Int32" /&gt;
                                            &lt;/WhereParameters&gt;
                                        &lt;/asp:EntityDataSource&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                           &lt;/table&gt;   
                        &lt;/ContentTemplate&gt;
                    &lt;/asp:TabPanel&gt;
</code></pre>

<p>Formview should load Contents based on selected value from Dropdown list.
This page loads without any error and Formview showing Details of first element in Dropdownlist but when I select a new value from Dropdownlist then gets the following http error <a href="https://i.stack.imgur.com/2yZmn.jpg" rel="nofollow noreferrer">403 Forbidden Error</a></p>

<p>My problem is similar to 
<a href="https://stackoverflow.com/questions/12696006/forbidden-error-on-postback">Forbidden error on postback</a>
Did the changes as mentioned in here but still face the same error.</p>

<p>Only in some pages I face this issue while other pages do postback or even write to db witout any Problems.</p>