How can I stop IISExpress from dumping every detail of every request into the Visual Studio Output window?

橙三吉。 提交于 2019-12-03 22:24:13

First off all, when you use code like

Trace.TraceInformation("My Custom Info Message.");

for tracing (not matter from what place - page, controller or some other class from separate .dll) and then run your application under IIS Express the MS VS Output window would show something like

iisexpress.exe Information: 0 : My Custom Info Message.

How could you recognize what messages is "yours" and what is "not yours"? Maybe you should add additional marker for each your messages? But as I could see the Output windows still does not support the message filtering by the custom tags or text, but it's support the text Search (Ctrl+F), so...

I had the same issue with IIS Express spamming to the output windows with messages like this

'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-130838650006648508): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

I had solved that by going to the MS VS (2013) main menu

-> DEBUG -> Options & Settings... -> Debugging -> Output Window

and turning Off unneeded output messages types

In App_Start\WebApiConfig.cs, remove config.EnableSystemDiagnosticsTracing();

Simple as that :facepalm:

Does adding this work?

<location path="YouSiteName">
    <system.webServer>
        <httpLogging dontLog="true" />
    </system.webServer>
</location>

Found at: http://forums.iis.net/post/1992357.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!