Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 259339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:15:21+00:00 2026-05-11T22:15:21+00:00

I just wrote some new utility methods within a non-page class for an existing

  • 0

I just wrote some new utility methods within a non-page class for an existing .NET webforms application and decided to try to unit test using the VS unit test framework rather than testing by hand. I’ve used the unit test tools before, but only on EXE and MVC projects, and am encountering an error connecting to the WebHostAdapter no matter what I’ve tried so far.

The current test:

    [TestMethod()]
    [HostType("ASP.NET")]
    [AspNetDevelopmentServerHost("C:\\inetpub\\wwwroot\\sitepath", "/")]
    [UrlToTest("localhost/Login.aspx")]
    public void UrlFriendlyTitleTest()
    {
        string dirtyPath = "São\\Hell & High water";
        string expected = "sao/hell-high-water";
        string actual;
        actual = GeneralUtility_Accessor.UrlFriendlyTitle(dirtyPath);
        Assert.AreEqual(expected, actual);
        Assert.Inconclusive("Verify the correctness of this test method.");
    }

The error I’m encountering:

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

What I’ve tried so far:

Set UrlToTest to current running debug path for a page in the project.
Promoted application to the local default site (reflected in current value of UrlToTest).
Set UrlToTest to point to an unauthenticated page (it shouldn’t matter which page is called–I’m testing a method that’s not even referenced yet).
Suggestions from MSDN boards (unable to post more than 1 link).
And I’ve tried the suggestions and web.config changes listed by the author of this SO question.

Is there a canonical answer for this issue that I’ve missed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:15:21+00:00Added an answer on May 11, 2026 at 10:15 pm

    Typically, I’ll have all of my non-page classes defined in a separate assembly (class library) that gets referenced from the web site. It’s much easier to unit test class libraries than it is to test web sites. My advice would be to move your GeneralUtility class into a class library and test it from there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 138k
  • Answers 138k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This question is based on a pre-existing assumption - that… May 12, 2026 at 7:37 am
  • Editorial Team
    Editorial Team added an answer istream& operator >> (istream& is, PersonId &p) { is >>… May 12, 2026 at 7:37 am
  • Editorial Team
    Editorial Team added an answer It would be easier if the parents (and children) had… May 12, 2026 at 7:37 am

Related Questions

I'm a mechanical engineering grad student and my adviser has just asked me to
As the title says, I need to write a small program to read data
I been wondering about this for a while. It seems like there are so
I wrote some sql scripts to create a database and store data. I just

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.