dot net nuke uploading files - file

I"m working on a dot net nuke site for a client, they are wanting to upload files of about 60mbs. I have changed the web.config file to allow files up to 65 mbs in size just for wiggle room.
httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="66560" requestLengthDiskThreshold="66560" executionTimeout="1080000" />
this is the code in the web.config file. I have personally tried mp3 files ranging from 40 mbs - 60 mbs in size to no luck. The module will only upload files of 28mbs or less. We are using the Live Content module if this helps.
The connection is getting reset. its not even getting to the 18 minute timeout i have given it, even if it is only set to 3 minute timeout i get same error. Also when uploading the file it will get to 86% then restart when it gets to 86% again is when it gets the error.

<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2000000000" />
</requestFiltering>
</security>
actually fixed it, the dot net nuke is set to upload files up to 8mbs, the iis is set to only allow files up to 30mbs. adding this code to the web.config file will allow files larger than 200mbs to be uploaded. using the code i provided in my question will modify the dnn's upload but this will modify the iis.

The wiki on DotNetNuke.com gives a complete and thorough explanation of this.

You may also have to increase the value of AspMaxRequestEntityAllowed, see: http://www.banmanpro.com/support2/File_Upload_limits.asp

Related

Can I add web.config settings to a DNN module manifest file?

I am trying to add the following code to my web.config file when installing a DotNetNuke module.
All the Sample files I have seen references providers and existing components on DNN. https://www.dnnsoftware.com/wiki/manifest-config-component
I was wondering I can use <component type="Config"> to add new settings to the web.config file.
https://www.dnnsoftware.com/docs/developers/extensions/dnn-manifest-schema.html
This is the code I would want to add just before the closing </system.webServer> tag
<security>
<requestFiltering>
<!--The default size is 30000000 bytes (28.6 MB). MaxValue is 4294967295 bytes (4 GB)-->
<!-- 100 MB in bytes -->
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
You can, but please do be advised that there are other settings that control content upload lengths, so it might not be the only thing you need to change.
Also, please do be aware that there are security implications of increasing this value if this is something that is being commercially distributed.
Yes, you'll see some details at https://www.dnnsoftware.com/wiki/manifest-xml-merge

Run .bat as a Windows Service

I'm here again with another case that is getting me out my mind.
So, this is happening, I'm trying to run an executable java class(.jar) as a Windows Service, and all my attempts failed so far. To make it a little easier, I turned my jar into a batch file, wich only executes the jar in background, here is the code:
start "" javaw -jar C:\LocalService.jar
The batch works fine. However I have tried to install this batch as a service by using the next line in cmd:
sc create "LocalService" binPath= "C:\LocalService.bat"
The Service installs correctly, but as soon as I try to start it, it pops up an error (The code error is 1053, says something about the service did not start correctly)
Also, I have try with a software called NSSM (non-sucking service manager) It installs fine too, but the service does not start either.
Do you guys know what am I missing?
By the way, I'm doing all this on Windows 7 Professional.
Thanks!
thanks for your comments
Both tools didnt work for me, sadly. However I was able to do it with a software called Java Service Wrapper. This is not a free software, so I needed to buy a license to get it to work.
The steps were simple:
1.-Create a folder with the name of the service, then inside add 4 folders: lib,bin,logs,conf
2.-On the lib folder you have to copy your jar and also the wrapper.jar and wrapper.dll (these last two are in the zip you download from the website)
3.-Copy 4 files to the bin folder: InstallApp-NT.bat.in, App.bat.in, UnintstallApp-NT.bat.in and wrapper.exe (this last one is the one that defines your license, if you can get a file wrapper.exe from somebody else who had paid a license it will work fine. These file also came in the zip from the website) Remove the .in from the batch files
4.-The most tricky step is this: You have to copy from the wrapper's folder called conf a file called wrapper.conf.in Remove the .in extension and edit it with a tex editor. The most important lines you have to edit are:
wrapper.java.command=C:\Program Files (x86)\Java\jre7\bin\java //Specify JRE Path. Will work with eviroment variable
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp //Choosing this class means your are using a .jar file to execute when the service starts
wrapper.java.classpath.1=C:\LocalService\lib\wrapper.jar //This one is constant.
wrapper.java.classpath.2=C:\LocalService\lib\LocalService.jar //This is the path to your executable jar
wrapper.java.library.path.1=C:\LocalService\lib //Path to your own lib folder (the you created at the begining)
wrapper.app.parameter.1=C:\LocalService\lib\LocalService.jar // again the path to your jar
Then just execute the InstallApp-NT.bat and start the service and your are done
It worked to me with absolute paths, however according to documentation it will work fine with relative path too.
This is how I solved my problem and I hope someone with the same issue will find this helpful
See you next time!

Is there a limit on .class file name lengths in google app engine, outside of jar files?

