public object GetUniversity(string uniName) { try { var re = UniversityServer.GetUniversity(uniName); return(re); } catch (Exception e) { return(new[] { e.Message }); } }
public object GetUniversity(string uniName) { try { var addr = Server.GetUserIp(Request.HttpContext); if (Server.IPHandle(addr) == 0) { return(new[] { "your ip can't using our api , please contact administrator" }); } var re = UniversityServer.GetUniversity(uniName); return(re); } catch (Exception e) { return(new[] { e.Message }); } }