IIS 7.5 only allows one user to view web site
I have a web site developed in VS2010 Framework 4.0 published to a Windows 2008 R2 server running IIS 7.5 (As a bit of side info - I have a copy of the same site (apart, obviously, from the Framework) developed in VS2005 Framework 2.0 published on a Windows 2003 server that works perfectly.)
When I publish the Framework 4.0 site to the Windows 2008 server, it only works for the first person that tries to access the site. E.g. I publish it to the server, and then access the site from my PC using IE. Someone at the desk next to me tries to access the site and nothing happens - the browser progress bar just chuggs along going nowhere - no errors, no errors on the server, nothing. If I log out and the person at the desk next to me accesses the site - it works fine. If I then try to access it - the browser just hangs and goes nowhere. So, only one person is allowed to use this web site! (It's on an intranet). If, while someone is using the site, I go into IIS and browse the site - it connects perfectly.
The site has a global.asax which calls a stored procedure to do some log ins and sets 5 session variables.
Any ideas please. It's driving me nuts and has caused me to go back to VS2005 and Framework 2.0
** Added code from comment below**
string CurrUser = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString().Replace("\\", "/");
CPDataAccess.DataAccess da = new CPDataAccess.DataAccess();
System.Data.DataView dvGetUser开发者_如何转开发CurrWP;
dvGetUserCurrWP = da.GetUserCurrWP(CurrUser);
int somerows = dvGetUserCurrWP.Count;
Check the connection and bandwidth limits under the performance tab.
EDIT
Since the DataView inherits from MarshallByValueComponent, which implements IDisposable, try adding a using statement for your datacall:
using (System.Data.Dataview dvGetUserCurrWP = da.GetUserCurrWP(CurrUser))
{
int somerows = dvGetUserCurrWP.Count;
if (somerows)
{
//logic
}
}
精彩评论