J Juzer Hussain Active Member Licensed User Longtime User Sep 7, 2015 #1 Hi, My app was connecting fine suddenly i started getting msg "HTTP Error 403.0 - ModSecurity Action You do not have permission to access this file or folder" as such i replaced HTTP with okHTTP. But app is still not connecting.Pls help. Juzer
Hi, My app was connecting fine suddenly i started getting msg "HTTP Error 403.0 - ModSecurity Action You do not have permission to access this file or folder" as such i replaced HTTP with okHTTP. But app is still not connecting.Pls help. Juzer
Erel B4X founder Staff member Licensed User Longtime User Sep 7, 2015 #2 Why do you think that it is related to OkHTTP? You say that the error started before you changed the library. Upvote 0
Why do you think that it is related to OkHTTP? You say that the error started before you changed the library.
J Juzer Hussain Active Member Licensed User Longtime User Sep 7, 2015 #3 I read this thread https://www.b4x.com/android/forum/threads/mod-security-error-403.57920/ my issue also is same. Upvote 0
I read this thread https://www.b4x.com/android/forum/threads/mod-security-error-403.57920/ my issue also is same.
RandomCoder Well-Known Member Licensed User Longtime User Sep 7, 2015 #4 You don't mention what it is that you are connecting too? Is it possible that something has changed on that side? I've had this problem before on some Windows pc's when trying to access file shares. It turned out to be the file sharing permissions. Upvote 0
You don't mention what it is that you are connecting too? Is it possible that something has changed on that side? I've had this problem before on some Windows pc's when trying to access file shares. It turned out to be the file sharing permissions.
Erel B4X founder Staff member Licensed User Longtime User Sep 8, 2015 #5 It has nothing to do with OkHttp. ModSecurity is a sophisticated server firewall. It rejects the requests for some reason. Try to set the user agent. Upvote 0
It has nothing to do with OkHttp. ModSecurity is a sophisticated server firewall. It rejects the requests for some reason. Try to set the user agent.
J Juzer Hussain Active Member Licensed User Longtime User Sep 8, 2015 #6 Hi Erel, I tried typing "www.website.com/pagename.aspx?Query=!Select * from companymaster! and it reproduced the issue saying " HTTP Error 406.0 - ModSecurity Action The resource cannot be displayed because the file extension is not being accepted by your browser. This indeed look like security issue. I will appreciate if you could point me to some example of "using setting user agent" Thanks Juzer Upvote 0
Hi Erel, I tried typing "www.website.com/pagename.aspx?Query=!Select * from companymaster! and it reproduced the issue saying " HTTP Error 406.0 - ModSecurity Action The resource cannot be displayed because the file extension is not being accepted by your browser. This indeed look like security issue. I will appreciate if you could point me to some example of "using setting user agent" Thanks Juzer
J Juzer Hussain Active Member Licensed User Longtime User Sep 8, 2015 #7 continued... and below it says Most Likely cause "The request was rejected because it contained an Accept header for a MIME type that is not supported for the requested file extension." Try "Verify the MIME settings for the file extension that was requested to make sure this MIME type is acceptable." Juzer Upvote 0
continued... and below it says Most Likely cause "The request was rejected because it contained an Accept header for a MIME type that is not supported for the requested file extension." Try "Verify the MIME settings for the file extension that was requested to make sure this MIME type is acceptable." Juzer
S sorex Expert Licensed User Longtime User Sep 8, 2015 #8 use this right after your job.download call Code: dljob.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0") altho I doubt that would solve that issue. Does that page work when copying it in a browser's address bar? Upvote 0
use this right after your job.download call Code: dljob.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0") altho I doubt that would solve that issue. Does that page work when copying it in a browser's address bar?
J Juzer Hussain Active Member Licensed User Longtime User Sep 8, 2015 #9 Hi Sorex, No it doesn't work from browser.It says the error HTTP Error 406.0 - ModSecurity Action as i said above. I tried using above string after job1.download2 it says "(Intent) Intent { cmp=b4a.example/anywheresoftware.b4a.samples.httputils2.httputils2service }" "<title>IIS 7.5 Detailed Error - 406.0 - ModSecurity Action</title> " I have no clue what to do? Juzer Upvote 0
Hi Sorex, No it doesn't work from browser.It says the error HTTP Error 406.0 - ModSecurity Action as i said above. I tried using above string after job1.download2 it says "(Intent) Intent { cmp=b4a.example/anywheresoftware.b4a.samples.httputils2.httputils2service }" "<title>IIS 7.5 Detailed Error - 406.0 - ModSecurity Action</title> " I have no clue what to do? Juzer
S sorex Expert Licensed User Longtime User Sep 8, 2015 #10 what is the full url? PM it if you don't want it to appear here. Upvote 0
J Juzer Hussain Active Member Licensed User Longtime User Sep 8, 2015 #11 Sorex, I mailed to support full URL pls check Upvote 0
S sorex Expert Licensed User Longtime User Sep 8, 2015 #12 only Erel has access to that then. I'm not in his team. Upvote 0
J Juzer Hussain Active Member Licensed User Longtime User Sep 8, 2015 #13 where should i mail you? Upvote 0
S sorex Expert Licensed User Longtime User Sep 8, 2015 #14 click on my name and then Start Conversation Upvote 0
S sorex Expert Licensed User Longtime User Sep 8, 2015 #15 I have the impression that part of the querystring is getting cut off. Upvote 0
S sorex Expert Licensed User Longtime User Sep 8, 2015 #16 how do you return the data? you should just "print" the data, don't mess around with none standard mime type outputs. that's the problem it seems. Upvote 0
how do you return the data? you should just "print" the data, don't mess around with none standard mime type outputs. that's the problem it seems.
J Juzer Hussain Active Member Licensed User Longtime User Sep 9, 2015 #17 Hi, I have posted the connection module can u pls check it. Thanks Juzer Attachments Testing.zip Testing.zip 399 KB · Views: 499 Upvote 0
S sorex Expert Licensed User Longtime User Sep 9, 2015 #18 you should check your aspx file on how you return the data. Upvote 0
J Juzer Hussain Active Member Licensed User Longtime User Sep 9, 2015 #19 It returns a Json string Response.Write(j.Serialize(list.ToArray())); With the same aspx file i was connected regularly earlier without any problems. Upvote 0
It returns a Json string Response.Write(j.Serialize(list.ToArray())); With the same aspx file i was connected regularly earlier without any problems.
S sorex Expert Licensed User Longtime User Sep 9, 2015 #20 well, it doesn't work when I copy the url in my desktop browser either. it gives a 403 error, when I modify it a little it passes that but then it gives a 406 error and nags about unknown mimetypes. Upvote 0
well, it doesn't work when I copy the url in my desktop browser either. it gives a 403 error, when I modify it a little it passes that but then it gives a 406 error and nags about unknown mimetypes.