.net application slow down but after restart iis and sql server service it works fine for some hours [closed] - c#

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
we are facing application slow down and user unable to use it. for simple transaction it takes 5 to 10 minutes or not responding. but if we restart IIS & Sql Service then it work fine but only for next 4/5 hours. following is the details of application.
Application is 3 tire architecture. WCF web service project is hosted in IIS6 on server having OS Advance Server 2003 and SQL Server 2005 is on the same server and client application is separately install on every client machine (approx. 50 users) by click once deployment.
For data access we have used Microsoft Enterprise Library. application developed on framework 3.0.
any help will be really appreciated. Thanks in advance.

Well there are so many possible reasons of this starting from poor written queries, lacking of useful indexes etc. It's hard to tell anything really useful without any details. However I recommend getting familiar with sys.dm_os_wait_stats dynamic view in SQL Server. It is a very good starting point. Check out this great article: http://www.mssqltips.com/sqlservertip/1949/sql-server-sysdmoswaitstats-dmv-queries/
And be aware that all the information stored in DMVs is lost whenever you restart SQL Server. It's complicates the troubleshooting and considered as a bad practice, try to avoid it.

Related

C# winforms application what's next? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
So a friend has asked to develop a desktop application in order to ease his work, it's not too big or crazy just some simple crud operation and some search tasks here & there.
I have finished the application now it's time to deliver it.
I have never delivered an app before and never really found myself in that situation since I am a total beginner with absolutely no real world experience so am super new to this, but I can handle and deliver what I am asked to do.
Some information about the application:
Developped using C# ( winforms ) on top of .Net ( 4.5 )
SQL Server 2014
Entity Framework 6.
So how do I deliver this to his workstation, I have read in the last days these a lot ( release , deploy , publish ) kinda got confused because the explanations were too vague plus the english that was used was a little bit difficult for me since it's not my native language.
Please let me know what should I be aware of, and I would love to see like step by step how to do this, and how professionals do it.
Thanks in advance and have a nice day to each and every one of you.
For my solution (Windows Form application with a SQL Server Database using EntityFramework), I used ClickOnce to publish it.
How to: Publish a ClickOnce Application using the Publish Wizard
You have to be sure that all the assembly you use in your project (.dll) are installed on the computer like those containing entity framework. You can easily find them on Microsoft website.
If your database is a local database, you have to install sql server express LocalDB on the computer.
And then, you only have to double click on the generated file from clickOnce and it will launch an installer wizard. If it fail, it shows you the error in detail and you can easily fix it.
Finally, you have to validate the connection string in your configuration file to be sure that it is pointing to your database.

