Hosting MVC Core Application without publishing - asp.net-core-mvc

We started to work in a MVC core application. I have seen many web sites about hosting Core applications after publishing. Can we host a MVC core web app without publishing, that is copy all files from local to server machine using ftp as we do in asp.net project? Since it is in development stage there is lot of changes in every day and it is difficult to upload these changes after publishing.

Related

Deployment on Test Server

I want to deploy ASP.NET Core Web API project on testing server with database. I have gone through heroku but it doesn't support Dot Net applications. Here are the configurations of my application:
ASP.NET Core 5 Web API
SQL Server 2019
Note: I need backend on server so I could test frontend application where ever I am.
I have used the following they each have positives and negatives. The first works the best for me.
winhost.com has cheap SQL + .NET Core hosting. No affiliation with them other than a happy customer for 10 years or so.
Azure, and other cloud hosting also works and is more performant for more money.
You could also setup your own server on an old PC (cheapest option)
You can go with Asphostportal, shared hosting option, they do support both Asp.net core and SQL server. They are pretty cheap, it is around $8/month.

Kentico Media Library not syncing with MVC project

I'm using Kentico 9 with MVC. When I add a image to the media library it is not copied to the MVC application. I am using the default media library location which resolves to ~/site/media but the image is only accessible from the admin domain. admin.site.com/site/media/image.jpg and not from site.com/site/media/image.jpg.
For the image to be accessible, I have to manually copy the images to the corresponding folder.
My admin and MVC site are hosted on the same server using two different IIS app pools. However, we plan to separate these in the near future, so its important that this synchronization works correctly.
Under Web Farms, I have only one active server.
Both web.config files have the same CMSHashStringSalt values.
based on the Documentation:
By default, content of media libraries is synchronized via web farms and duplicated between Kentico and your MVC application.
EDIT:
What is the best practice for configuring media libraries with MVC?
The fix was simply adding <add key="CMSWebFarmServerName" value="MVCApplication"/> to the MVC application
SOURCE:TLDR
If you plan to run the Kentico and MVC applications on the same domain (for example, distinguished by port numbers and run in different virtual folders), you need to manually assign unique server names to the web farm servers. To set a web farm server name, see Step 5 in Configuring web farms manually.
Since these sites are hosted on the same machine, i needed to specify a unique server name.
My understanding of the MVC setup is that you should either have two servers setup manually in your web farm or have the web farm set to auto. As you only have one, there is nothing to synchronize. That you only have one server in your server list makes me think that the synchronization is not going to work. If your web farm is set to auto, perhaps try to configure it manually.
Do you have the Admin and MVC running as two site under IIS pointing to the same database? Also, do you have the license key with 2 servers modifier? (you will need to request that from your sales rep)

Windows 8 Application Packaging

I am working on creating a Windows 8 application. UI is using HTML5. Using WinJs I am calling a WCF service that returns a datatable used to build out the UI. All that is good.
I would also like to create a Window Service that gets packaged up with the application, so when someone download/installs it gets unpackaged and the windows service is started/executed. Is this type of configuration possible?
The WCF service today is a web service, but I would like to make it a windows service. The idea is to make everything self contained. This would allow me to make it available in the Microsoft Online store - if I wanted to go that route.
Windows 8 Applications don't support installing services. The best you can do is install a service separately.
Your WCF service should be decoupled from your app and most probably running on a different machine! I am pretty sure that the they are not going to allow you to install or run services in context of a Windows Store App.
Installing a windows service is not an ideal approach for any Windows 8 application. I understand that you want to make everythig self contained but, why as a WCF local service then? Why don't you consider having it has a data access layer in your app itself? Just a thought.
REGARDING CLIENT SIDE
Web services are separate projects and separate deployment models. You can have one Visual Studio project for the Windows 8 client app and one project for the Web Services side.
Windows 8 apps have several options for saving persistent data, such as endpoints for consuming web services.
There are several consideration when storing Windows 8 application data, such as the location of web services to be consumed.
Windows 8 Application data also includes session state, user preferences, and other settings. It is created, read, updated, and deleted when the app is running.
There are 3 types of dimensions to consider. The system manages these data stores for your app:
(1) local: Persistent data that exists only on the current device
(2) roaming: Data that exists on all devices on which the user has installed the app
(3) temporary: Data that could be removed by the system any time the app isn't running
As a developer, you concern yourself with a couple of objects to persist application data:
The first container object is ApplicationDataContainer. The other is ApplicationData. You can use these objects to store your local, roaming, or temporary data.
REGARDING SERVER SIDE
Your Windows 8 Client app will consume http-based web services.
Most developers deploy web services to the cloud to be consumed by iOS, Android, Windows, and other server side services.
Windows Azure is a cloud offering that makes exposing services to clients very simple.
You can leverage either cloud services for robust solutions or the lighter weight Azure Web Sites.
You can typically choose either of these two project types to create web services:
(1) Windows Communication Foundation WCF; or
(2) ASP.NET Web API, which is included with MVC version 4.
WCF has been around longer and has historically been the primary choice for developers when it comes to exposing services.
Microsoft's more modern concepts about web services relate to the ASP.NET Web API, which truly embracing HTTP concepts (URIs and verbs). Also, the ASP.NET Web API can be used to create services that leverage request/response headers, hypermedia, etc.

Deploy ASP.Net site to windows server

I have been developing an ASP application which I have almost finished. It accesses a SQL database on a Windows sever on AWS. I would like to deploy my application to AWS though.
Does anyone have any suggestions about how I should do this?
Refer to the Deploying an asp.net application thread that contains all necessary information and step-by-step instructions on how to accomplish this task.
If you are deploying an MVC application, check whether the hosting provider provides the support for MVC hosting. Just right-click on the solution and select Publish. Then copy the files into the hosting space.

Best way to package and deploy MVC3 applications at client sites

What is the best way to deploy an MVC3 application to a client site? Now I can create a deployment package using web deploy and possibly give them a script to deploy the files on their IIS servers. But is there any other way? I just want to give them a one-click option after they download the application, if that makes sense.
Also, is there a good way to obfuscate MVC3 application as a whole?
You will need a script to deploy your MVC application files, as well as the MVC required DLLs to the web server. In your script you can have it so that it creates the application in IIS to the appropriate application code.
As for a "One Click" type deployment, you'll have to have some knowledge of how their IIS is setup and what they are willing to do with virtual directories.

Resources