I am working on a project with Vs2010 and MVC4. (mainly Apicontrollers). Now the project is ready to deploy into production. The problem is that the client don't want to go with MVC4 even though there is a go-live license from Microsoft. The only new feature I used in this project from MVC4 is webAPI.
Can I use APIcontrollers in MVC3?
If yes How can I implement API controllers in MVC3 project?
What troubles will I face if I downgrade to MVC3 from webAPI standpoint (like :routing,hhtpconfiguration)
Yes
You can get web API with Nuget to you MVC3 project
Don't think you'll have any troubles, web API comes in separate dll that is independent of MVC dlls
Related
I have an old web forms application that uses membership provider. I want to use an existing .net core identity project instead of membership provider. Where and how can I configure it in my old web forms project? Does anyone know how to implement that in my old project?
I have a .NET Core 2.0 MVC web application that I am trying to get deployed properly through VSTS CI/CD Build and Release definitions. I understand that, by default, .NET Core 2.0 sets Razor View Precompilation to true, in order to precompile all of the Views into a DLL when publishing the application. When I build and publish locally through Visual Studio 2017, everything works fine. When I try to build and release to a web server through VSTS, though, the precompiled DLL for views is not being updated / copied to server.
Is there any solution or fix for this yet? I am seeing a lot of discussion about it online with some workarounds, but many of the posts I am seeing are about a year old or more. So I am wondering if anyone has figured this out yet?
The rest of my MVC deployment seems to be working fine. It is just the precompiled DLL for the Views is not being included in the release and therefore not being copied/overwritten on the server.
Refer to these steps below:
Create a new build definition
Choose ASP.NET Core build template
Modify tasks if needed
Then the necessary files are in the artifact folder (xxx\a).
Can anyone help me. I could not find a solution to enable visual studio mvc templates in a asp.net web site project(not a asp.net web application project). I know that in a asp.net web application project is possible, but for asp.net web site project i havent found a solution.
Can anyone help me.
Thanks a lot.
MVC is designed to be a Web Application. There are no Microsoft templates for an MVC 'Web site'. Overall IMHO the benefits of a website are not worth the features you lose.
Here is an article provided by MSDN that explains the different features of each : http://msdn.microsoft.com/en-us/library/dd547590(v=vs.110).aspx
To answer your question directly though. MVC asp.net must be a web application.
I have created a service-oriented MVC3 application in Visual Studio 2010. I have used layered architecture for my application. It has a separate project for WCF Services,and separate projects for BLL and DAL, and also one for Entities. Now I want to publish my MVC application on IIS 7.5. I have Windows 7 Home Premium, and I use SQL Server 2008 R2 for my database. How can I publish it in IIS 7.5?
Note: I have created library projects for Entities, BLL, and DAL and use MVC3 for web project and WCF Service Application for WCF services.
I already tried to publish it by using this tutorial, but when I run the application in a browser, it does not load my Javascript, jquery and CSS files, and it give Network error 404 file not found.
Use, #Url.Content("~/blah/blah") to convert the relative path to an application absolute path.
I am creating a new website that needs to work in desktop browsers as well on mobile devices. I am using VS2010, MS SQL 2008, IIS 7, EF4 and .NET 4.
I have several questions:
Which is better MVC or Web Form? (why)
Web App or Website?
Should I do it as 2 sites or combined?
on .net 4 you can use either, since webforms come with outing support. but, don't use .net controls. If you already know MVC go for MVC
Personally I prefer website. Easy to edit when you are away from vs. It compiles on run time anyway
Is you use MVC you can just plug-in another view to your current site with some device detection such as DeviceAtlas