Start IIS Express without debugger - visual-studio-2012

For performance reasons I'd like to start the IIS Express Webserver without debugging. Settings the 'compilation debug="false"' parameter in the web.config solves the issue but every time I start debugging my application, Visual Studio displays an error, saying that the debugger could not be attached. If I disable the Web Project's "Always start in debug" I won't get this error but, of course, IIS Express won't start.

Related

how to run asp.net core develop file in iis server

I have a aspnetcore webapi application,i want run it in iis(not vs iis),and dont publish the app,just in use the develop file like:
app develop file
because i dont want publish my app into iis every time I change code
I don't want to see the swagger page only I start vs
I set the iis site path to app develop folder but I get the error code:403.14
error page
Check this article
There should be very few reasons for you to run IIS during
development. Yes, in the past there were very good reasons to run full
IIS because there were always a number of things that behaved very
differently in full IIS compared to IIS Express.
However, with ASP.NET
Core there's little to no reason to be running full IIS during
development.
You could use dotnet-cli to run your api
You cannot fight the fight that is doomed to fail,
https://blog.lextudio.com/how-visual-studio-launches-iis-express-to-debug-asp-net-core-apps-d7fd3677e3c3
Visual Studio uses a trick, which I documented with full detail in the blog post, to run ASP.NET Core apps on IIS/IIS Express. So you only options are,
Use Visual Studio.
Publish the app and then run it on IIS.
There is no obvious third option.

Visual Studio Code - Debugging a spawned process

The project setup, is a basic express application, generated with express-generator.
The project, vscode-debugging-node is available at GitHub
Please refer the screencast at Visual studio Code - Debugging node application
The Gruntfile.js in root of the project, manages the dev process. The purpose of the Gruntfile.js is simple, it starts the server and watches for any file changes.
On detecting changes in the desired file(s), it restarts the server (kills the existing process and starts a new one).
The Gruntfile.js uses ./task/server.js to start/restart the server.
The Gruntfile.js is developed in this manner, that later on, it will incorporate cookie management, in order to provide a logged in experience.
While executing the $ grunt start task, if a env variable named NODE_INSPECTOR=* is passed, the server is started in --debug mode.
When the grunt task is executed in --debug mode, along with node-inspector running in parallel, I can use Chrome to debug the complete application.
With reference to Debugging in Visual Studio Code, I tried to achieve the same by updating the .settings/launch.json, with "program": "/usr/local/bin/grunt", "args": ["start"] and "env": {"NODE_INSPECTOR":"*"}.
I could find that debugger is attached only till ./task/server.js but on the whole application. I doubt, it may be due to the spawned server.
Is this possible to debug such situation in visual studio code? If yes, it will be of great help to know the details.
Your doubts are correct, you are configuring Visual Studio Code to attach to the grunt task starting the server, not the server itself.
You have two options to order to debug this:
Execute NODE_INSPECTOR=* grunt start form the terminal.
Once the server has started, attach the the running server to the Debugger, using the same Attach configuration available in launch.json. In the Debugger view choose the Attach from the profile dropdown and start the Debugger (green ► play button).
UPDATE --
Sarbbotam recorded a screencast for successfully attaching to his node.js app, you can find it here Visual studio Code - Attaching a Node App to Debugger
Configure VSCode to run the server directly, for that you won't have the grunt task listening to the changes and restarting the server. In order to do that change the program option to "bin/www"

Default MVC5 Application will not run out of debug mode in browser VS Express 2013

I have just started to develop an application in Visual Studio 2013 using MVC5. I am using the default MVC application, I have made no changes. I find that running the application works fine while in debug mode however if I Stop Debugging Shift F5 and change from on page to another or refresh my application in the browser I find that the connection to the localhost server is disconnected. I get a message Firefox can't establish a connection to the server at localhost: I have tested another application developed in Visual Studio 2012 and now running on VS2013 and it runs as expected out of debug mode. Has anybody else come across this problem. What am I doing incorrectly?
Do you have Edit and Continue enabled? (This can be found under your projects Properties -> Web, at the bottom.
When you have Edit and Continue enabled, the VS debugger attaches invasively to the web server process (IIS Express). When you stop the debugger, this kills the IIS Express process as well. If E&C is turned off, the debugger does not use an invasive attach, which lets the debugger stop without killing the attached process.

VS2012 IIS Express Option Disabled

I have just installed VS2012 and created a MVC project. I right clicked on project and selected property, I chose Web tab. I selected "Use Local IIS Web server" but the "Use IIS Express" checkbox is disabled.
I checked my C:\Program Files (x86)\IIS Express\ folder and IIS Express 8 is there.
Any particular reason?
If I fall back to use Visual Studio Development Server, I have 50% of the chance to see "Server Too Busy" message.
All you have to do is to activate IIS in your development machine:
Start -> Control Panel -> Enable or disable Windows features -> Internet Services
Then check mark in World Wide Web Services -> Common HTTP Features
And check mark in World Wide Web Services -> Application development Features
That's all you need.
Using Full IIS has some benefits. One is that it is always running, so you don't have to start your VStudio Project to unit test. Another is that you can create an actual site and configure IIS mirroring production, using the same Admin Tools, which makes it easier to support when deployed in an environment. And, I seem to recall that IISExpress had issues with Application Routing. On the flip side, I don't see an issue with using the Full IIS. Granted, IISExpress is much better than Cassini, but if there is no reason to not use Full IIS then I conitnue to advocate it's use.

IIS 7.5 settings

I have a site and, when I start from Visual Studio, fiddler says main page takes 2 seconds to load( with setting use local IIS server). When I start from IIS (browse same page), fiddler says 16 seconds.
Any idea what I should be looking for (every time before loading page I close all webdev processes and I hit IIS reset)?
Thank you
I would definitely avoid using timings when starting the site from Visual Studio, you should prefer to use timings from browsing to the site independently of Visual Studio.
Also, make sure you're timing against a Release build and make sure that <compilation debug="false"> is set in your web.config. Finally, make sure you haven't accidentally still got Visual Studio running or have VS "Attach to process".
The ideal scenario would be to test against a machine that that closely matches exactly what your production environment is like.

Resources