I am using Umbraco 7.2.1 and in the Media section uploading some images. I think Umbraco has limit for image size of 4Mb. When I try to upload images of greater size, they just simply come and disappear.
Umbraco should have a message or something to notify that size limit is crossed but thats a totally different issue.
My question is how this limit can be increased?
You have to edit your web.config, maxRequestLength and maxAllowedContentLength (the example is for 100mb uploads):
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" targetFramework="4.5" maxRequestLength="104857600" />
and also
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
Related
I'm experiencing a strange issue with the umbraco back-office. The umbraco version is 7.5.3. Inside umbraco back-office when i try to open a node of Settings or Users tab , either templates, partialviews, stylesheets, etc, automatically a .aspx file is generated and downloaded and the node gets loading infinitely. For example clicking Create in templates a file create.aspx is generated and downloaded. Clicking in any of the templates a file EditView.aspx is generated and downloaded.
In chrome console appear the following:
jquery.min.js?cdv=865237568:3 Resource interpreted as Document but transferred with MIME type application/octet-stream: "http://localhost:54531/umbraco/settings/Views/EditView.aspx?treeType=templates&templateID=3289".
The same problem happen both in back-office local environment and back-office production environment. Fortunately the page in production has not problem but I can't access into the nodes into the back-office. Please, any help would be very appreciated. At the end, an image of the logs. Any other information required about the issue please let me know.
Tracking in version control I realized that I had deactivated the ImageProcessor module by commenting the following line in web.config:
<!--<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />-->
but this line:
<add name="StaticFileHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.StaticFileHandler" />
which was added previously when I installed ImageProcessor.Web.Config also was necessary to comment it. so I commented too and the problem dissapeared.
I have tried set this in web.config:
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
</staticContent>
I also modified the value through the GUI but my Response Headers still says no-cache:
I read several posts and this one looked promising but still I can't get it to work.
From what I understand from this image the image bbb.png is taken from the cache but Page Speed (after refresh, and after waiting a couple of minutes) that it still is not being cashed:
Why isn't this working?
According to https://varvy.com/pagespeed/ I'm not caching 3rd party images:
When i try to download iso file, it results in 404 page not found. The link in this instance is like:
http://www.domain.com/virtualDir/filename.iso
virtualDir points to a location on our file servers.
I don't want to read the binary array and then push it out as download since it is almost 600mb. I want the browser to handle this just like exes and zips.
What is the best way to handle this?
I would imagine it is because IIS doesn't serve unknown file extensions. You need to add the MIME type to the overall IIS settings, or the web.config. As you asked for in the comment, I'd probably recommend placing it in the web.config since it doesn't require additional configuration from a sysadmin and everything is in one place.
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".iso" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>
I'm having some issues getting the outbound rules configured to work on IIS7, here's the scenario that's giving me grief. My ultimate goal is to get any outboundRules working within a couple of browsers. For this example, I'm using the rule that strips .aspx from various HTML tags.
Scenario 1 (Content-Length Mismatch):
To get that particular rule to work in IIS7, I had to disable dynamic compression and turn caching off by default. I was successful in getting the HTML rewritten, but another issue cropped up that makes this unusable.
When trying the rewrite content with outboundrules, I'm getting an issue where by Chrome and Firefox are performing a continuous load because of a "content-length mismatch" in the headers (Thanks Fiddler for helping me identify it). The rewrite works, but it causes the content length to be incorrect and so those two browsers look like they're loading forever. Chrome in particular this causes an issue because javascript appears to be hung up and so anything jquery doesn't work until someone physically hits the stop button.
This is the pertinent sections of the web.config that I began with in order to give me that scenario:
<system.webServer>
<rewrite>
<urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
<modules runAllManagedModulesForAllRequests="true" />
<outboundRules>
<rule name="Remove .aspx from links in the response" preCondition="IsHTML" stopProcessing="false">
<match filterByTags="A, Area, Base, Form, Frame, IFrame, Link, Img, Script" pattern="(.*)\.aspx(\?.*)?$" />
<action type="Rewrite" value="{R:1}{R:2}" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
<caching enabled="false" enableKernelCache="false" />
</system.webServer>
While researching this issue, I found this stackedoverflow question which mentioned the rewriteBeforeCache="true" attribute on the outboundRules tag as well as this blog post which laid out the same thing that I was running into with the content-length issues.
If I modify that attribute, that leads me to Outbound Rules failing to work any further.
Scenario 2 (Outbound Rules do not work):
So because of the prior information, I began tweaking the web.config and was able to resolve the content-length mismatch by using the rewriteBeforeCache attribute on the outboundRules tag. To get that attribute to work, I was able to turn caching back on. That fixed the reponse-length mismatch from Scenario 1, but now none of the outboundRules\rule elements appear to work. I have tried a number of the simplest rules and they function just fine when I remove the rewriteBeforeCache attribute, but that causes Scenario 1:
<system.webServer>
<rewrite>
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
<modules runAllManagedModulesForAllRequests="true" />
<outboundRules rewriteBeforeCache="true">
<rule name="Remove .aspx from links in the response" preCondition="IsHTML" stopProcessing="false">
<match filterByTags="A, Area, Base, Form, Frame, IFrame, Link, Img, Script" pattern="(.*)\.aspx(\?.*)?$" />
<action type="Rewrite" value="{R:1}{R:2}" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
Scenario 1 causes one error with browsers in IIS7; Scenario 2 causes outboundrules to stop working.
I have modified any number of options with disabling caching, chunk-mode transfers, and trying every combination I can think to try.
Additional notes on AppPool: IIS7, .NET4.0, Classic pipeline
Does anyone else have any ideas as to what other options I have to address this beyond moving to an IIS7.5 server?
I have a site running on iis7.5 where, through Firebug, I can see that my static content (css, js and images) have an expiration in their header consistently set to one day in the future. I find no where this is set, but I just came on recently to the project.
I want to make the expiration further in the future, so added a section in the web.config:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="100.00:00:00" />
</staticContent>
</system.webServer>
After restarting the site, this had no affect on the expiration date of these items.
My question is, what can override the clientCache setting, imposing a different expiration date?
Thanks,
Matt