Hi, I am encountering NullReferenceException and other exceptions when making calls Membership and Role provider functions in a .Net MVC Web application using SQL Anywhere. Most often I am seeing the errors when calling the Roles.IsUserInRole() function however I have also seen them when calling other functions such as Membership.ValidateUser(). The errors are only occurring when the web application is being used by multiple users (i.e. it is under load) The errors are ultimately causing the IIS worker process to hang, rendering the web application unresponsive until such time as it is manually reset. I am using SQL Anywhere 22.214.171.12413 however I have also produced the problem with SA-126.96.36.19952 and SA-188.8.131.523 Developer Edition which I downloaded a couple of days ago.
I have been able to reproduce the problem in a test environment using a simple web application and load testing software. The steps I have taken to produce the issue are: * Create a new MVC3 Web application in VS 2010 * Include a reference to iAnywhere.Web.Security * Add Connection string and membership/role provider details to web.config * Add a Call to Roles.IsUserInRole(String username, String roleName) to the existing sample pages * Deploy the application and place it under load of at least 2 concurrent users. (I am using Fiddler with the StresStimulus plugin for load testing)
Here is a typical stack trace for the errors that I am seeing:
While the NullReferenceException is most common, I have also seen AccessViolationException, SAException (0x80004005): Connection was terminated and others, all with similar stack traces.
Can anyone tell me why these errors are occurring and how I can avoid them?
This sounds like a job for the technical support team. Have you considered contacting them?
answered 09 Mar '15, 10:26