The remote server returned an error: (403) Forbidden

Nov 7, 2011 at 3:12 AM

Dear all,

I got this message when I try to upload a file in my upload page or whenever postback is triggered by other control.
I tried the same step directly from the server (http://localhost) and it works fine and successfully uploaded the file and saved to my sql server.
I figured that it's an authentication problem so I recheck the manual and try the following things:

1. in IIS, I disabled the windows authentication and enabled the Anonymous authenticaiton for NeatUpload folder and the App_Data\NeatUpload_Temp folder.
2. I added IIS_IUSRS for the NeatUpload folder and I give full control.
3. I put demo.aspx on my site and try to run it. Still, it works on localhost but not from client IE9.

Please help. System info is listed below.

Jim Chen.

Here is my system setting:

    Server: Windows 2008 R2 64 bit running IIS7 using .NET 4.0 and integrated mode.
    Client: Windows 7 Professional with IE9 64bits. and Windows XP with IE8 32 bit

Here is my web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>  
 <appSettings />
 <connectionStrings>
  <add name="PIMConnectionString" connectionString="Data Source=127.0.0.1;Initial Catalog=PIM;User ID=xx;Password=xxxxxx" providerName="System.Data.SqlClient" />
 </connectionStrings>
 
  <system.web>
 <sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="45" />
 <httpRuntime maxRequestLength="20480" executionTimeout="1200" />
    <compilation debug="false" defaultLanguage="c#" targetFramework="4.0" />
    <authentication mode="None" />

 <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
 </customErrors>

    <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID" />
    <fullTrustAssemblies>
        <add assemblyName="Brettle.Web.NeatUpload" version="four-part version number of NeatUpload-version/dotnet/app/Brettle.Web.NeatUpload.dll" publicKey="00240000048000009400000006020000002400005253413100040000010001007bff47f8010184        497c008c0746887076ac287a483dbea177aaf587fbdf0a50c9bae1965ddd2113fa9cd31ea9d096        56b32d893dda8c1bdf6f5bee210d8d9cdb0936cae0cf83669db55304b228a8f4e68b1ea71ececa        e3f9115dd72ab430fe489242b09d1dec2eb2cc4f35d01e207805c0aaa5e30e99e812bc98d08756        a6b134b1" />
    </fullTrustAssemblies>

  </system.web>
    <system.webServer>
        <modules>
            <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" preCondition="managedHandler" />
        </modules>
        <security>
            <requestFiltering>
                <!--For NeatUpload: requestLimits maxAllowedContentLength="size_in_bytes"></requestLimits>-->
                <requestLimits maxAllowedContentLength="20971520"></requestLimits>
            </requestFiltering>
        </security>
    </system.webServer>
</configuration>

 

Nov 7, 2011 at 7:12 AM

It turns out that in my company, they have set proxy in my PC and is violates the setting of IIS IP limits.

Thanks.

Jim