views:

20

answers:

0

I'm working with some legacy ASP.NET code.

The site uses a master page to include a custom login control on every page. The login is not for the site itself, rather it acts as a gateway to set of sites, depending on user identity. The login control does a cross page posting to a different web app for authentication and redirection. So ASP.NET injects a JavaScript snippet (WebForm_DoPostBackWithOptions) to redirect the user to the other web app when the login button is clicked. In the other web app, the input values are read from Request.Form, since it has no knowledge of the previous page or its type.

This works well in most cases, except on a page that has another submit button on it (to do something entirely unrelated). In this case, the user is redirected to the PostBackURL, but the authentication web app crashes violently before even reaching page load, producing the following stack trace:

[HttpException (0x80004005): '2�U�Yo��ۚ C�;p�5��P�?��' is not a valid virtual path.] System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +3626815 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +406

Clearly "something" happens that corrupts the request made to the authentication page.

Any help would be greatly appreciated!