System.Reflection.RuntimeModule'. error in jsonresult

59 Views Asked by At

I have a website, I connect to the soap web service with asmx extension and show the response as json, actually as a string.

I open it locally and I f5 5-20 times, there is no problem. After publishing the same file ab. I'm publishing on com.

My C# commands;

public JsonResult ABC1(string hat,string domain) {
    try {
                    if (domain.ToLower() == parameterKey) {
                        hat = hat.ToUpper().ToString().Replace(" ", "");
                        if (hat.Length >= 1 && hat.Length <= 10) {
                            var result2 = database.busLists.Where(x => x.BUS_NAME == hat).FirstOrDefault();
                            if (result2.STATUS==true) {
                                SeferGerceklesme webservis = new SeferGerceklesme();
                                var result = webservis.GetHatOtoKonum_json(hat);
                                return Json(webservis.GetHatOtoKonum_json(hat),JsonRequestBehavior.AllowGet);
                            }
                            else {
                                return Json("", JsonRequestBehavior.AllowGet);
                            }
                        }
                        else return Json("", JsonRequestBehavior.AllowGet);
                    }
                    else {
                        return Json("no permission", JsonRequestBehavior.AllowGet);
                    }
                }
                catch(Exception e) {
                    saveErrorLog("Otobüs verisini çekemedi. Otobüs kodu -> " + hat + "");
                    return Json(e, JsonRequestBehavior.AllowGet);
                }
}

Error text; A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'. Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

enter image description here

I thought it might be related to the traffic density, but I bought an unlimited hosting package for this, and it still doesn't work.

0

There are 0 best solutions below