I have weird situation: if I launch very slow report from IE and subsequently from another tab make more requests to the database through asp.net application - they time out as if report locked the entire db. Now if I launch report through firefox - it still is slow, but requests made through IE are fine. Same story if browsers are swapped - as if I can't launch report and use my app from the same browser. I use windows auth, sql server express, reporting services. Any clues to this weirdness would be appreciated.
Edit Reports are handled from the same IIS app as main application's, it's just some Report.aspx page. Also I've checked through profiler - no new requests to db arrive as long as report's request is active. Everything is on the same server
Edit1
Concurrent Requests and Session State
Access to ASP.NET session state is exclusive per session, which means that if two different users make concurrent requests, access to each separate session is granted concurrently. However, if two concurrent requests are made for the same session (by using the same SessionID value), the first request gets exclusive access to the session information. The second request executes only after the first request is finished. (The second session can also get access if the exclusive lock on the information is freed because the first request exceeds the lock time-out.) If the EnableSessionState value in the @ Page directive is set to ReadOnly, a request for the read-only session information does not result in an exclusive lock on the session data. However, read-only requests for session data might still have to wait for a lock set by a read-write request for session data to clear.
Edit2 Solved the problem by adding this to web.config
<appSettings>
<add key="ReportViewerServerConnection" value="AS.Web.Providers.ReportServerConnection, AS.Web.Common" />
<add key="MyReportServerUrl" value="http://reportserver/reportserver" />
<add key="MyReportViewerUser" value="user" />
<add key="MyReportViewerPassword" value="password" />
<add key="MyReportViewerDomain" value="domain" />-->
</appSettings>
Where user should be added in ssrs security settings (I've used my windows login). And ReportServerConnection is in separate library AS.Web.Common:
public sealed class ReportServerConnection : IReportServerConnection2
{
public WindowsIdentity ImpersonationUser
{
get
{
// Use the default Windows user. Credentials will be
// provided by the NetworkCredentials property.
return null;
}
}
public ICredentials NetworkCredentials
{
get
{
// Read the user information from the web.config file.
// By reading the information on demand instead of
// storing it, the credentials will not be stored in
// session, reducing the vulnerable surface area to the
// web.config file, which can be secured with an ACL.
// User name
string userName =
ConfigurationManager.AppSettings
["MyReportViewerUser"];
if (string.IsNullOrEmpty(userName))
throw new Exception(
"Missing user name from Web.config file");
// Password
string password =
ConfigurationManager.AppSettings
["MyReportViewerPassword"];
if (string.IsNullOrEmpty(password))
throw new Exception(
"Missing password from Web.config file");
// Domain
string domain =
ConfigurationManager.AppSettings
["MyReportViewerDomain"];
if (string.IsNullOrEmpty(domain))
throw new Exception(
"Missing domain from Web.config file");
return new NetworkCredential(userName, password, domain);
}
}
public bool GetFormsCredentials(out Cookie authCookie,
out string userName, out string password,
out string authority)
{
authCookie = null;
userName = null;
password = null;
authority = null;
// Not using form credentials
return false;
}
public Uri ReportServerUrl
{
get
{
string url =
ConfigurationManager.AppSettings[
"MyReportServerUrl"];
if (string.IsNullOrEmpty(url))
throw new Exception(
"Missing url from the Web.config file");
return new Uri(url);
}
}
public int Timeout
{
get
{
return 60000; // 60 seconds
}
}
public IEnumerable<Cookie> Cookies
{
get
{
// No custom cookies
return null;
}
}
public IEnumerable<string> Headers
{
get
{
// No custom headers
return null;
}
}
}
Similar post: here