I need a fast runtime expression parser

Have you seen https://ncalc.codeplex.com/ and https://github.com/sheetsync/NCalc ? It’s extensible, fast (e.g. has its own cache) enables you to provide custom functions and varaibles at run time by handling EvaluateFunction/EvaluateParameter events. Example expressions it can parse: Expression e = new Expression(“Round(Pow(Pi, 2) + Pow([Pi2], 2) + X, 2)”); e.Parameters[“Pi2”] = new Expression(“Pi * Pi”); e.Parameters[“X”] = … Read more

An attempt to attach an auto-named database for file ….database1.mdf failed

I had this problem also and it was a pain. I configured my connection string and managed to solve the problem. In the connection string I replaced the value |DataDirectory|\dbfilename.mdf for AttachDbFilename property, with the path to the file. |DataDirectory| can only be used if the database file is in the App_Data folder inside same … Read more

How should I perform a long-running task in ASP.NET 4?

Preferentially, avoid having long tasks executing in such an environment. Delegate long running tasks out to a stable system service via interoperability, leaving the web application responsive and only required for direct user requests. Web applications have never been (and still aren’t) considered reliable systems – anyone who has ever used a browser has encountered … Read more