Click here to Skip to main content
15,910,886 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hai friends,
can any one provide step by step process for unit test in asp.net.
i have created a sample web application with a simple function for unit test..
but it displaying error like



The test adapter 'WebHostAdapter' threw an exception while running test 'Button1_ClickTest'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:1832/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.
Posted
Updated 22-Feb-12 17:05pm
v2

1 solution

Put this in your web.config:
<customerrors defaultredirect="Error.aspx" mode="Off" />

Error 500 is too generic to diagnose.

Once you do that, it will give you the precise locatoion that is causing your site to misbehave, and from that point, you can probably identify the problem and fix it.

From the looks of it though, it seems that wResp might be null, or the returned value from wResp.GetResponseStream might be null. Putting a try/catch block around the code would be a good idea...

try these links will be helpful to you:-

http://stackoverflow.com/questions/260432/500-error-running-visual-studio-asp-net-unit-test[^]

http://forums.asp.net/t/1411782.aspx/1[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900