AJGarrett
6/6/2013 - 7:06 PM

Troubleshooting WebApi

Troubleshooting WebApi

Built a log function to turn off/on via web.config

<add key="logRequeststoDB" value="true" />

then add logger to the contoller functions as needed

example:
 if (Convert.ToBoolean(ConfigurationManager.AppSettings["logRequeststoDB"].ToString()))
            {
                new ITEventLog("WebAPI", "Campus/Get?filtertype=" + filtertype + "&filter=" + filter + "&distance=" + distance.ToString()).Save();
            }