I'm getting errors when I attempt to run my project deployed to app engine. I see issues like:
java.lang.ClassNotFoundException: com.seattleglassware.AuthServletSupport$$anonfun$finishOAuth2Dance$1$$anonfun$apply$33$$anonfun$apply$34$$anonfun$apply$37$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42$$anonfun$apply$45$$anonfun$apply$47$$anonfun$apply$48$$anonfun$apply$49
The class name looks reasonable (well, for certain values of reasonable - this is code generated by the Scala compiler). I see the file in my local web/WEB-INF/classes/com directory and I can decompile it with javap (so I don't think it's corrupt or anything silly like that.) Everything works fine running on a local debug server.
Even more strange, I can pour all the .class files in web/WEB-INF/classes into a jar file like this:
cd to the web/WEB-INF/classes directory
jar cf ../lib/classes.jar .
And now, if I upload the project (pressing the deploy button in Eclipse), I don't see those ClassNotFoundException errors. Delete the jar file, re-upload the project, get the errors again.
I'm wondering if there's some sort of limit on the names of .class files? Or something else happening in the deployment process that's causing this to happen?
EDIT: running from the command line made this much more clear (using maven now):
SEVERE: Invalid character in filename: WEB-INF/classes/com/seattleglassware/AuthServletSupport$$anonfun$finishOAuth2Dance$1$$anonfun$apply$33$$anonfun$apply$34$$anonfun$apply$37$$anonfun$apply$40$$anonfun$apply$41$$anonfun$apply$42$$anonfun$apply$45$$anonfun$apply$47$$anonfun$apply$48$$anonfun$apply$49.class
But it still looks to me like that's a valid filename.
The inclusion of "special" characters in the file name may be the issue here.
There is currently an open issue regarding "special" characters in project file names.
Issue 2211: Special characters are not supported in the filenames in the project
The original issue was reported by a Python App Engine user, however if you look in the comments you'll see that it apparently affects Java users as well.

Server giving 404 not found

I am deploying a spring application which contains files with around 100000 entries. Each row in the file has about 23 chars.
The app deploys fine when a file has 100000 entries but when I increase the contents to 400000 entries, when I access my app url I get a 404 Not found error.
I need to figure out what causes the crash ( whether a memory problem or something else ) but I do not see anything erroneous in the tomcat log files, using the command vmc files [app_name] tomcat/logs/catalina.... just info messages related to server startup.
Are there other options to debug the issue?
Thanks,
Cristian
I would look into what Dan has mentioned! Also can you look at the logs folder to see if the files there give more information.
vmc logs <app-name>
or
vmc files <app-name> logs/stderr.log
vmc files <app-name> logs/stdout.log
Okay, the application was using too much memory, as a result the Java processes was being destroyed causing the router to return a 404 when trying to route to the application.

upload_max_filesize set to 4M in phpinfo(), can't change it!

I've got this in my php.ini
upload_max_filesize = 25M
post_max_size = 25M
and I've got this in my .htaccess
php_value upload_max_filesize 26214400
php_value post_max_size 26214400
as shorthand can only be used in the php.ini (http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes)
but no matter what I do, when i call phpinfo() I get
Directive Local Value Master Value
upload_max_filesize 4M 25M
I've looked at all other php.ini files, my .htaccess, ini_set(). Anything I could think of and nothing will change it from 4M. Any help would be great!
EDIT: restarting apache didn't work, i've check my httpd.conf, it seems like an external file or something. any other places to check?
That doesn't look like proper syntax for a php.ini file.
upload_max_filesize = 25M
post_max_size = 25M
Then, make sure to restart Apache.
If you still have troubles, refer to:
http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/
I had same issue, but restarting php-fpm helped.
So it didn't help to restart just apache2, but this command:
sudo systemctl restart php7.3-fpm
Cleared probably some cache and took the new modified php.ini.
If you're using OSX then make sure your php.ini file is not the default one in /etc (php.ini.default) with the command php --ini,
output sample :
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /Library/Server/Web/Config/php
Additional .ini files parsed: (none)
in case the first line: Configuration File (php.ini) Path with empty parameter make a copy of the default php ini and the changes will take affect.
also, you'll have to check the memory_limit directive.
If it's lower than upload_max_filesize or post_max_size then their value will be limited to the memory_limit value.
Anyway, post_max_size should be slightly larger than upload_max_filesize (any posted values other than the file itself would need some memory as well)
On modern systems, memory_limit should be at least 64M, 128M or more is recommended
If you are running PHP Fast cgi then you need to restart the process. I believe that restarting apache should do the trick.
Problem was it was actually being set in another .ini file that didn't appear at first glance to be related to anything!
Note to self: always use "grep" to search within files when things are fishy!
If you are running in a local server, such as wamp or xampp, make sure it's using the php.ini you think it is. These servers usually default to a php.ini that's not in your html docs folder.
If you are using WAMP then make changes in proper php.ini which apache uses, normally its found in C:\wamp\bin\apache\\bin.
make changes in 2 parameters post_max_size and upload_max_filesize (found in line 734 and 886, usually), to 50M (to upload files upto 50 MB).
don't forget to restart apache.
I could solve this problem via a workaround. I created .user.ini file in the root document of my webapp and overwrite the values.
I was facing the same issue.
Check Loaded Configuration File path in php info.
Then open that file and change the variables you want and restart your apache server.
Make sure that you're editing the php.ini in the conf/"server_version" folder
Make sure that your computer is not hiding a .txt on the end of the php.ini file.
Use terminal or right click / get info or properties.

Resources