C# Form: HttpWebRequest Unrecognised confuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piercy
    New Member
    • Aug 2007
    • 77

    C# Form: HttpWebRequest Unrecognised confuration

    Hi, ive put to gether a function which sends some information to a website and also returns a value depending on the responce from that page. It works excellent in a new project and does exactly what i want.

    However, when i add it my existing project i get the error: "Unrecognis ed configuration section userSettings. this happen when it reaches this line.

    Code:
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create("www.mywevaddress.com/page + data);
    userSettings is a section in my app.config file which contains the location to the database. i can pull the database info from the app.config file fine so i dont think thats the problem. Possibly something is missing fromt he app.config? However, the other project i did to create the function doesnt have a app.config file?

    Anyone got any ideas on what the problem might be?

    Thansk in advance,
    Piercy
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    You are missing a quote?
    Code:
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create("www.mywevaddress.com/page + data);
    to

    Code:
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create("www.mywevaddress.com/page" + data);
    Although I suspect this is just an example and that the "data" value is something other entireley.

    Comment

    Working...