Any ideas how to troubleshoot HTTP Error 400 for MVC/Firefox? - asp.net-mvc

Two clients complains on HTTP Error 400 from Mozilla Firefox 3.6.9. This happens when they open any link - both mvc application and also any static images, which are hosted on Classic application pool without any code.
Exact error message is HTTP Error 400. The request is badly formed
No errors in windows log and application error log. Proxy in browser is set to off.
Other browsers works fine for them.
Any ideas about what could cause such behavior?
For now, i can see only one option - ask them to install Firebug, but this is not really user friendly.

For some reason, cookies was corrupted and this was leading to HTTP 400 error.
After user cleaned cookies for this website he was able to get page.
I still need to investigate what exactly went wrong and find source of this problem but it is clear that I need to review all places where I do cookie creation.

Related

Network change from WIFI to 3g/4g produces HTTP Status 503 on random static files

This issue is strange, and i've spend a couple of days trying to solve it but i'm completely lost. I've developed a webapp with CodeIgniter 3.0.6 + AngularJS 1.5.5 as main frameworks for front/backend.
The problem is when I change the iPhone/iPad network from WIFI to 3G/4G,
some random HTTP GET request to static files fail. The files aren't always the same, but it only fails on images and js scripts.
The HTTP GET Status Code is 503 - Service Unavailable, and opening the file's URL points to a static HTML file with the same error.
The weirdest thing is that the response header Server changes from WIFI request (Apache) to 3G/4G request (nginx).
File loaded properly:
File error:
There are also other headers that are different between WIFI and (X)G request.
PHP works fine, HTML and dynamic data load properly. The problem appears to be at the static resources request.
EDIT
I've checked several websites hosted in 1and1, different hosting packs, and i 've even checked other domains hosted in the shared host where my app is running and it happends everywhere. The only change is the number of failing files, and it's random.
EDIT 2
After test with other ios browsers (Firefox and Opera), the problem seems to be focus on Safari and Chrome. Maybe i should say Webkit, but Opera seems fine.
EDIT 3
I've found and article (in comments, repu problems) while searching for a way to handle angular $http request from an offline device.
I need to go deeply and perform the tests described in the link, but seems a problem with the Websockets and the proxy servers used by operators, Vodafone in this case.
did anyone else find this issue?
I will edit this post with the improvements you suggest or the info you need.

Connection Reset on long urls ($_GET) WAMP

I have an application under Yii, and I have this problem regarding my urls.
With the Yii CGridView, when we filter, the application passes an ajax GET request to the server in a form of a very long url. example:
http://site.com/reports/default/index/MEmailrequestsList%5Bid%5D//MEmailrequestsList%5Bname%5D//MEmailrequestsList%5Bperson%5D//MEmailrequestsList%5Bemail%5D//MEmailrequestsList%5Bcreated%5D//MEmailrequestsList%5Busersender%5D/josalie/MEmailrequestsList%5Bstatus%5D//MEmailrequestsList_page/2/ajax/reportsgrid?ajax=reportsgrid
With Firefox or Chrome's firebug, it doenst show any errors, just a failed status. Upon reviewing, it gives off a status of connection reset.
I am running the application in Windows, under WAMP.
With other urls (non yii) (
http://site.com/samplepage/?id=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1&poads=2&asd=1...
)
I think I did it.
I managed to fix the issue by making the URL of the paginations to use the default get parameter url symbols (? and &). I did this by placing a 'appendParams'=>FALSE to the UrlManager of the application.
It is fixed now and hopefully somebody will find this helpful.

.NET MVC Error 500 when publishing to production server

My MVC website is working perfectly on my debug machine when I press F5 in Visual Web Developper Express 2010. I've publish it a couple of time without problem but I did a lot of change lately and my latest publish didn't work as expected.
In fact, the publish works perfectly and no special message are shown. But the problem is that when I connect to the adress, I get an error 500. I google that and add the required web.config info so I get the detailed info.
Here is the information I get:
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has
occurred.
Module: AspNetInitializationExceptionModule
Notification: BeginRequest
Handler: ExtensionlessUrlHandler-Integrated-4.0
Error Code : 0x00000000
Can anyone point me in the right direction to debug this? I can give you more information about my application if necessary!
Thanks!
Ok I found this myself with the help of the helpdesk and google.
Helpdesk send me to a link on how to show more error on the website.
Then I saw my error was "Access to the path XXXX is denied". This was related to the ClientDependency framework and was trying to access a path that doesnt exist on the server
I discovered on google that this path was specified in the web.config so I change the path.
Wasn't working more so I went on the server and changed the permission on this folder
It worked.
Hope this might help someone one day!

Error 405 on PUTs, "ignoreme.rastahook" in IIS log

We have an Asp.Net application with OpenRasta, and when we deploy it on most of our IISes (7.5), it works fine. In one installation though, for PUT requests, the client receives "405 Method not allowed" errors, and the log shows entries like:
2011-11-15 01:18:20 192.168.0.164 PUT /myapp/ignoreme.rastahook - 80 - 192.168.0.131 AClient 405 0 0 57
ignoreme.rastahook seems to come from OpenRasta's rewriting in OpenRastaModule.cs:
HttpContext.Current.RewritePath(VirtualPathUtility.ToAppRelative("~/ignoreme.rastahook"), false);
The GETs and POSTs work fine though, not sure though if the HTTP method really is what makes the difference. Any idea on what might be going on or where to start debugging? My current guess would be some IIS configuration difference between the working servers and the one that doesn't.
OpenRasta version is 2.0.3, and we run the app on .net 4.
Update:
Fwiw, when changing the verb attribute of the OpenRasta handler mapping from "*" to "GET,POST" in the web.config of my server that works, I get a "ignoreme.rastahook" in the log file as well for the PUTs, but with a 404, not a 405, so that seems to be different from the issue described above.
Update 2
I figured that when I enable WebDAV, I can reproduce the 405 / ignoreme.rastahook issue. Which lead me to https://github.com/openrasta/openrasta-stable/wiki/Installing-OpenRasta-Under-IIS , that states that
please be aware that the WebDAV module can cause problems with IIS 7.5
Update 3
I verified that WebDAV is what caused the problem on that other server, but if anyone knows how to fix the problem without disabling WebDAV altogether, I'd appreciate it.
The problem as you've seen comes from WebDAV. There is no know way that I have found bar adding the entries in your web.config to disable webdav.
This has been added to the wiki page in question.

Security error when doing a post from a flash application to an Asp.Net MVC application

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://mysite.com/Content/MyFlashApp/myflash.swf cannot load data from http://www.mysite.com/Home/SaveData.
at Main/encodeAndSave()
This post says that the problem can be caused by the wrong path being specified on the server side. You don't give a whole lot of information with your question - is this the problem you're having?
Other options from the same post are:
Trying to upload a file that is too big
Invalid filenames (e.g. containing an apostrophe)
A proxy server messing with the upload
When doing a Post to a web app from a flash app, you must specify the URLRequest's server path to be the exact same as what you're on.
If you specify:
http://www.mysite.com
http://mysite.com throws the security error above.
see here for more details on cross-domain security issues and how to resolve them.

Resources