1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error uploading database (Windows Server)

Discussion in 'Server Configuration and Hosting' started by vishall, Feb 27, 2014.

  1. vishall

    vishall Active Member

    Hi guys,

    i'm moving my site to windows server but when i try to upload the database i get this error.


    2014-02-27_174340.png

    i tried changing the following limits in the php.ini but no luck.
    post_max_size
    upload_max_filesize

    Any ideas?

    Thanks!
     
  2. AWS

    AWS Well-Known Member

    Add this to the sites web.config file.

    Code:
    <security>
         <requestFiltering>
           <requestLimits
               maxAllowedContentLength="4200000"
               maxUrl="160"
               maxQueryString="20"
               allowDoubleEscaping="true"
          />
         </requestFiltering>
    </security>
    
    If you are creating a new web.config file it should be like this:

    Code:
    <configuration>
        <system.webServer>
          <security>
             <requestFiltering>
                <requestLimits
                    maxAllowedContentLength="4200000"
                    maxUrl="160"
                    maxQueryString="20"
                    allowDoubleEscaping="true"
                />
            </requestFiltering>
          </security>
       </system.webServer>
    </configuration>
    
    Adjust the variables to suit your needs. If you don't have a web.config in the root directory of the site use notepad to copy the above and save it as web.config in the root. Make sure you select all files in the save as dialog.
     
    Last edited: Feb 27, 2014
  3. vishall

    vishall Active Member

    Getting this error now :(

    00.png
     
  4. AWS

    AWS Well-Known Member

    I had a small error in the file. Here is an updated file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
          <system.webServer>
             <security>
                <requestFiltering allowDoubleEscaping="true" />
                      <requestLimits maxAllowedContentLength="4200000" maxUrl="160" maxQueryString="20" />
                </requestFiltering>
              </security>
           </system.webServer>
    </configuration>
    
     
  5. vishall

    vishall Active Member

    First thank you for helping me, really appreciated :)

    but this is what i'm getting now

    2014-02-27_135733.png
     
  6. AWS

    AWS Well-Known Member

    Post your complete web.config file. I think you already have some parts in it and what I am adding is causing the errors because of duplicates.

    What you can do is rename the current config file and create a new one with the contents above.
     
  7. vishall

    vishall Active Member

    this is what i have

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
          <system.webServer>
             <security>
                <requestFiltering allowDoubleEscaping="true" />
                      <requestLimits maxAllowedContentLength="4200000" maxUrl="160" maxQueryString="20" />
                </requestFiltering>
              </security>
           </system.webServer>
    </configuration>
     
  8. AWS

    AWS Well-Known Member

    I have uploaded a text file. Replace contents of current file with this one.

    In that file I added an extra line to get more detailed errors.
     

    Attached Files:

    • web.txt
      File size:
      415 bytes
      Views:
      2
    Last edited: Feb 27, 2014
  9. AWS

    AWS Well-Known Member

    Then we have to look to make sure Request Filtering is installed and enabled.

    Open IIS manager. Select your website. In the left you'll see all features installed. Do you see Request Filtering?

    If not use Server Manager to add the role to IIS.
     
  10. vishall

    vishall Active Member

    yup it is enabled but i get back the first error sigh :(
    HTTP Error 404.13 - Not Found
     
  11. AWS

    AWS Well-Known Member

    Increase the numbers until it works. 4200000 = file size of 42M. If file size is bigger increase it to 420000000 which is 42G. Keep adding a zero at the end until it works.
     
    vishall likes this.
  12. vishall

    vishall Active Member

    ahhhh yessssss that worked :)

    i owe you 2 beers man, thanks soo much (y)
     
    AWS likes this.
  13. AWS

    AWS Well-Known Member

    Glad I could help.
     
    vishall likes this.

Share This Page