I have a C# MVC application that uses an SQL database. I need to make this as easy to install/run as possible as it will be being run by people with no experience hosting web applications. The people that will be managing this are able to build servers with a base windows install (Windows2k12, 2k8, ect..) but have no experience with IIS or SQL. I can set it up for them but in the future if it needs to be re-installed I won't be around.
Depending on your options, setting up an automation server such as Jenkins to handle deployments would work. After setting up a deployment job anyone with permission can deploy with the push of a button. Doesn't get much easier than that. It's been a little while since I've set up an MVC Jenkins project but this blog post looks like a pretty good overview of how to set it up.
One of the downsides is that they'd have to keep the server running and make sure that they have a full backup available in case something happens. I'm guessing if you're trying to help them deploy the app in the first place, then they aren't going to be able to set a Jenkins server back up from scratch. But at the end of the day, if something blows up, regardless of what you set up for them, they're going to have to do something to fix it.
EDIT: Just read your other comment, didn't catch they'd need to completely rebuild from scratch (assuming little to no backups). I believe you can automate most of the IIS config and some of the SQL Server setup with Powershell, which can also run on Jenkins I believe. I've never done that myself, though. Here is another blog post on the matter that might be able to help, though.
Related
I was learning more about ASP.NET MVC, and I decided to to take a course on Udemy taught by Mosh Hamedani, and this course involved me making an application called Vidley. I was able to complete the course entirely, however I came across a problem:
A day or two after I completed the course. My computer caught a virus and I had to reformat the operating system and reinstall everything. I had the application backed up on bit bucket, but the application just doesn't work with the database. When ever I try to create a new user, the application just throws an error. What do I need to do to get the application working with the database again. I tried looking at other topics but I couldn't see anything that covered my specific issue. I am thinking if there is any kind of configuration I need to fix with the database, but I am not entirely sure and I am concerned I will break the code.
It really is upsetting because I was going to add that project to my portfolio, so I could find a job easier. I am wondering what I have to do to get this web application to work with the database again, and where should I deploy it. Should I use a website like app harbor, or is there any other better platform. I am really new at this so I am sorry if I am asking an absurd question.
Please recheck your connection string as you have reinstalled everything even the operating system.
Check your Database server instance is running or not. If not, start that service.
Recheck database name, username and password in your connection string.
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'm trying to evaluate SharePoint 2010. I've bought the book "SharePoint 2010 as a Development Platform" from Apress to help me get started with SharePoint (I have C# and ASP.net knowledge)
In the first pages I saw this warning:
'We strongly recommend setting up a virtual server on a physical machine, such as Hyper-V or VMware on Windows Server 2008. [...] SharePoint projects occasionally crash the server during heavy development. Re-creating a virtual machine is much easier than losing your whole personal computer'
which begs the question: How dangerous / risky is SharePoint development? How can I crash the whole server with it?
I have never had to rebuild a machine because of SharePoint. BUT, I can understand the book's claim. The scenario I see is that SharePoint starts acting unexplainably bizarre, and there is no logical course of action to fix it. For example you try everything you can think of, and for some reason everyone gets a 404 to the site, even administrators. If you dig hard enough you find it was because a .resx file wasn't copied during a deployment or something. If you don't dig hard enough, you will be tempted to rebuild the entire machine for the reason of "something happened with permissions probably".
For this reason, I do keep my SharePoint environments in a virtual machine. It comes down to the fact that SharePoint can stop working and it's too difficult to figure out why. If I could enumerate the concrete reasons for this, I would say:
SharePoint's error handling is so bad and misleading.
SharePoint is influenced by every nook & cranny of the system, for example obscure group policy settings, regional settings, etc.
SharePoint is driven largely by "best practices" mentality, and has its own way of doing everything. Some things are still controlled by IIS settings, other settings must be done through SharePoint administration. If you do it wrong, you will just get crazy behavior, not a hint in the right direction. Because SP is so configuration-focused, juggling all these configuration settings is overwhelming. [edit] In other words, SP configuration is not intuitive. Getting SP to do what you want is a matter of following some official recommended practice, not following intuition. In an industry that only thrives because of developers' ability to adapt, improvise, and learn-as-you-go, SP feels more like system administration than software engineering.
Doing things in SharePoint like configuring / deploying can often take a LOT of time, and this can seriously interrupt the problem-solving flow. The amount of time it takes to just haphazardly try something can prevent me from trying things, and cause disorganization in my thought process.
Installing and configuring SharePoint is quite a task. So if anything goes wrong with SharePoint it will take long to reinstall it from scratch. But if you are using Virtual Machine you can install and configure a VM and take its backup. Now when anything goes wrong with your working VM simply delete it and create a new one by copying files from backup of your fresh installation.
Also depends on whether you want to do other things on your dev machine. I do pure .NET development on my dev machine and when I'm doing SharePoint dev I spin up a virtual machine.
SharePoint uses loads of resources and can easily slow a server right down. It can become a pain always having to stop all the services.
I have a client that has an ASP.NET web application they sell to people that either in turn host it with our company or elsewhere. The end result is that source code and database setup can be spread across multiple servers, so when we push updates, we have to push manually by copying over source code and then updating the databases as needed. Are there any good alternatives out there for doing this to multiple servers?
If you're using Visual Studio 2010, then you could consider the new Web Deployment Package technology. See ASP.NET Web Application Project Deployment Overview
, which explains how you can also deploy IIS settings and even necessary databases as part of the deployment.
Have a look at the video on this page. It gives a decent introduction to MSDeploy.
An MSI would probably work best. Odds are, your customers will want to be in control of when/if the update happens, and an MSI is probably the simplest mechanism for giving out such an update.
John and Trip have great answers. I just wanted to add one little thing, unless this is an open source project:
Don't deploy source code.
Your client's app should be compiled and obfuscated.
my distributed program need update couple of files, i would like it to work the way like those anti virus software updating there virus definition database, is there such framework?
Edit:
I am not updating the application itself.
when the update is done, the application may need reboot.
A server will be open for update query and downloading.
It really depends on the how your data is formatted. If you're keeping a simple local storage in text files, then it's just a matter of hitting up a server and checking if there is a new version of the file(s). If you're keeping things in local SQL storage, then you could use web services to ensure the local storage has the most up-to-date entries. I think that option is what you're looking for, and it would be really easy to write. However, if you're looking to update applications, then something like ClickOnce might be ideal.
In response to your edits
Basically, you have to structure your application to read all information from information files and give those files some meta-information like a "version number" or something like that. Then, you have an ASP.NET web service which has two functions: one is to get the latest version of the information files and the second is to download the updates needed to patch from one version to the current. So, the application would intermittently check with the server to see if there is a newer version than what they have. If there is a newer one, then it would ask the server for the patch files needed to get to the latest version. If you do this before the application actually starts (a la Firefox), the user doesn't even have to notice that the application is restarting.
As far as I know, I am not aware of such a framework. However, the magical stuff is done by Web services or Windows Services looking for updates at a HTTP or FTP location. You might perhaps wirte yourself a code that would launch the script you deploy with your update.
Perhaps this would help a bit: Loading Assemblies. In short, this is the way plugins are plugged in your application, using proxies and so forth.
As mentioned by #Travis G, ClickOnce is good for application. Just different approach! =)