Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem

Problem

Scheduled Pinned Locked Moved ASP.NET
csharpsysadminhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MaheshSharma
    wrote on last edited by
    #1

    namespace Ashwin { public class Global : System.Web.HttpApplication, ICacheManager { protected void Application_Start(object sender, EventArgs e) { //Load the cache for the first time. ReloadCache("All"); } protected void Application_End(object sender, EventArgs e) { //Cleanup anything that we left if we left anything using the SubmitReport.asmx /*string tempPath = Server.MapPath("TempData"); if (System.IO.Directory.Exists(tempPath)) System.IO.Directory.Delete(tempPath, true);*/ } /// <summary> /// When the session starts. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Session_Start(object sender, EventArgs e) { UserSession session = new UserSession(Request); try { LoggedInUserInfo liui = session.Login(); // if user successfully logged in // then store in Session cache if(liui != null) { CacheManager.SetCache("loggedInUser", CacheManager.cacheTypeEnum.Session, liui, this); // get the top 10 Read reports in last 30 days i.e. one month Report report = new Report(); IList list = report.GetTopReadReport(10, DateRangeEnum.OneMonth, ReportClassificationEnum.All, liui.User.UserId); CacheManager.SetCache("TopReadReport", CacheManager.cacheTypeEnum.Session, list, this); FillCache("SavedSearches"); } } catch(Exception exc) { Exception LastException = exc; Session["LastException"] = LastException; ErrorDetail ed = new ErrorDetail(); RecordError recordError = new RecordError(); recordError.Credentials = new System.Net.NetworkCredential(Util.GetConfigValue("WebServicesLogin"), Util.GetConfigValue("WebServicesPwd")); recordError.PreAuthenticate = true; ed.applicationName = "Ashwin20"; ed.browserVersion = Request.ServerVariables["HTTP_USER_AGENT"]; ed.errorUrl = Request.Url.ToString(); ed.note = LastException.Message; ed.stackTrace = LastException.StackTrace; ed.userNa

    J S N 3 Replies Last reply
    0
    • M MaheshSharma

      namespace Ashwin { public class Global : System.Web.HttpApplication, ICacheManager { protected void Application_Start(object sender, EventArgs e) { //Load the cache for the first time. ReloadCache("All"); } protected void Application_End(object sender, EventArgs e) { //Cleanup anything that we left if we left anything using the SubmitReport.asmx /*string tempPath = Server.MapPath("TempData"); if (System.IO.Directory.Exists(tempPath)) System.IO.Directory.Delete(tempPath, true);*/ } /// <summary> /// When the session starts. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Session_Start(object sender, EventArgs e) { UserSession session = new UserSession(Request); try { LoggedInUserInfo liui = session.Login(); // if user successfully logged in // then store in Session cache if(liui != null) { CacheManager.SetCache("loggedInUser", CacheManager.cacheTypeEnum.Session, liui, this); // get the top 10 Read reports in last 30 days i.e. one month Report report = new Report(); IList list = report.GetTopReadReport(10, DateRangeEnum.OneMonth, ReportClassificationEnum.All, liui.User.UserId); CacheManager.SetCache("TopReadReport", CacheManager.cacheTypeEnum.Session, list, this); FillCache("SavedSearches"); } } catch(Exception exc) { Exception LastException = exc; Session["LastException"] = LastException; ErrorDetail ed = new ErrorDetail(); RecordError recordError = new RecordError(); recordError.Credentials = new System.Net.NetworkCredential(Util.GetConfigValue("WebServicesLogin"), Util.GetConfigValue("WebServicesPwd")); recordError.PreAuthenticate = true; ed.applicationName = "Ashwin20"; ed.browserVersion = Request.ServerVariables["HTTP_USER_AGENT"]; ed.errorUrl = Request.Url.ToString(); ed.note = LastException.Message; ed.stackTrace = LastException.StackTrace; ed.userNa

      S Offline
      S Offline
      Sandesh M Patil
      wrote on last edited by
      #2

      Please write your code within code block & describe more :)

      1 Reply Last reply
      0
      • M MaheshSharma

        namespace Ashwin { public class Global : System.Web.HttpApplication, ICacheManager { protected void Application_Start(object sender, EventArgs e) { //Load the cache for the first time. ReloadCache("All"); } protected void Application_End(object sender, EventArgs e) { //Cleanup anything that we left if we left anything using the SubmitReport.asmx /*string tempPath = Server.MapPath("TempData"); if (System.IO.Directory.Exists(tempPath)) System.IO.Directory.Delete(tempPath, true);*/ } /// <summary> /// When the session starts. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Session_Start(object sender, EventArgs e) { UserSession session = new UserSession(Request); try { LoggedInUserInfo liui = session.Login(); // if user successfully logged in // then store in Session cache if(liui != null) { CacheManager.SetCache("loggedInUser", CacheManager.cacheTypeEnum.Session, liui, this); // get the top 10 Read reports in last 30 days i.e. one month Report report = new Report(); IList list = report.GetTopReadReport(10, DateRangeEnum.OneMonth, ReportClassificationEnum.All, liui.User.UserId); CacheManager.SetCache("TopReadReport", CacheManager.cacheTypeEnum.Session, list, this); FillCache("SavedSearches"); } } catch(Exception exc) { Exception LastException = exc; Session["LastException"] = LastException; ErrorDetail ed = new ErrorDetail(); RecordError recordError = new RecordError(); recordError.Credentials = new System.Net.NetworkCredential(Util.GetConfigValue("WebServicesLogin"), Util.GetConfigValue("WebServicesPwd")); recordError.PreAuthenticate = true; ed.applicationName = "Ashwin20"; ed.browserVersion = Request.ServerVariables["HTTP_USER_AGENT"]; ed.errorUrl = Request.Url.ToString(); ed.note = LastException.Message; ed.stackTrace = LastException.StackTrace; ed.userNa

        J Offline
        J Offline
        JHizzle
        wrote on last edited by
        #3

        Please could you elaborate on what the problem is precisely. That's alot of code to wade through without knowing the bit to focus on.

        1 Reply Last reply
        0
        • M MaheshSharma

          namespace Ashwin { public class Global : System.Web.HttpApplication, ICacheManager { protected void Application_Start(object sender, EventArgs e) { //Load the cache for the first time. ReloadCache("All"); } protected void Application_End(object sender, EventArgs e) { //Cleanup anything that we left if we left anything using the SubmitReport.asmx /*string tempPath = Server.MapPath("TempData"); if (System.IO.Directory.Exists(tempPath)) System.IO.Directory.Delete(tempPath, true);*/ } /// <summary> /// When the session starts. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Session_Start(object sender, EventArgs e) { UserSession session = new UserSession(Request); try { LoggedInUserInfo liui = session.Login(); // if user successfully logged in // then store in Session cache if(liui != null) { CacheManager.SetCache("loggedInUser", CacheManager.cacheTypeEnum.Session, liui, this); // get the top 10 Read reports in last 30 days i.e. one month Report report = new Report(); IList list = report.GetTopReadReport(10, DateRangeEnum.OneMonth, ReportClassificationEnum.All, liui.User.UserId); CacheManager.SetCache("TopReadReport", CacheManager.cacheTypeEnum.Session, list, this); FillCache("SavedSearches"); } } catch(Exception exc) { Exception LastException = exc; Session["LastException"] = LastException; ErrorDetail ed = new ErrorDetail(); RecordError recordError = new RecordError(); recordError.Credentials = new System.Net.NetworkCredential(Util.GetConfigValue("WebServicesLogin"), Util.GetConfigValue("WebServicesPwd")); recordError.PreAuthenticate = true; ed.applicationName = "Ashwin20"; ed.browserVersion = Request.ServerVariables["HTTP_USER_AGENT"]; ed.errorUrl = Request.Url.ToString(); ed.note = LastException.Message; ed.stackTrace = LastException.StackTrace; ed.userNa

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          No one is going to look through this useless unformatted drivel. Format the code using the pre tags, i.e. "code block" and only include what is necessary, not everything.


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups