I have an asp.net (c#) project on a remote machine (I can log into this machine).
I want to trace its time consumption (mainly bll code).
Now I use logger with time Stamps, but I thought maybe someone has an better tool\way.
Thanks for any idea
We do this 24x7 in production here at stackoverflow using mvc-mini-profiler, which we have released as open-source (just search). With it, I can tell you instantly what TSQL was executed, as well as all the steps used in building this very page (with timing etc), including AJAX requests. And all for free, and with virtually zero impact.
(obviously you can limit the profile display to specific user accounts, etc)
Logging is a great way of doing it. You might try a profiler as well, sometimes they give you information you missed. Jetbrains has one RedGate has one, there are others as well, some have free trial you could try it out.
You should look into mvc-mini-profilier if you are using .Net 4.0 or greater. It may need to store to a sql server. It has a quick web ui but I normally ignore it and just use sql queries to get the data I need.
Related
We have a lot of red tape to handle before any changes to anything can be made on our servers. Hence I'm looking for ideas and/or suggestions for the below situation.
Must generate html from db (MSSql Server) for a static website hosted on IIS 6/7.
No (external) changes should be necessary on the server side except the ones the application/website makes itself.
I tried markdown and it generates everything nicely but I could not find a way to make the above idea applicable with it. I am willing to put all html code in the db for each individual page but it sounds awkward. Should I go with something ASP.NET'ish or a Windows Service or a standalone app to run at a schedule.
Thanks for the suggestions.
ASP.NET Dynamic Data might be your technology of choice.
http://msdn.microsoft.com/en-us/library/vstudio/ee845452%28v=vs.100%29.aspx
However, my advice is that you'll never be able to solve your problems by something like the above. You need to work out how to do releases more often - maybe start with a CI server and start scripting your releases if you haven't already.
I would like to profile certain actions in my application in a production environment.
I have previously used Stopwatch in .NET
It does not seem to exist in Silverlight (despite being in the documentation).
Can anyone suggest some alternatives? Is there anything better than DateTime.UtcNow?
I have used Yourkit and use ANTs in development, but I would like to gather information about performance of deployed software. I do not have access to the kind of data the users have, but can gather some logging.
Is this post any use at all?
It sounds like you want to deploy profiling IN your application so you can see how it performs on the user's PC?
Firstly you could have a look at this answer. Standard timers (eg looking at the value of DateTime.Now) are only going to give you rough resolution, which seems to be around 16ms at best.
Otherwise you can grab a performance profiling tool, there are several now which work out of the box with Silverlight, are easy enough to use and don't really take that long to get started with, with free evaluations. Two such tools JetBrains dotTrace and RedGate ANTS
Have you looked at this question: How to profile a silverlight application?
Are you looking for something other than this?
Telerik also has a pretty fantastic product for profiling named : JustTrace
JustTrace enables the profiling of local applications, running applications, Silverlight applications and local ASP .NET web site.
I used WMI way back during the .net 2.0 days. I had to use it coz there was no alternative. But today as we have a lot of functionality in BCL, does it still makes sense to use WMI? Is it supported by MS - Should I use this in my production code?
One of the things I hate about it is that I need to write string query. It is prone to typo errors, no syntax check. I could convert it to C# classes using Management Strongly Typed Class Generator (Mgmtclassgen.exe) but it still takes string arguments as path.
I would say that the WMI support in PowerShell is a pretty good indicator that WMI still has a future. I use it from time to time for remote administration to perform certain maintenance tasks.
We still actually use it in some of our production code, a toolkit for historical monitoring of various server performance and configuration details.
It was very handy for us since it was quite easy to put together some VBScript files under the control of Scheduled Tasks which did the data collection and transmission. This makes it runnable on a wide variety of Windows boxes without having to worry about compiling to the right target. It also allowed very fast bug fixing in the field since we can just ship a simple text file.
The fact that the source code is viewable is of no concern to us, it's not as if the idea of using WMI to collect data is some sort of precious IP :-)
I'm sure there's better tools but this was the simplest way we found. As far as I'm aware, it's still supported, inasmuch as they're still providing it in the later operating systems.
The only thing that burnt us (once) was the subtle changes between releases, such as objects themselves being deprecated or removed, making the WMI queries useless. We just need to watch out for that happening and adjust the scripts as necessary.
WMI Is still intensively used by monitoring systems. For example it is used by Microsoft Operations Manager. Also as already mentioned you can see WMI support in PowerShell.
I would suggest you also to check this in ServerFault as IT Administrators must be well aware about it also.
I will soon begin the painful*(kidding)* process of migrating multiple, separate, Access Applications to "Real" applications*(notice the quotes, no flame wars please)*. Most likely this will be Web Apps as the usual reason is multiple users and deployability but I will take it case by case.
Some of these are traditional Access apps using Access as the back end and others are using SQL Server(a central one) as the back end.
What I am looking for is a combination of your experience doing this and what resources you used to help.
Websites, apps, standards, best practices, gotcha's, don't forget's, etcetera.
I am a 1 person C# shop with SQL Server back end so whether Web or not I will be looking that direction.
Also, is it overkill or unattainable to try and develop a Framework for this kind of thing? Would there just be TOO MANY variables to even try and walk this path? Anyone ever try this?
Some further info based on below questions. We currently have ~250 users and they are spread between 5 Locations.
What I meant by deployability is perhaps a little vague. I simply meant that we are a Non-Profit Organization and as such we do not have the best bandwidth available so deploying full apps, even through ClickOnce can be tricky when combinded with the highly fickle nature of my users*(I want that box purple, no green, no get rid of it altogether type stuff...)*.
My idea is to try and develop a "framework", of sorts, that will help to streamline the process of moving an Access App to a .Net App.
Now I fully understand that this "framework" may be nothing more than a set of steps and guidelines; like, Use ORM*(LINQ2SQL or SubSonic)*to generate DAL, Copy UI to corresponding UserControls, rewrite Business Logic.
I am just looking for your experience/expertise to help me streamline my streamlining process... ;)
Those apps which use an Access database to store tables and which need web access should first be upsized to SQL Server. There is a tool from the SQL Server group. SQL Server Migration Assistant for Access (SSMA Access)
Then consider moving to the web only that portion of the app that requires remote access. And leaving the rest of the app in Access. That could save a considerable amount of time.
Alternatively consider going to Terminal Server. That along with a VPN means just some software licensing costs and next to no work on your part.
That said what do you mean by "multiple users" and "deployability"? Possibly we can give you some suggestions there. Access is multi user out of the box. However if you have mission critical data or can't rekey the data in the event of a corruption or have more than 25-50 users on the LAN then you should be moving the data to SQL Server.
Now that it's public Access 2010 can deploy applications to the web. All kinds of very interesting stuff can be done. For more information check the Microsoft Access product group blog or my blog with the appropriate Access 2010 tags
Speaking from experience I think you would need to upgrade on a case by case basis. Upgrading is essentially a re-write from scratch and you should take the opportunity here to re-design as necessary. The type of application structure and code style used for Access (likely to be procedural I'm guessing) is very different to a well designed OO .Net app.
You will be able to re-use the SQL Server databases of course and, depending on the apps maybe even the Access ones. If you're feeling brave you could even try the upsizing wizard although I wouldn't recommend it as we found the results less than ideal.
I would also advise you take a look at some kind of ORM tool (we use Subsonic) as this can massively reduce the amount of boiler plate code you need to write. Some ORM tools will also generate DDL for your database too.
We follow these standards (good idea to pick a standard early on and stick to it we found) and also found this really useful to get up and running.
Hope this was some help.
It seems like there are an inordinate number of really intelligent people here, so I thought it was the best place to ask a couple involved questions (shameless flattery). Your feedback on any item would be so appreciated.
I am about to develop a very large web based operations, inventory, sales management system. I had intended on C#/MsSql/Reporting, but am now leaning towards Php/MySql.
Multiple facility support. I
would love to have it all run from a
single place, but I need for each
facility to be able to run
autonomously from each other in case
of internet connectivity loss.
Servers could reside in each
facility and replicate to a central
one. MS Replication will hang the
DB for large databases. MS
recommendation to restructure the
database into smaller
segments…thanks. MySql seems to
have very solid replicability
features. Thoughts on this issue?
Distribution: Eventually this could be marketable
to other companies in the industry.
Using the method above I would have
to distribute the system to my
server in the customer’s facility.
With C# I can distribute compiled
code. With PHP any intellectual
property is vulnerable.
Reporting. Will I be able to print labels and
really specifically configured
reports with PHP? Pdf export is a must. MsSql has the
reporting service, but it has issues
with PDF font embedment, the
flexibility is very time consuming
and I am thinking that building it
all by hand might be faster. MS
print control also seems problematic.
Cost. Load would probably not ever exceed 100
simultaneous hits. Full Ms server
licensing is cost prohibitive.
Would sql express support this load?
MySql cost structure is very
appealing.
Thanks in advance for your insight. Sorry for the book.
As with most software, the biggest cost factor is almost certain to be developer time.
That in mind, you should go with whatever your team can get up and running in the fastest. Both of the stacks you are suggesting can get the job done.
(although I'm sure someone will be along in a minute to slate PHP and suggest you use C#/the MS Stack)
To answer the other points from a PHP perspective, which is what I know best:
Replication in mysql will do what you want, but make sure you set up something to let you know if there are problems.
You can use Zend_Guard to compile PHP, it costs though. PHP 5.3 is due for release soon and includes Phar archives - a shameless copy of java's jar archives so that you can distribute an app as a single file.
PHP can do PDF via fPDF. Never used the MS options, so not sure how it compares here.
I think sql server express could do that load, and mysql could too.
Adding point 2 with point 4 if you're intending to sell, you should think that, although in your company it won't exceed 100 simultaneous hits, in the companies your going to sell to it can exceed 10000 hits. So you should think about scalability now
As it is an application with massive size for what you say, you should expect in the future to have someone wanting to communicate with it, excluding php, for jsp or c# so you can make web services if needed.
PHP won't also allow so much distribution as C# or JSP.
3 - Reporting You can do that with any of those languages.
I think in the end is pretty much up to what you know to handle better. I would go for a language i already know instead of hitting a new one. That way you'll minimize deployment time, which is probably very important also.
For database i think you can get mysql or posgresql as they are both free, and will lower your costs.
Hope it helps :)
"I am about to develop a very large web based operations, inventory, sales management system." - this is a very ambitious undertaking. Are you doing this for fun, education, or profit? Do you intend to sell or open source this?
You realize, of course, that there are a lot of alternatives already in the marketplace. What advantage will yours have over the others?
Sounds like a classic buy versus build choice. Have you considered the buy before building?
It sounds like you prefer C# and MySQL. MySQL has several articles on using .NET with MySQL and the Connector/NET driver.
Unfortunately, I know very little about reporting with MySQL.