How to run ASP.NET MVC project without IIS on pc? - c#

I have developed an ASP.NET MVC web project. I want to run my web project without IIS.
How to do this? I do not have a server computer.

You can use IIS even though you do not have server computer, you can run it on your computer IIS. Windows comes with IIS feature, you just need to enable it. You can refer to this document about how to enable IIS of your windows computer.
If you do not want to use IIS although you can enable IIS of windows, the post provided by M. Mohabbati is a solution which you can refer to.

Related

MVC Authentication not working in IIS (works in IIS Express)

I have created an MVC project with individual authentication and am using the default template. When I launch the application from within visual studios (IIS express) I am able to view all the public pages, register an account, and login. Everything works great.
However, When I publish the project and host it on a full IIS server (on Windows Server 2016) I can view all the public pages, but registering or trying to sign in yields the following generic error:
I am using the LocalDb for the project and I noticed that the windows Identity on the deployed applicaiotn is "NT AUTHORITY\SYSTEM" while the IIS Express application's is USER-DESKTOP\User. Is this error being caused by a permissions issue and if so how do you fix this?
Also, is it bad to use localDB for a deployed project? There will only be two users using the application and they are both trusted.
It is totally not good idea to use localDB for a deployed project,
it is meant for developer testing only.
when you start debugging in vs the localDB is started.
its better if you use SQL Express
https://go.microsoft.com/fwlink/?linkid=866658
Try to set your site application pool identity to the local system by following the below steps:
1)Open iis manager
2)Go to the application pool and select your application pool name.
3)Click on the advance setting.
4)There is a "Process Model" option, under which there is an "Identity" option. This is by default the application pool identity. Change it to Local System, and you're done.
Set “Load User Profile” to True.

Deploy ASP.NET MVC App on IIS Express or an other WebServer?

Is there any possibility deploying and runing an ASP.NET MVC 5 App locally on an IIS Express or on an other WebServer without establish the normal IIS?
The following link describes the necessary steps hosting an ASP.NET MVC project with IIS Express:
Running a Site using IIS Express from the Command Line
Referer the following links, might be helpfull. :)
Deploying to iis
Test mvc in iis

publish .net mvc to a remote windows server

I am facing a problem publishing an mvc webapi to a remote server. Currently i have deployed the website to the server and am I able to run the site in the windows server browser as a localhost however when i try to access it over the internet thought the public ip address i get a 404 error of file not found.
The port is open. i'm using iis 7.0 and windows server 2008.
I have checked all the bindings to the port! I tried to check if mvc is installed and all I read says that mvc comes already with iis 7 and webplatform installer says that .net 4.5.1 is installed
Any ideas how to solve this?
Just some simple ideas of how to resolve it. Hope they are usefull.
a) Check the app pool of the application. Set it to the correct .NET framework if required.
b) A very simple test I perform to see if its the app or the url.
- Stop the app.
- Place your app in a folder temporarily.
- Place a simple index.html HTML file where your app should be.
- Browse to it and see if 404 shows.
c) if its a new box and not set correctly you might need to set up IIS for Application Development. Check this Link with regards to setting it up. Expand the tree to make sure you select what you need.

Host ASP.NET MVC4 website in windows without VisualStudio or IIS installed in it

I have ASP.NET MVC4 published as a file system. I need to host it in a fresh windows machine which does not have either VisualStudio and IIS installed in it;
Ways I analysed:
Using WebDev.WebServer, it can be done; Link
Question:
1) Does WebDev.WebServer gets installed along with a VisualStudio installation?
2) If not , please tell how can I install WebDev.WebServer as a standalone application in a windows machine,
Note:
Based on the answer in this discussion, I tried, but couldn't succeed. Reason is I couldn't find gacutil.exe in a fresh windows 8 machine which doesn't have VS / IIS installed in it.
WebDev.WebServer is kind of superseded by IIS Express now, which is documented, much more configurable, supports IIS extensions and other stuff. You can say it's pretty portable and does not require privileged account (for the most part).
Introduction blog post, IIS Express Readme
I'd suggest trying IIS Express instead of WebDev.WebServer.

How to run ASP.NET C# web application locally?

For a web application I am using ASP.NET C# (OS- Windows7, .NET 4) and the task has done. But I don't know how to run it locally in Windows7 as well as in Server 2008(.NET 4 and IIS installed in server 2008). And I have to run it in both the platfrom. So any help please. Thanks a lot.
If you have IIS 7 installed on your Win 7 machine, then:
Open you project in VS.NET
Right click on your project's node in solution explorer and choose "Properties"
Switch to the "Web" tab.
Select the radio "Use Local IIS web server"
Click the "Create Virtual Directory" button
That takes care of getting your application to run using IIS. You can also develop/debug ASP.NET applications like this.
As regards, deploying your ASP.NET application, after making sure all pre-requisites are installed. You'll need to use IIS Manager to create a website and associate that website to an application pool.
At first you need .NET 4 Framework on the local computer and you have to add the IIS functionality from Windows 7 corresponding add/remove software (activate functions). I presume you have Windows 7 Pro, because the home / basic edition aren't supporting server / development task like those.
If this tasks already is done, i think you just have to put your files into the iis (standard) inetpub folder (c:\inetpub\wwwroot). You can configure IIS in Windows 7 on mostly the same way as in Windows Server 2008.
Because it appears that you aren't a user of Visual Studio I would also recommend trying Visual Web Developer Express or WebMatrix. Both of those ships with an internal webserver that starts/stops themself while debugging the web application.

Categories