Publishing from visual studio to windows server 2012 - asp.net-mvc

i have a Mvc 4 project i would like to publish on a windows server 2012. On the windows server 2012 i have setup IIS 8 and Sql express. Do you know of a good guide to set this up? My issue is that i can't get the database working. I would like to make it so i can easily publish changes to the website. Any ideas how to do this?
is it possible to setup Visual studios on the server for the nuget package console?
the only way i have got this working was to copy the entire database to sql express but if i change anything i have to do it agian. Not a very stable solution.
Best regards John,

It's not exactly clear what the problem is, but I'll try to give a couple of pointers.
First, nuget shouldn't be involved in the deployment per se; it's involved when building the project, but once you get a deployment package it should contain everything the project needs - look at setting up the deployment using the visual studio built in tools, i.e. see this MSDN link.
The database is a separate side of this. You say you can't 'get it working' which I can't really help with since there's no details - you need to be familiar with connection strings and change your connection string during the deployment so your app can connect to the right database. The publishing wizard linked above can help with this as well, or you can use config transforms, or any number of other mechanisms.
Documentation here has details about what you can do on the database side. The publishing wizard (when using web deploy) can read the database schema and even make schema comparisons so you can deploy schema updates, but I've never actually used that solution - I usually need more control over what happens so I manage my schema upgrade and downgrade scripts myself.
Since there are many problems compounded in this question I suggest you ask a separate, more focused, question about each one.

Related

how to run SmartStore.NET in visual studio 2015?

how start smartstore.net in visual studio localhost without any error
i download github code and open project file from
SmartStoreNET-3.x\src\SmartStoreNET.sln
The download link https://github.com/smartstoreag/SmartStoreNET
I use visual studio 2015 enterprise edition and windows 10.
First, you must be change the "Solution Configuration" to Debug mode, and second change the "Solution Plataform" to Any CPU.
This work for me.
I recently went through this integration/configuration procedure trying to get a local instance of SmartStore.NET up and running with demo data. I was able to get there eventually, but the development environment setup was by far the most tricky.
I would suggest starting with these two links:
http://docs.smartstore.com/display/SMNET30/Installing+SmartStore.NET
http://docs.smartstore.com/display/SMNET30/How+to+build+SmartStore.NET
I have a hunch you're issue may be your development environment configuration is not fully correct. Check out this page for more details about requirements:
Technology and Prerequisites
http://docs.smartstore.com/pages/viewpage.action?pageId=35555597
*NOTE: they reference ASP.NET 4.5.1 but I had to use 4.61 to take advantage of some newer features in C# 7.0 - Tuples, and several others)
Probably the most significant discovery I found was their were dependency issues when trying to restore the NuGet packages referenced in the solution. I had to go through this process maybe 4 or 5 times to finally get the app running locally.
Once all of this was complete, getting it working in 2015 required little effort.
I would also suggest narrowing your question to more specific problems. (that's just me)

How do teams work on VB ASP.NET MVC sites?

In PHP, you can just log in to the FTP and see all of the files. I notice in VB ASP.NET MVC when I publish a site it doesn't include the controllers or models. Rather, it seems to compile them into DLLs. How can the files be modified with out access to the originals? Would a developer have to publish the files in a separate directory and then the other developer pull them down and open the project in visual studio?
Keep your SourceCode in a Version Control System like SVN /GIT /TFS etc.. Whenever you want to make an update , Get the specific version you want to update and make update to that.
Having a Version control gives you so many advantages
1) Collaborative working. Many members of a team can work on same code base without overwriting conflict
2) Restore to a Previous Version : Something wrong with the current production move ?. Just get the Previous version (Label) which is working fine (and was running in prod) and rollback to that till you fix the issue.
Keeping the Previous versions of code will save a lot of time in a Programmers / Team's life.
This SO question has good points about why we should use version control.
Version control is not only for Teams. Individual developers can keep their code in Version controls and sleep nicely
Btw, Your MVC project's Model classes and Controllers classes are compiled into the DLL files.
I've seen a lot of companies that work with Visual Studio implement Visual Source Safe.
information can be found here http://msdn.microsoft.com/en-us/library/3h0544kx%28v=vs.80%29.aspx
otherwise it's pretty much what Shyju said.
In a professional environment, there is a very clear distinction between editing source code, and deploying to production. You seem to make no distinction.
Usually developers make changes under careful control using a source control system like SVN.
Build & deployment is then done separately by a dedicated team member. Developers do not touch the production servers willy-nilly.
How can the files be modified with out access to the originals?
I don't understand. If you want developers to have full access to the production environment, why not give them full access to the source code as well? In your PHP example this is a given.

Trouble publishing VS 2010 ASP.Net MVC 3 Razor web application to IIS 6/7

