0

I have created a .net class library that is used to create reports from any of our projects. The situation is that I reference the class library dll in my asp.net mvc project. Than when a button is clicked I call a shared method within the class library as follows (PO is the namespace of my class library):

PO.GenerateReport(Parameter1, Parameter2, Parameter3, Parameter4, Parameter5, Parameter6, Parameter7)

This works great if one user is calling, as soon as more than one user tries to concurrently call PO.GenerateReport I start getting problems.

I would think each user instance would spin up their own instance of the PO class library but this isnt the case. Any ideas on how I can adapt this to the situation? Or am I totally wrong on how the class library is referenced or setup?

Thanks in advance

1 Answer 1

1

It looks like you've made the function static, which means no instance of the class is actually created. If you want it to be unique per user, you have to make the method non-static.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.