I have a web app which processes files and writes the data to a database. This process can take up to 2 minutes. Let's say this is done on ProcessFile.aspx. I wanted to ensure data integrity so I wrapped all the database processing in a TransactionScope.
The problem occurs when I am processing a file and then try to access another page which also accesses the database (just reads some data via a select statement). I'm pretty sure it doesn't have to do with any kind of database locking as when I go directly through SQL Server Management Studio, I have no trouble selecting on a table.
I am using LinqToSQL. I have a ScriptManager on the master page. All pages inherit from this master page. ProcessFile.aspx has an UpdatePanel but the other page does not.
What am I missing here? If more info is needed, comment and I'll update the question.
EDIT 1: I get this exception message
Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source : .Net SqlClient Data Provider
I open the second page in a separate browser window. It simply keeps loading UNTIL the first page has finished processing the file and then loads normally.
I'm not making a call from one page to another. Simply opening another page through another browser window via the address bar.
EDIT 2: This is the first time that I've come across where more than one answer solved my problem. Both Remus's and Rick's answers in conjunction solved it for me. I didn't know who to choose as the correct answer so I flipped a coin and Rick won. Sorry, Remus! I didn't want to give it to nobody. However, I needed to implement BOTH answers for it to work.