I'm using the following:
Windows 10 64 Bit
Visual Studio 2019 Community (16.3.3)
Create New Project
ASP.NET Core Web Application
.NET Core / ASP.NET Core 3.0
Select the Angular template
Create
From package.json in the ClientApp folder, the Angular version is 8.0.0
Rebuild
Wait
Start Without Debugging - works great!!!
Start Debugging - TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of 0 seconds. Check the log output for error information.
Browser refresh does not solve anything.
I'll suggest you to use Visual Studio for back-end (ASP.NET Core) and VS Code for front-end (Angular) of Web Application.
You can open the Angular front-end app folder in VS Code after
creating the project in Visual Studio with Angular template.
Install angular-cli globally and other required packages from VS
Code Terminal.
Install the desired Angular extensions for better development
experience.
Configure Debugging in VS Code for your default Browser.
Related
I am running local IIS, and using vs.net 2019 to build web application. All is up and running when I debug-run.
The question/problem quite simply: when I want to modify the cshtml or the enclosed javascript right now I need to restart the web application pushing F5 again. Is there a way I can modify the js/cshtml and just refresh the browser? (this was the workflow I used with .net framework)
You can use 'dotnet watch'. Open Package manager console and navigate to your project folder. Then run 'dotnet watch run'. you can go to browser and visit localhost:5000 (port depends on your configuration) than you will see the app is running. When you change something on cshtml or js file, refreshing the page will reflect the changes to page.
I have an MVC Web API 2 application that I am running quite successfully locally within Visual Studio 2015 RC. I have also successfully published this application to an IIS 8.5 instance running on Windows Server 2012. I have installed .NET Framework 4.6 on this machine also.
The behaviour that I am getting when I try to navigate to the root of the site (http://localhost:81) is that I get a directory listing of the files in the root folder. Clearly I was expecting the routing config of the application to kick in an execute the home controller, but this is not happening.
I am a developer and it has been some time since I configured IIS, but I do remember that I had to do some fiddling with IIS (6?) to get the routing to work.
What am I missing?
Make sure your application pool is running in integrated mode and not classic.
Ever since we found dotLess stopped working for us our ASP.NET MVC project has been using BundleTransformer for our LESS bundling and minification. We are trying to migrate our CI build agents to use Windows Server Core (headless) and away from Windows Server Standard. When we did this we started receiving Internal Server Errors when trying to hit our pages. This seems to be blowing up inside of BundleTransformer.
We initially were using BundleTransformer with http://www.nuget.org/packages/JavaScriptEngineSwitcher.Msie
From reading this post I thought maybe it was that we were missing the dependency on Internet Explorer.
http://bundletransformer.codeplex.com/discussions/454495
I tried to use the v8 engine switcher and started getting server errors on my Windows Standard setup.
http://www.nuget.org/packages/JavaScriptEngineSwitcher.V8
Has anyone successfully managed to get BundleTransformer working on a Windows Server Core environment? Anything would help. Thank you.
You have installed the Visual C++ Redistributable for Visual Studio 2012 before you install the JavaScriptEngineSwitcher.V8 package?
Give an example of the error message.
I have moved my asp.net mvc web application to our staging server and I have deploy it to IIS using visual Studio, as our staging server already contain Visual Studio .i did this bu right-click on my project and click on Publish. currently I need to move the asp.net mvc web application to production server and deploy it on IIS, but I have a couple of questions:-
Should I install visual studio inside my production server. Or it is better to avoid doing so ?
Is there a way to deploy my asp.net mvc directly to IIS , without uisng visual Studio ?
Thanks
Should I install visual studio inside my production server. Or it is better to avoid doing so ?
While you technically could, you shouldn't. There's no reason why you'd like to install visual studio on your production server since you'd only use VS to debug existing projects, however, your website should not be running in Debug Mode and it is a waste of resources to run a production website in Debug Mode. You should have your website pre-compiled and deployed in Release Mode. That said, an installation of VS will serve no purpose on a production server
Is there a way to deploy my asp.net mvc directly to IIS , without uisng visual Studio ?
Definitely, you can publish your pre-compiled website to a location in your hard-drive or even to a remote location and then manually copy the website files to your production server. That is the hard way. But, if you have Build management tool such as TeamCity integrated with source control system...then this task becomes even simpler since you can even publish projects automatically
1.bad idea. production server should have only your app code + advanced log system(nlog, etc) . nothing else.
2.
options:
xcopy deployment Compile your asp.net application and copy all the files to your server. You can do this by using FTP or shared directories. (Or anything else to transfer files.)
WebDeploy You have the possibility to deploy your asp.net webpage directly form your Visual Studio. If you go to "Build" and you choose "Publish Web". To be able to to do this you have to configure your server before. But this works automatically after you have set up everything. It's very handy since your deployment becomes easy to rebuild. http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx
Web Setup - Installer Visual Studio provide also the option to build an installer. This works like installing usual software on your windows computer with the installer wizard. (See the link) http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Manage multiple server There is also a way of managing the deployment of multiple servers. It seems to be a bit more complicated but could be interesting for professionals. (Check out on Google Microsoft Web Farm Framework 2.0
from here : Types of deployment in asp.net
Should I install visual studio inside my production server. Or it is
better to avoid doing so ?
Do not install VS on production servers. It is a bad practise.
Is there a way to deploy my asp.net mvc directly to IIS , without
uisng visual Studio ?
You can use your local Visual Studio to publish bits to remote IIS -
Automated Web Deploy using Visual Studio
Alternatively you can have new deployment strategies like let Team Foundation Server (TFS) deploy to IIS
One more option to is to FTP into Remote Web Server and push the latest bits from client side itself. I mean to ay, publish your site locally onto your file system. Then FTP into remote site using any FTP client like FileZilla. Then push the bits. For this to work, you need to configure remote server for FTP.
i am building an Asp.NET MVC web site, and i want to make the deployment to IIS automatically as part of the build process, as indicated in the title, i am using vs2010 beta2 with tfs2010 beta2, and the dev server is running widows server 2008 service pack2, wich means IIS 7.
so can anyone provide with set-by-step way on how to do that, thanks
This doesn't cover anything specific for TFS, but it's a good start at setting up Web Deploy:
http://www.hanselman.com/blog/WebDeploymentMadeAwesomeIfYoureUsingXCopyYoureDoingItWrong.aspx