Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Mail setting error

Mail setting error

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestionworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VijayVishwakarma
    wrote on last edited by
    #1

    hi, I have added my mail setting in web.config which I m trying to read using following code. Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/web.config"); MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings/smtp") as MailSettingsSectionGroup; I m getting following error. The parameter 'sectionGroupName' is invalid. Parameter name: sectionGroupName Any suggestion where it is wrong? Regards

    Vijay V. Yash Softech

    S 1 Reply Last reply
    0
    • V VijayVishwakarma

      hi, I have added my mail setting in web.config which I m trying to read using following code. Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/web.config"); MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings/smtp") as MailSettingsSectionGroup; I m getting following error. The parameter 'sectionGroupName' is invalid. Parameter name: sectionGroupName Any suggestion where it is wrong? Regards

      Vijay V. Yash Softech

      S Offline
      S Offline
      sumit7034
      wrote on last edited by
      #2

      try this onfiguration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/web.config"); MailSettingsSectionGroup mailSettings = (MailSettingsSectionGroup)configurationFile.GetSectionGroup("system.net/mailSettings/smtp")

      V 1 Reply Last reply
      0
      • S sumit7034

        try this onfiguration configurationFile = WebConfigurationManager.OpenWebConfiguration("~/web.config"); MailSettingsSectionGroup mailSettings = (MailSettingsSectionGroup)configurationFile.GetSectionGroup("system.net/mailSettings/smtp")

        V Offline
        V Offline
        VijayVishwakarma
        wrote on last edited by
        #3

        Not working. Any suggestion? Regards

        Vijay V. Yash Softech

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups