I’m trying to configure the IIS 7 SMTP settings for .NET 4 web applications, so all sites use the same host. I’ve configured the host for the server inside the IIS manager, but this is only picked up by .NET 2 web apps.
.NET 4.0 applications don’t pickup the host.
Is there a way to specify a machine-wide SMTP setting for .NET 4? The server is x64.
I discovered the answer: you need to add the
<system.net>section to your machine.config file, for the framework, e.g.IIS7 stores its SMTP settings in the metabase.xml file still, however you can configure it for a framework via the machine.config as that takes precedence.
You just need to remember that if you’re on 64 bit server, the path is