SmtpClient and app.config system.net configuration

前端 未结 2 1738
深忆病人
深忆病人 2021-02-14 05:29

I\'m having an issue with a .NET 3.5 library I\'m developing to send emails. I put the system.net configuration into app.config:



        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-14 06:18

    Make sure you add your configuration block (as shown above) to the {appName}.exe.config or web.config - the configuration for the class library is taken from one of those files at runtime, not from the app.config of the class library.

提交回复
热议问题