Testing web services

A

Alex

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top