开发者

Getting error while sending mail?

when i am sending mail in my web application i am getting this erro.

I AM GETTING THIS ERROR. The element may only appear once in this section. (C:\Inetpub\vhosts\example.com\httpdocs\web.config line 64)

 <system.net>
    <mailSettings>
        <smtp>
            <network host="webmail.example.com" port="25" userName="info@example.com" password="as开发者_开发知识库df" defaultCredentials="false"/>
            <network host="webmail.yyy.com" port="25" userName="info@yyy.com" password="asdf12" defaultCredentials="false"/>
        </smtp>
    </mailSettings>
</system.net>


It looks like you have duplicated an element in your web.config file. If you have added something to the config to enable or help your email, then you have likely added the same entry twice by accident, or duplicated an entry that was already there to change its value.

Perhaps something like:

<appSettings>
    <add key="mailFromAddress" value="me@thing.com"/>
    <add key="mailFromAddress" value="me@thing.com"/>
</appSettings>


you might one to post what is line 64 of your web.config. Microsoft went to a lot of effort to help you debug your problem by giving you a line number. Might want to check it out.


examine your web.config @ line 64, then search for that element elsewhere in your web.config and delete it.

apparently the schema prohibits multiple network elements. remove one and see what happens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