Testing web services

Discussion in 'ASP .Net Web Services' started by Alex, Aug 14, 2009.

  1. Alex

    Alex Guest

    I have a C# web service that I'd like to test in VS2008. I added a test
    project to the solution and it created the following attributes for each test
    method:
    [TestMethod()]
    [HostType("ASP.NET")]

    [AspNetDevelopmentServerHost("%PathToWebRoot%\\ADPDS.eBaseWS\\ADPDS.eBaseWS",
    "/")]
    [UrlToTest("http://localhost:1828/")]

    But when I run the test, I get the following error:

    The Web request 'http://localhost:1828/' completed successfully without
    running the test. This can occur when configuring the Web application for
    testing fails (an ASP.NET server error occurs when processing the request),
    or when no ASP.NET page is executed (the URL may point to an HTML page, a Web
    service, or a directory listing). Running tests in ASP.NET requires the URL
    to resolve to an ASP.NET page and for the page to execute properly up to the
    Load event. The response from the request is stored in the file
    'WebRequestResponse_UserExistsTest.html' with the test results; typically
    this file can be opened with a Web browser to view its contents.

    I tried changing the attributes to:
    //[HostType("ASP.NET")]
    [AspNetDevelopmentServer("SecurityWS",
    "http://localhost:1828/Security.asmx","http://localhost:1828")]
    [UrlToTest("http://localhost:1828/Security.asmx")]

    But I get the same error. What am I missing?
    Thanks
    Alex, Aug 14, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick
    Replies:
    1
    Views:
    6,103
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  2. Anup
    Replies:
    1
    Views:
    2,766
    Mark Rae
    May 9, 2006
  3. John
    Replies:
    4
    Views:
    416
  4. Lucas Winstanley
    Replies:
    1
    Views:
    489
    Roger Pack
    Jan 8, 2009
  5. Alex Stahl
    Replies:
    3
    Views:
    143
    Josh Cheek
    Sep 9, 2010
Loading...

Share This Page