This request has been blocked because sensitive information could be disclosed to third party
This request has been blocked because sensitive information could be disclosed to third party
I am certainly getting some technical issues on this build out of editor that I have never seen before.
Anyone see this one where GET is blocked?
I have a browser network response as follows;
This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.
Here is my controller
` public class AlternativeBillingController : Controller
{
[Route("AlternativeBilling/DataTransport")]
[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]
public ActionResult DataTransport()
{
DefaultConnection1 dbConnection2 = new DefaultConnection1();
//var request = HttpContext.Current.Request;
var request = System.Web.HttpContext.Current.Request.Form;
var settings = Properties.Settings.Default;
using (var db = new Database(settings.DbType, settings.DbConnection))
{
var response = new Editor(db, "GR_AlternativeBilling", "TableID")
.Model<GR_AlternativeBilling>()
.Process(request)
.Data();
return Json(response);
}
}
}`
To tell JSON a GET is ok, When i change return Json(response);
to return Json(response, JsonRequestBehavior.AllowGet);
I get this error.
! "draw": null,
"data": [],
"recordsTotal": null,
"recordsFiltered": null,
"error": "Method not found: \u0027System.String[] System.String.Split(Char, System.StringSplitOptions)\u0027.",
"fieldErrors": [],
"id": null,
"meta": {},
"options": {},
"searchBuilder": {
"options": {}
},
"searchPanes": {
"options": {}
},
"files": {},
"upload": {
"id": null
},
"debug": null,
"cancelled": []
Answers
A google search of the error has this SO thread on top. Hope it helps resolve your issue as I'm not familiar with ASP.NET MVC.
Kevin
Looks like changing the JSON response to this should work:
Kevin
Hi Kevin,
When I do your suggestion, I get the following error. This error is also discussed in my original post.
Possible this thread will help?
Kevin
I copied the dll that arrives with the editor builder download into the bin folder of the project replacing the dll that arrives via nuget.
Still have the same error message.
You are presumably using .NET Framework? What version specifically?
If you add
.TryCatch(false)
immediately before the.Process(...)
call, does it give any additional information in the error that is thrown?Allan
Hi Allan,
I am using .NET 4.8
Adding in
.TryCatch(false
results in the same error. The difference being with adding in.TryCatch(false
the error appears in Visual Studio where without.TryCatch(false
the error appears in the browser.Here is the error I am seeing.
EXCEPTION
I figured out a fix here. I hadn't realized when copying DLLs into VisualStudio project folder (replacing old DLLs) you had to then go into Visual Studio and unregister the old DLL, then re register the new DLL.
I am now using the most recent DLL that is packaged with editor-generator. This DLL has a file creation date of 6/22/2024. The DLL that was previously not working had a file creation date of 2-28-2023 4:11 AM
Interesting. Many thanks for letting us know and great to hear that you've got it working now!
Allan