2

I have a problem with web service testing. I generated a test method for a web service class, added a default.aspx to web service, changed attribute to

[UrlToTest("http://localhost:54785/Default.aspx")]

, added

 <location path="VSEnterpriseHelper.axd">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

to web service config file, checked in IIS http handlers for both default web site and my web service to have a definition for axd-isapi-2.0 and axd-isapi-2.0-64(path = *.axd). Yet, when I run the ms test, I get

The test adapter 'WebHostAdapter' threw an exception while running test 'TestMethod'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:52415/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error.
...

I have also tried changing UrlToTest to IIS mapping of default.aspx from web service.

Could you give me some ideas?

Thank you

2
  • Looks like it works if I create a new solution with tests. I also mocked httpcontext based on this article it.tmod.pl/Blog/EntryId/198/Mock-HttpContext.aspx
    – gapo
    Jun 4, 2010 at 12:34
  • 2
    Where did you find the steps you listed in the question to help alleviate the VSEnterpriseHelper.axd error? (i.e.: adding a UrlToTest attribute and a "location" entry in the web.config? I'm chasing down the same error and this info looks to be more than what I've found so far. Thanks!
    – kdawg
    Mar 7, 2011 at 15:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.