• 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)

vishall

Active member
#1
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!
 

AWS

Well-known member
#2
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:

AWS

Well-known member
#4
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>
 

vishall

Active member
#5
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>
First thank you for helping me, really appreciated :)

but this is what i'm getting now

2014-02-27_135733.png
 

AWS

Well-known member
#6
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.
 

vishall

Active member
#7
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.
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>
 

AWS

Well-known member
#8
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.
 

Attachments

Last edited:

AWS

Well-known member
#9
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.
 

vishall

Active member
#10
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.
I have uploaded a text file. Replace contents of current file with this one.
yup it is enabled but i get back the first error sigh :(
HTTP Error 404.13 - Not Found
 

AWS

Well-known member
#11
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.