Giter Site home page Giter Site logo

kamsar / kamsar.webconsole Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 3.0 4.3 MB

A .NET library to assist in creating pages to host long running operations in a "console" window

License: MIT License

C# 89.47% ASP 0.29% JavaScript 2.88% Batchfile 0.29% CSS 4.60% PowerShell 2.47%

kamsar.webconsole's Introduction

Kamsar.WebConsole

This library is designed to provide a framework to execute long-running web requests in, such as search index rebuilds, database backups, etc.

There are three primary components:

  • A progress bar that displays task progress
  • A "progress status" text that displays the current state of the progress bar in text
  • A virtual console window where you can write detailed information about the task. The console auto-scrolls.

Quick Installation/Usage

  • Build Kamsar.WebConsole or add the project to your solution
  • Create a new Web Form and change its codebehind to inherit from WebConsolePage
  • Implement required abstract methods
  • During execution of your Process() method, utilize the status updating methods (SetProgress, SetProgressStatus, and WriteConsole/WriteConsoleLine) to follow what you're doing.
  • The page will update status in real-time as your processing runs
  • Note: any controls, markup, or content in the .aspx page will be ignored; the console takes over the rendering process. Only the @Page line is needed.

See also the Kamsar.WebConsole.Samples project for an example of implementation.

Licensing

This library is licensed under the MIT license. Go nuts.

kamsar.webconsole's People

Contributors

kamsar avatar richardszalay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kamsar.webconsole's Issues

When remote host closes connection - ASP.NET process is terminated

When doing a Unicorn sync - we are seeing this error at WebConsole, which kills our application.
Is it possible to avoid terminating ASP.NET process in this case?

ERROR Unhandled exception detected. The ASP.NET worker process will be terminated. 
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Web
   at System.Web.HttpWriter.BufferData(Byte[] data, Int32 offset, Int32 size, Boolean needToCopyData)
   at System.Web.HttpWriter.FlushCharBuffer(Boolean flushEncoder)
   at System.Web.HttpWriter.GetBufferedLength()
   at System.Web.HttpResponse.UpdateNativeResponse(Boolean sendHeaders)
   at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
   at System.Web.HttpWriter.Write(String s)
   at System.Web.HttpResponseWrapper.Write(String s)
   at Kamsar.WebConsole.TextWebConsole.Write(String statusMessage, MessageType type, Object[] formatParameters)
   at Kamsar.WebConsole.WebConsole.<.ctor>b__8_0(Object arg)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.