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. WAP + NUnit + WebConfigurationManager

WAP + NUnit + WebConfigurationManager

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabase
1 Posts 1 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.
  • S Offline
    S Offline
    saini arun
    wrote on last edited by
    #1

    Hello, I just started using NUnit to write test cases for my asp.net web application project. Some of the code written to access database values fetches the ConnectionString from a "section" defined under "configSections" of web.config file. This works fine during the normal execution of the project on a web browser. But when I access the same method through the test case, WebConfigurationManager.GetSection(

    ) always return null. Initially I was also not able to access AppSettings section of web.config but it got solved when I copied the web.config file into the BIN folder. But still not able to fetch the "section" inside "ConfigSection". Kindly suggest.

    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