Running MVC 5 website without iis or visual studio - asp.net

I created a website using visual studio 2015 with MVC 5.
The website should run locally using local databse.
The problem is, I want to run this website as program, without need to install iis or visual studio to run it..
What can I do?

ASP.NET MVC is a website and not a program as such. It therefore requires IIS to run. You don't need Visual Studio however.
If you want a stand-alone executable, you need to use a different UI paradigm. Console, Winforms or Universal Windows App to name just three.

Your option is to migrate to dotnet Core which can host web application as a Windows service, or just a Console App. You dont need Visial Studio to host it at all.

Related

How can VS Code be configured to run and debug with IIS Express and ASP.NET core?

I have been able to run ASP.NET core applications with Visual Studio 2017. Visual Studio has the integration of IIS Express and ASP.NET core all setup and it works with F5.
I would like to get this same functionality in VS Code. I have found and tried the IIS extensions for VS code. They serve the files without launching the dotnet.exe process.
How can I configure my VS Code project to provide similar run/debug functionality as Visual Studio 2017?
There is an extension available in visual studio market place which can be used to configure and host web applications in IIS Express from VS Code.
Check it our here.
https://marketplace.visualstudio.com/items?itemName=warren-buckley.iis-express

Self-host WebForms project using Visual Studio Community for Mac

I'm working on my first ever .NET project. I'm using Visual Studio Community for Mac and I'm required to use a WebForms project.
I created the project using VS, the basic template, but I have no idea how to run it locally to get it to load in a browser.
Apparently most of the WebServer solutions (like Kestrel) require a Windows environment with IIS.
What are my options on the Mac?
To be clear, I'm constrained to use .NET with WebForms, I can't go with MVC for this project.

How to run ASP.NET MVC app using MSBuild command line

How do I compile and run an ASP.NET MVC app using nothing other than the MSBuild command line? My Visual Studio is super slow and I just want to be able to run an app quickly for bugfixes and showcasing etc. Is this possible? What's the command line for it?
MSBuild is for building your application. If you want to run your app outside of Visual Studio, you need a web server for it. I'd recommend you to publish your app on local IIS. Just point your IIS website to your Web project folder. After that you will be able to access your application from the browser without running it from Visual Studio.
You can build your project from command line. Use msbuild.exe utility for it:
msbuild.exe projectname
You can find it in one of your .NET Framework folders (I recommend you to use the latest one):
C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.Net\Framework\v3.5\MSBuild.exe
C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v3.5\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe
When IIS is set up, you can build your app and see changes in your browser. Visual Studio is not necessary at this point.
Instead of IIS you can use IIS Express. Here is an article of how to run application on IIS Express from command line.

ASP.NET MVC 6 using IIS to develop without publish

Is there any way to develop an ASP.NET MVC 6 beta 8 application on IIS without having the need to publish the application?
After install the httpPlatform module I am able to point IIS to a published application.
But how can yo point IIS to say your visual studio solution wwwroot so you can develop and see the changes you make without having the need to publish?
Is this no longer possible like how it you could develop asp.net MVC 5 apps?
For development is IIS Express and Kestrel the preferred way now?
Update:
I've tried to run both commands like the vs.net debugger shows but I still get bad gateway
You should read this.
I am currently using Visual Studio 2015 for developing MVC 6 (beta8) applications, and do not have the problem you describe. An MVC 6 application has a file that by default points to wwwroot folder (I do not remember now the filename), so you should not have problem in change code and hit F5 to see the changes, without publishing.
For anyone that is interested to get this working so that you have an edit and continue experience and don't have to manually build or publish your site and work against your source code:
https://github.com/tuespetre/dnx-watch-iis

How to publish and run dnx-clr-x64 (ASP.NET 5) MVC site on shared hosting and on IIS 8.5 localhost

I would like to be able to run my published site on my arvixe shared hosting (if it's possible now, as it's only beta4 now), and on my dev machine's IIS 8.5.
It's a dnx-clr-x64.1.0.0-beta4 ASP.NET 5 project. (dnx451) I'm thinking of using the full .NET, not the Core. It would be also nice, NOT to publish the source code.
I'm using Visual Studio Community 2015 RC.
Can it be done, and can it be done from VS, without console commands?
Thanks.

Resources