Web Application Unit Testing Problem

I was using Visual Studio 2008 Team System and testing my ASP.NET web application project via Microsoft testing framework that is integrated to VSTS 2008.

Unit testing worked well when I did not specify a custom tag in my web application project.

Nonetheless, when I define a custom appsettings tag from my web.config file, I get the following error;
"The test adapter 'WebHostAdapter' threw an exception while running test 'DefaultTest'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:1231/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."

I solved the issue via using web application's setting property.
In order to use the setting property;

1. Right click on the project from "Solution Explorer".
2. Select "Properties".
3. Go to the "Settings" tab.
4. Create the default settings file if not created before.
5. Specify your application wide variables here.

That's it.

Read "http://msdn.microsoft.com/en-us/library/bc6ws923.aspx" in order to know how to access your settings.


Anonymous said…
Well sacoskun...you really helped me out....I run into the identical problem while I was working on my VS 2008 and have spent more time than I ever intended on trying to solve the problem..and then I run into your post...so for what it's worth you really pulled me through...thx
sacoskun said…
Thanks Eric, it is great to hear that my post helped you. Happy coding...

Popular posts from this blog

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)

Is Wharton Business Foundations Specialization Good?

Sending Large Data with JSON