Where do i need to Host my MVC web appliacation

sridhar chiklametla asked on December 13, 2016 14:38

Hi, Installed Kentico 10 Trail Version and it created virtual folder in IIS with name Kentico 10. I also developed a MVC application, Now where should i host my MVC web app. If i host it in the same Kentico 10 folder it is overwrites the existing site and unable to open admin portal Else with another name, then how can i link the page type to the controller.

example:- http://localhost/Kentico10/ (Trail version) http://localhost/KenticoMVCWebapp/

Recent Answers


Brenden Kehren answered on December 13, 2016 15:34

They have to be 2 different instances of Kentico. They can reside in the same server if you want but 2 separate instances of Kentico running in 2 different websites. Did you refer to the documentation for setting that environment up?

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on December 13, 2016 15:34

You have several options for hosting:

  • create another virtual directory
  • host both as separate web sites in IIS
  • run from Visual Studio

Actually you're not limited here as it is completely separate application. The only requirement is that it has to have access to Kentico database.

0 votesVote for this answer Mark as a Correct answer

sridhar chiklametla answered on December 14, 2016 08:54

Thanks for your reply's Roman & Brenden,

Yes, i followed the documentation for setting the environment. I am having lots of doubts. 1. When i m creating a new MVC website using dashboard, which option do i need to select, a. Create a new site using a wizard b.Use web template if i select option b, i am unable to see the master page option else i have used option a. am i right or wrong.

  1. If i host two applications in two different virtual directories, than how can i set the master page of admin portal to my MVC application.
  2. When we create a new Page Type i observe a table is created in the db is that we call as module tables and records as the pages that are added to the pagetype. If so, than what is the use of custom tables in MVC, i want to import my list of products into the Kentico db and show to the enduser for checkout.

Note:- i need to create application using MVC and Kentico that will show my products in as a list and able to select products into the cart for checkout. Can you please suggest me the best ways to do so.

    Thanks in advance.
0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on December 14, 2016 10:48

Use template and choose MVC site.

You manage/build all your pages including master page in your MVC application.

Custom table is not a right solution if your going to use ecommerce. Product in Kentico is a complex obgect that consists from SKU and page.

0 votesVote for this answer Mark as a Correct answer

sridhar chiklametla answered on December 14, 2016 12:11

Hi Roman,

Thanks for your response, could you please suggest me the right way of implementation to insert list of products that i have into the kentico DB, without using customtables.

Note:- How can i insert products into the tables created by Page Types using API's. It would be helpful if you can provide us with an example.

0 votesVote for this answer Mark as a Correct answer

Roman Hutnyk answered on December 14, 2016 13:04 (last edited on December 14, 2016 13:11)

There are Kentico API examples available @ https://docs.kentico.com/api9/.

In particular this is how you would create a page: https://docs.kentico.com/api9/content-management/pages#Pages-Creatingpagesinasite'scontenttree

You need to make you page type to be a product. You can configure this in Page Type settings -> E-Commerce tab.

Here is how you create a product (SKU): https://docs.kentico.com/api9/e-commerce/products#Products-Creatingaproduct

Last step would be assignment of a product to a page - set SKUID field for your page.

1 votesVote for this answer Mark as a Correct answer

sridhar chiklametla answered on December 14, 2016 15:44

Thanks Roman,

I went through the API's and they are helpful. I am planning to add my products into the eCommerce template given by Kentico. so, where can i find the code to call Kentico api's and add the products.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.