Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hii there!!! i am confused in this topic as i want to add mvc and web api to my existing .net project which has umbraco installed in it. As at the time of installing umbraco i didnt selected the mvc and web api folders from below figure so it wont have folder and references associated with both in my project.
now how can i install both of them into my umbraco installed .net web application project??
i searched this and gone through solutions of installing it through nutget package but when installed mvc package it does not show the reference folders associated with it like App-start and global.asax.cs etc..
Hi there, why you would like to install MVC and Web API additionally? It's already included in the Umbraco app.
You can always add App_Start folder directly from VS.
Actually i want to add web api into my site and for that i have to make changes in many file one of that is in webapiconfig , global.aspx.cs, etc but how can i add it when i dont have those file loaded up as i have used empty template at time of installation, so some of the folders and files will not be created which gets created when we tick both mvc & web api in the new project creation window as i shown above figure.
can you please tell me how to add those folders which are associated with MVC and web api packages. as i dont see any way to add it in visual studio.
You can right-click on the project (just above the "References" tree node) to add a new Folder or item. Pawel is right - the Web API config file would usually sit within a folder called "App_Start" along with routing and start-up configuration. You already have a Global.asax file in the root of your project.
However - Umbraco allows you to create controllers that inherit UmbracoApiController (read more about it here: https://our.umbraco.com/documentation/reference/routing/webapi/) which will open endpoints on /umbraco/api/ (although this can be route can be customised).
I wouldn't get too stressed about not selecting the correct templates during the project set-up: sometimes it's harder sorting through and customising the provided patterns than it is just building your own :)
Hope that helps a little.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted