Kentico Media Library not syncing with MVC project - model-view-controller

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)

Related

How to config Service and UI view

Reference to my previous question: Can't compile the project. Missing so many files
I am very new to .NET core version. So I have so a few questions need someone to guide me to a quick start.
There are 2 templates version for ASP.NET core 2.0; .NET core and .NET full. Does it mean if I choose the .NET full version, I still can use 3rd party DLL such as iTextSharp or EPPlus version, doesn't it? 'Cause I have read that with .NET core, all 3rd party DLL without .NET core support could not be used in the project.
From the download template, it contains 2 main projects, one is .NET core service and another is angular UI view. Currently, it set to localhost for all API calls. Because I run the window server in my VM and run the client on my host so I need to set the client to look for the service on my VM via IP address. Which file do I need to config?
Related to Q2, how to config the .NET service to run in production mode and install into IIS server?
Thx in advance for all comments and suggestions.
Answer to the second question;
There's a config file in src/assets/appconfig.json
You can change those values...
remoteServiceBaseUrl: Used to configure base address of the server
side APIs. Default value: http://localhost:22742
appBaseUrl: Used
to configure base address of the client application. Default value:
http://localhost:4200
appBaseUrl is configured since we use it to define format of our URL. If we want to use tenancy name as subdomain for a multi-tenant application then we can define appBaseUrl as
Aspnet Zero Angular Getting Started
PS: Apart from the framework configuration; be aware that connecting something in VM is another discussion. You need to set some settings like Bridged Networking... You can figure it out in the related VM's board.
For point 1 you can refer this post.
For Point 2: You can host your service application on Azure or IIS so
that you can consume your service from other PC.
For Point 3, Its pretty well explained here.
Additional: If you want to deploy Angular application, you can refer Deployment of Angular Application
You can also refer src/assets/appconfig.json for required configurations.

Setting up web farm for DNN 6.2.6 CE with multiple file servers

We are planning to convert our website which is running on single server to a web farm with two servers on Windows 2008 R2. I am afraid I haven't found lot of documentation on how to achieve this. Can any one please point me to the proper documentation for this. The one document I found is
http://www.datasprings.com/resources/articles-information/creating-a-webfarm-for-your-dotnetnuke-site
This one explains using single UNC share as file server but we are looking into to use every server in the web farm as file server (i.e. have dotnetnuke folder on all the server's local drive) since UNC share becomes single point of failure. So my questions are:
Can we do DNN web farm with multiple file servers, if so, how?
And also, how does the modules updates should be done? Does it need to be done on all the servers separately or does the DNN has any inbuilt mechanism for this or do we need to use DFS replication between the servers?
Also, we use heavy caching. Since we have to use file caching in the DNN CE web farms, how does the caching works with multiple file servers?
Also, please let me know any points or gotcha that I need be aware of. Any help is greatly appreciated.
The recommended way or doing a web farm for DNN is to use a single UNC share. Even with the paid editions of DNN that is the recommended approach.
Is it possible to do it any other way, yes, but there is nothing build into DNN to help you do so.
If you want to use multiple file servers you start running into issues with file based caching, module installations, etc.
Using UNC Share is best and easy to setup method to run DNN portal on webfarm. If you use single UNC share from all servers then possibly you do not get cache issue.
I had setup webfarm of DNN portal which was running on 4 web servers and 5th one was being used as file sever (UNC share) and DNN Database server and it was working quite well.
One more thing you should consider is that - Sessions.
DNN itself do not make use of Session and session variables. But if you are using your own modules or third party modules using session then it will be good to implement Session State Server.

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.

Domain names and redirecting with proper SEO using IIS 7.5, ASP.Net v4.0 and MVC3?

Let's say I have several sites I want to create - all with separate domain names. Each of these sites uses the same back-end, and the configured all from the same back-end.
As such, I was wondering if I could do the following:
In each of the sites' DNS, point them all to the same site.
So for example:
site1.com, site2.com, site3.com ---> mymainbackend.com
Then at mymainbackend.com, I would read the incoming Url, and serve up the appropriate content based on that incoming URL.
One issue with this is that all the sites would reside on the same app pool, but a work-around would be to have batched pools.
The architecture for this is IIS 7.5, MVC3, ASP.Net 4.0.
Are there any SEO got'cha's with this type of scenario? Are there better solutions?
I run 4 different domains from the same hosting using the routing module to decide what content to serve.
SEO wise there should be no specific issues.
It would be the same as hosting multiple websites on the same server and the potential issues that may raise.

How do I know if I need Full IIS in my Azure web role?

I need to migrate an ASP.NET application to Azure. The application needs database access and access to temporary files and also using out-proc COM objects. Turns out there's "Full IIS" mode that offers some rather vaguely phrased advantages (from here):
However there are a number of useful capabilities that only exist in IIS, including support for multiple sites or virtual applications and activation of WCF services over non-HTTP transports through Windows Activation Services.
Now obviously using Full IIS forces me to deal with the ASP.NET part and role part working in different processes and that's a big deal so I need to know whether I need Full IIS mode in the first place.
How do I decide if I need Full IIS mode? Is there a full checklist?
I think your default answer should be use Full IIS in Windows Azure capabilities. The hosted web core offering is really there for backwards compatibility as it was the original model prior to 1.3 SDK. Full IIS is the default and you must explicitly opt to go back to HWC.
The reasons that most people wanted full IIS were around a few, but important limitations:
Better support for IIS extensions (e.g. Smooth Streaming, Web Farm, ARR, etc.). HWC did not always support the modules and combined with a missing admin permission, made it really hard if not impossible to use all the modules that folks wanted to use.
Support for multiple web sites, vdirs, and application pools. HWC is a single app pool (the hosting process) and no way to support multiple web sites. There was a serious concern about needing to dedicate 1 entire role to a single web site. With Full IIS, you can have multiple sites and use host headers to get more bang for buck out of web role (especially with small web sites)
Support for standard tooling - Web Deploy, AppCmd, etc. don't work really well (if at all) with HWC. Anything that modified the applicationHost.config usually had issues with HWC.
WAS support. This allows you to use WCF with IIS as a host in non-HTTP transports.
In general, with Full IIS you have parity with what you do on-premises so it makes it much easier to configure and setup.
Regarding the RoleEntryPoint/HWC process model versus the RoleEntryPoint and separate Full IIS process, I am not sure that is really an issue. There were a few quirks perhaps initially, but what concerns you the most about this?

Resources