I have been trying to get my feet wet with MVC by building a simple CRUD web application linked to a SQL 2008 database. Everything works great when I run the project from within VS, but I have run into nothing but failure after failure trying to get the application to publish successfully using either IIS 6, or 7.
I have googled my fingers to the bone trying various fixes and methods for publishing, but so far have just been running into wall after wall. I feel like there must be something basic I am overlooking to get this going, but I am stumped.
I was hoping that someone with more experience working in this environment might be able to suggest some rookie mistakes I could be making, or any tips for publishing an MVC web app for the first time.
Thanks in advance,
Patrick Sean Henderson
We really need more information but making some assumptions here are things to verify:
Assumptions:
IIS 7.x
Proper .NET version installed
VS2010 & NuGet
File System Based Deployment
Suggestions:
Make sure you include the deployable assemblies required.
Right Click MVC project in VS
Select "Include Deployable Assemblies"
Check off the required assemblies
I'd have more with more background details
Post an update when you can!
Brent

Anyone would like to share their experience using TFS for Application life cycle management

we are developing white label web and mobile healthcare application for our clients. our product is evolving rapidly and we are supporting existing clients and going to support new clients.
current development workflow involves SVN for source code, requirement documents tracking and mantis for defect tracking.
We are considering VS TFS 2010 based Application life cycle management for our organization. we are hoping that VS TFS 2010 will help us streamline the following
1) Requirements Management
2) Source code Version control
3) Build automation
4) Test management
just wondering is anybody have experience using VS TFS 2010 and would like to share their experiences? is there any worthwhile alternatives to VS TeamSystem?
Preface: This is a personal opinion and I have no ties to Microsoft other than that I develop with their tools for their platform, even though I come across as a Microsoft lover in this answer. (which I am - I love .NET development)
I haven't used TFS 2010, but I HAVE used the 2005 Team Suite including TFS and the Visual Studio versions supported. We didn't move forward to 2008 or 1020 because of how extraordinarily difficult the 2005 version was to install. However, once we got it installed... Loved it. The project management tools were intuitive, and worked well. Setting up builds was a breeze, and it did everything I wanted it to do simply and efficiently.
Since then, however, we've adopted open source tools to do the same type of stuff. As I said, the install of 2005 was a NIGHTMARE and even though the 2010 version of Team Foundation Server installs VERY easily (I tested it myself and demonstrated it to the poor team who helped with the 2005 version just to show them how much better it is), I was unable to convince my team to give it a second chance. They chose to stick with tools that didn't need to be upgraded as often, and that were easier to upgrade when it did need to be done.
If it were just me, I'd be using it. This is one of those things where things just work right, and work together seamlessly. And the available documentation (MSDN, videos, etc) is exhaustive. I doubt any other set of tools is as well-documented.
It's just too bad that the experience with the older version was so bad that nobody else here will give the newer version a fair shake.
As for alternatives - it's not open source, but Atlassian has a nice set of tools. They work well for Java and we're using some of them in our .NET shop. We're using SVN for source control. That's about the only thing I like better about our new environment than I did the Team System.
I started at a new company 2 months back that uses TFS 2010 exclusively (for source control and issue/task tracking), and I haven't been able to get comfortable with it. Previously, I've mainly used SVN for source control and either OnTime (by Axosoft) or Fogbugz (Joel Spolsky) and have loved them both.
I don't know if it's the way they're using TFS (branching is nothing as nice as it was in SVN... and they have Product Backlog Items, Sprint Backlog Items, Bugs, Impediments, and god knows what else to keep track of) but I find it way too convoluted.
I think the tools a developer uses should assist the dev, not get in the way of. If I have to stop and think about how to branch code or assign an issue, then something's wrong with my tools (or I just need to spend more time learning them... which doesn't make sense to me either).

Group project via Team Foundation 2010

We will be doing a database driven logistics system for our Software Analysis and Design course. What we want to do is to work on the project simultaneously so that we can finish the project earlier. Is TFS the right tool for this? If yes, how do we start? What are the steps to set up the TFS? We use VS 2010.
Thanks.
This is a very broad question. TFS is an excellent code repository that does allow for multiple developers to have a centralised code base (which sounds like what you are after).
The first thing you will need of course is the TFS 2010 installation disk and ideally a separate box to install it on. Although the installation and set up can differ slightly on differing OS, i would recommend following the installation guide here and posting any specific and more detailed questions as you come across issues.
Is TFS the right tool for this: Maybe. It may be a bit much overhead to use for a course.
How do you start: If you have Visual Studio 2010 Ultimate, TFS should be included. Everything is installation wizard based, and the install (can) give you everything you need. For what you want, a stand-alone installation using SQL Server Express should be fine.
If you're looking for something lightweight that you all could use for source control, you might want to consider some of the git/svn hosting services (e.g. http://unfuddle.com). There's no direct integration with Visual Studio without a third-party tool, but it will give you the basics of being able to share source code among your team.

Resources