views:

881

answers:

1

We have an ASP.NET application written in Visual Studio 2003 (c#) using SQL Server 2000 as database. It’s an old web application that our clients have been using for 4+ years.

Now, we needed to upgrade the application to work on Windows Server 2008 using SQL Server 2008, both 64bit, both on the same machine. So we ported the application to Visual Studio 2008, made some needed modifications and successfully installed the application on Windows Server 2008 with database still being the old SQL Server 2000. Everything worked fine. But as soon as I modified the connection string to work with the new SQL Server 2008 64bit, it stopped working. Basically the web browser just shows – The webpage cannot be displayed; no error messages whatsoever.

I monitored the processess and event log - basically it seems that asp.net worker process is generating errors until it stops working. And I can’t figure out why. All should be fine on SQL Server 2008 side, all protocols enabled, even disabled firewall; i can connect to the instance using Management studio from the same server (64bit) and from other development machines (64bit/32bit).

Then i tried using the web application from my development machine (still Vistual Studio 2003 one, i.e. 32 bit with ASP.NET 1.1) and connect to the new SQL Server 2008 and i got „Server application unavailable“ error. Same thing happens, worker process is generating errors until it stops working.

I used IIS Diagnostic Tool to debug the moment the error occurs – all i got was basically unlimited numbers of „First chance“ exceptions (problems with msvcr80.dll, mscorwks.dll). If I limited the number of those, I also managed to get „Kernel32!TerminateProcess“ exception, which after analysis stated that it didn’t detect any problems with that; only one time i got the warning, describing that 1 client connection was executing for more than 90 seconds.

I dont think the problem is on the 64bit Windows server 2008 or SQL server 2008 side, since when, just for checking, we used Sharepoint application with the new SQL Server 2008 as database, it connected just fine.

So what am I missing with our ASP.NET application configuration/development that it cannot connect to 64 bit Sql server 2008?

Thanks and regards, Martin.

A: 

This sounds like a configuration problem, probably a permissions problem. Your Sql Server is on a different box than the your web server? If so I would look at what user your web site is running under. Make sure that user has access to the Sql Server.

If your user does have access make sure it has access to travel the wire to your SQL Server. Try to connect to the SQL Server via Sql Management Studio with the user's credentials.

Chuck Conway
IIS and SQL Server 2008 64bit are on the same machine.And yes, i can connect to SQL Server via Studio with the same credentials as specified in my web application connection string.
Martin
What about the Application Pool? What user is the Web Site running under in IIS?
Chuck Conway
On Windows 2008 in IIS click on "Application Pools" then right-click on the Application Pool for your site and select "Advanced Settings". A screen will popup. In the "Process Model" section the first item will be "Identity" can that user access the DB?
Chuck Conway
Yes. It ran under Network Service, so i added that to the SQL Server sysadmin role, still nothing. Even changed the IIS user to local admin account that is sysadmin in SQL Server and again nothing.
Martin