How to build a server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm new to C# and decided to write a small client server chat application to approach the new language with learn by doing.
The question I have now is whats the best way to code the server part on.
The client is built with C# and for now a MySQL connection to my hosting server(Linux).
But i realized this is a dumb way to go at it.
So I was thinking of writing a server part that all clients connect to and that server will have a MSSQL connection and handle all the requests and chat delegation.
So the options I'm thinking about is either
WCF Service (as I understood they can be installed on any IIS server)
Windows Service (don't know if you can run this on hosts online)
ASP.NET WebService (This would actually only by a website that takes requests)
Node.js with socket.io
Other options?
What do you guys think would be the best approach for his?
To keep in mind is that I would like this server to be hosted online without spending tons of money on a VPS-Server or similar.
As the most productive solution, you should probably go with SignalR (http://signalr.net/), or ServiceStack (https://servicestack.net).
Both "frameworks" are fully mono compatible, so you can run the solution you build on your linux-server.
As an ORM-Mapper, you could use the EntityFramework, which would allow you to use not only your linux-server, but also your MySQL-DB. See this blog-post for more details: http://blog.3d-logic.com/2013/04/14/entity-framework-6-on-mono/
Depending on your "other language"-knowledge, you want probabbly to start off with no framework at all, but to build everything from scratch.
Maybe it was just me, but I learned the most about how .net works, as I had to "rebuild" stuff like linq, etc.
You can also consider:
ServiceStack
ASP .Net Web Api
Windows Service is not a technology, it is may be using as host (IIS, Windows service)
The easiest way to get started is to stay in the Microsoft walled garden and adhere there their ideas about how this should be done. Microsoft developer products integrate exceptionally well.
Probably a console application connecting to a WCF service connecting to a SQL Server using Entity Framework.
This is rather straight-forward to set up. Tutorials for this are available in heaps. Make sure to use recent tutorials and try to stay simple.
I advise against writing a chat because that requires either polling or a push mechanism. I think that is unnecessary for a beginner project. Write a data-driven application like a to-do list. Get fancy later. The first steps are hard enough.

Backend or database system for small business application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm coding a program for a small business. The application's going to be used for store-keeping and the ordering of parts for a mechanical shop. I need some type of backend to store orders, article numbers & prices, customers and so on (obviously). Right now I'm using a local MySQL server and running queries directly from the code. This is not ideal because of the risk of a system meltdown or similar. I've thought about running a local MySQL server - with a scheduled backup on a remote host, but I'm hoping there's a better solution. For previous applications I've written a PHP wrapper, and used a web hotel to host the MySQL server - Which isn't ideal either for security reasons. I suppose I should mention the application's written with windows forms in the VS .net environment(in C#). My question's this: How do I set up a MySQL server (or other type of database system) on a remote host - that I can run queries on and then return the result back to the application? Preferably I wouldn't want to handle the MySQL server myself but outsource it. I don't mind renting a server from some host - if it will spare me the hassle of setting up a local server machine to run separately. Are there any solutions that you can rent for this purpose? I'm sure there must be tons of information about this on the interwebs but I can't find anything. I would be very thankful if anyone could give me some pointers!
One way you could do this is rent a cheap VPS and host mysql in there. I have been using DigitalOcean, and it is pretty good. For your needs a $5 per month VPS would be enough.
Or you could use Azure. http://www.windowsazure.com/en-us/services/data-management/

Extending application to use on LAN [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am not a very experienced programmer. And I am facing technical issues in database servers.
I have developed a small standalone C# Application which is already in use.
It uses SQLite database. The database usage is not very heavy. Only a few form needs to be read and write to the database.
Now there is a requirement that it should be used on LAN.
I know that SQLite is not a good database option for client/server.
But keeping these points in mind should I change the database or not..
The application is already using SQLite and this is not a project from start.
The database usage is not very heavy. Only a few forms will be filled and data is written on the database.
At most 1-4 Pc's will be using the application simultaneously.
I had tried to install MS SQL server on my customers PC but then I am facing so many technical issues and it is taking a lot of time.
So I am thinking to stick with SQLite only.
Any suggestions will be greatly appreciated.
So is your question "Can I share a SQLite database between multiple workstations", or "How to install SQL Server"?
I'd say go with the last. SQLite even promotes the use of a client-server DMBS if you require multiple processes accessing the same database.
Installing MS SQL server can be pain; you have to ensure .NET framework is installed, windows service pack is installed and MSI has correct version. Still I would prefer going that way, because of robustness and reliability it promotes and rather write some robust installer to "make it happen".
You can of course, keep your current solution and write web service that will lock access to database to one-client & one-query at time only and rewrite your app to use this service instead of accessing db directly.
Btw. - Microsoft SQL Server Compact Edition is working similar to SQLLite (in the terms ease of install), and it allows multiple connection to the same database (.sdf file)
http://technet.microsoft.com/en-us/library/bb380177%28SQL.90%29.aspx

Host MVC web app without IIS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a Asp.net MVC 3 application which I want to give to a user to use without them having to host it in IIS to run.
What I would like to have is some sort of executable that they click or a service which will host the application and then they can use it from any browser on the network.
What are my options?
Have you looked into IIS Hostable Web Core?
This feature basically allows you to host the entire IIS functionality
within your own process. This gives you the power to implement
scenarios where you can customize entirely the functionality that you
want "your Web Server" to expose, as well as control the lifetime of
it without impacting any other application running on the site.
You can look into IIS Express http://learn.iis.net/page.aspx/868/iis-express-overview/ Although it is still IIS it's much lighter weight and might be what you need:
It doesn't run as a service or require administrator user rights to perform most tasks
IIS Express works well with ASP.NET and PHP applications
Multiple users of IIS Express can work independently on the same computer.
If the application is meant for production use, you need to host it under an IIS environment. IIS Express is intended as a development server and not for production use.
Otherwise, IIS Express is the way to go if you want someone else to work on it in a local development environment.
Take a look at the following example.
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-signalr-20-self-host
http://owin.org/
http://www.asp.net/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api
http://blog.micic.ch/net/owin-and-razor-enabled-mvc-application-framework
Regards

Categories