Lance Ahlberg's WebLog

Reflection on reason

Getting NunitAsp LinkButtonTester working with ASP.NET 2.0 (Whidbey Alpha Community Edition)

I have recently been investigating a exception raised when I call the click method of the LinkButtonTester within NunitASP.

This wasn working fine with ASP.NET 1.1 but is now broken with ASP.NET 2.0.

I debugged the operation of Nunit to see what was causing the exception and used a simple scenario with a aspx page with a link button.

It turns out that the server was not emitting the __EVENTTARGET and __EVENTARGUMENT fields or the __doPostBack script, even though the anchor was still referencing the script.

When I call the page via Internet Explorer, the page was emitting correctly.

I can only assume that ASP.NET 2.0 is expecting something in the HTTP Request that NunitAsp is not currently providing.

Does anyone have an ideas on this?

 

Comments

AndrewSeven said:

I think that NUnitAsp gets treated as a downlevel browser; give the page a try with an old Netscrape browser and see if it has wierdness.
# May 6, 2004 9:56 AM

Lance Ahlberg said:

Thanks for the hint Andrew.

I did a bit more investigating and it looks like it is specific to calling the page via HttpWebRequest.
# May 7, 2004 12:22 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)