I have successfully applied IIS Rule (Enforce Lowercase URL) on my website but now I have one issue our one file combres.axd stopped loading.
I tried to apply others way also which I found on stackoverflow but no success yet.
Please advice how to fix this issue.
You could try below rule to change URL into lowercase:
<rule name="LowerCaseRule">
<match url="[A-Z]" ignoreCase="false"/>
<action type="Redirect" url="{ToLower:{URL}}"/>
</rule>
Below is the result:
Failed request tracing result:
If you still face and issue you could run failed request tracing in iis and check why the URL is giving you a 404 error. another thing make sure the file exists at the place with the same path and name.
https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
Related
So on local I'm able to upload images fine, but on my deployed website I'm unable to upload images to the media content. I receive an "internal 500 error" with the following path in chrome:
POST http://[url]/umbraco/backoffice/UmbracoApi/Media/PostAddFile?origin=blueimp 500 (Internal)
I looked at umbraco logs and saw this: 2015-12-19 00:15:15,234 [P16524/D8/T73] ERROR Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute - Could not acquire actionExecutedContext.Response.Content System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
And on the database table dbo.UmbracoLog when I try to upload it creates a new record: id userId NodeId Datestamp logHeader logComment 1885 0 0 2015-12-19 00:15:15.233 New Media 'IMG_3242.jpg' was created
These failed uploads are the only ones with a NodeId of 0. Not sure if that's strange. Any help would be much appreciated.
I'm using Umbraco v7.3.1.
So I did some digging around on this error and found that it may be a very "un" user-friendly error message. The error is coming up as null reference issue, but the real problem is the ASP.net "default" request size stopping uploading of a large image file. Added the following to the web.config and that resolved the issue:
<system.web>
<httpRuntime maxRequestLength="204800" executionTimeout="99999"/>
</system.web>
On Azure try removing fcnMode="Single" from the httpRuntime node and adding targetFramework="4.5"
I have a COLDFUSION page which except parameters from url and show them in fields. My url looks like this which is working.
http://www.example.com/test.cfm?activeUrl=www.msn.com&secure=False
But following is not working. I have added http before www in activeUrl value.
http://www.example.com/test.cfm?activeUrl=httpwww.msn.com&secure=False
It is giving me following error. "ERRROR STATUS: URL contains outer http"
Can any one help me to solve this problem?
For me, It seems that something related to iis configuration.
The string in httpwww.msn.com is causing your browser error. It should be http://www.msn.com, but should also be URL encoded.
ohh, i have not checked the application.cfc ONREQUESTSTART method. it has some condition for query string, which is showing this error. :(
I have an asp.net-mvc site and I have a case where I have a very long querystring in a URL. This was previously not an issue but I am suddenly getting this error in a few cases:
404-File or director not found - the resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
I haven't proven that its due to url length but the reason I am assuming that this is related to length of querystring is that if I selected remove certain parts of the query string it works fine and I have gone through each section (to identify of part of the query string is "corrupt"
I am able to reproduce this error in my example that has a total url length of 2805 characters. Is this expected? I see the issue in both Firefox and Internet Explorer.
The reason I ask is that from my googling, it seems like IIS throws a different error when querystring is too long (415 or 414 error as described here)
Is this something that is set on the server side? in the web.config?
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="xxxx"/>
</requestFiltering>
</security>
</system.webServer>
See
http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits
https://msdn.microsoft.com/en-us/library/e1f13641(v=vs.100).aspx
Per MSDN:
When request filtering blocks an HTTP request because an HTTP request exceeds the request limits, IIS 7 will return an HTTP 404 error to the client and log one of the following HTTP statuses with a unique substatus that identifies the reason that the request was denied:
| HTTP | Substatus Description |
|---------|---------------------------|
| 404.13 | Content Length Too Large |
| 404.14 | URL Too Long |
| 404.15 | Query String Too Long |
FYI - 2048 is generally considered the highest cross-browser limit for a URL length.
It seems like IIS throws a non-standard 404.15 error code for very long query strings. This is probably overshadowed by the default error handler and the actual error is mapped to bare 404 error.
Read this for details:
http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits
I got the following error
expected status code in (200-299) got 503.
I didn't get this all the time. Sometimes I notice this error. I am unable to figure out the exact reason.
The base URL I am using in the application is in following format.
BaseURL: https://staging.something.com
For every request I append to base url as follows.
"BaseURL/api/"
Please let me know if any issues.
503 means service unavailable. Lots of servers give that for lots of reasons.
2xx means that something normal happened
See http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
503 means "Service Unavailable".
Which means there is a problem on the server side.
Make certain that the URL you are connecting to looks like a valid URL. For example, you can do something like:
NSLog(#"the url I am connecting to is %#", [myURL absoluteString]);
And see if it matches what you were expecting: https://staging.something.com/api/.
If it looks really wrong, like "apihttps://staging.something.com", then it's something that you can easily fix.
If you are getting this problem all the time, you should probably reach out to the owner of the service you're trying to use and ask them for assistance.
My site at www.kruaklaibaan.com (yes I know it's hideous) currently has 3.7 million likes but while working to build a proper site that doesn't use some flowery phpBB monstrosity I noticed that all those likes are registered against an invalid URL that doesn't actually link back to my site's URL at all. Instead the likes have all been registered against a URL-encoded version:
www.kruaklaibaan.com%2Fviewtopic.php%3Ff%3D42%26t%3D370
This is obviously incorrect. Since I already have so many likes I was hoping to either get those likes updated to the correct URL or get them to just point to the base url of www.kruaklaibaan.com
The correct url they SHOULD have been registered against is (not url-encoded):
www.kruaklaibaan.com/viewtopic.php?f=42&t=370
Is there someone at Facebook I can discuss this with? 3.7m likes is a little too many to start over with without a lot of heartache. It took 2 years to build those up.
Short of getting someone at Facebook to update the URL, the only option within your control that I could think of that would work is to create a custom 404 error page. I have tested such a page with your URL and the following works.
First you need to set the Apache directive for ErrorDocument (or equivalent in another server).
ErrorDocument 404 /path/to/404.php
This will cause any 404 pages to hit the script, which in turn will do the necessary check and redirect if appropriate.
I tested the following script and it works perfectly.
<?php
if ( $_SERVER['REQUEST_URI'] == '/%2Fviewtopic.php%3Ff%3D42%26t%3D370' ) {
Header("HTTP/1.1 301 Moved Permanently");
Header("Location: /viewtopic.php?f=42&t=370");
exit();
} else {
header('HTTP/1.0 404 Not Found');
}
?><html><body>
<h1>HTTP 404 Not Found</h1>
<?php echo $_SERVER['REQUEST_URI']; ?>
</body></html>
This is a semi-dirty way of achieving this, however I tried several variations in Apache2.2 using mod_alias's Redirect and mod_rewrite's RewriteRule, neither of which I have been able to get working with a URL containing percent encoded chars. I suspect that with nginx you may have better success at a more graceful way to handle this in the server.