473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Slow Database Connection Initiation with ASPX on Local Server

Alright, folks, here's the deal...

I'm working on migrating a classic ASP website to an ASP.NET codebase.
At the heart of the site is a MySQL database.

To make sure an "in-process" program doesn't screw up the live site, I
run a local IIS webserver on my XP Pro (AMD XP 2500+, 512MB DDR RAM)
machine, which resides behind an XP ICS gateway on my LAN. I also have a
MySQL server set up locally for development purposes.

Now, I use essentially the same code for database functionality in
ASP.NET that I'm using in the ASP pages -- thanks to the .NET ADODB
wrapper (Note that I am NOT using ADO.NET per se, but that I have tried
and get the results I'll speak of later) Using said code, connections to
both my local DB server and the DB server which resides on my hosting
provider's servers are initiated quite quickly. The code also works
great in ASP.NET form if compiled and run from the hosting provider's
webserver.

Unfortunately, it takes a good 15-20 seconds to run the
ADODB.Connection.Open() method if I try to run the same ASPX page on my
local webserver. Note that this dramatic pause occurs regardless of
server address/name, and does not seem to be directly related to the
success of the function. And it gets better than that -- if I disable
the server computer's connection to my LAN (and thus, the internet as
well) the connections are lightning quick, as they're apparently
supposed to be.

The only possible explanation I can come up with is that it's DNS
related, somehow... Lookups and reverse-lookups getting snagged
somewhere... Though, one wouldn't think that and DNS-related functions
would have to be used in order to process "localhost" or "127.0.0.1"...

In any case, I've been to the end of the 'net and back again (heh)
multiple times looking for a possible solution to this problem. At this
point, I'd even settle for any evidence that anyone else anywhere is
HAVING this problem... At least then I'd no I'm not just losing my mind.

Considering VS.NET has the ability to build to and debug directly from a
remote server using FrontPage extensions, it wouldn't be the absolute
end of the world if that's the only way I could develop ASP.NET web apps
and services... But it would be nice to have some clue as to what's
going on.

If anyone could shed any light on this issue, I'd be eternally grateful.

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
4 4120
If you are still using ADO code within a aspx page...remember to set
aspcompat="true" in the <%@ Page directive

"Nathaniel Sherman" wrote:
Alright, folks, here's the deal...

I'm working on migrating a classic ASP website to an ASP.NET codebase.
At the heart of the site is a MySQL database.

To make sure an "in-process" program doesn't screw up the live site, I
run a local IIS webserver on my XP Pro (AMD XP 2500+, 512MB DDR RAM)
machine, which resides behind an XP ICS gateway on my LAN. I also have a
MySQL server set up locally for development purposes.

Now, I use essentially the same code for database functionality in
ASP.NET that I'm using in the ASP pages -- thanks to the .NET ADODB
wrapper (Note that I am NOT using ADO.NET per se, but that I have tried
and get the results I'll speak of later) Using said code, connections to
both my local DB server and the DB server which resides on my hosting
provider's servers are initiated quite quickly. The code also works
great in ASP.NET form if compiled and run from the hosting provider's
webserver.

Unfortunately, it takes a good 15-20 seconds to run the
ADODB.Connection.Open() method if I try to run the same ASPX page on my
local webserver. Note that this dramatic pause occurs regardless of
server address/name, and does not seem to be directly related to the
success of the function. And it gets better than that -- if I disable
the server computer's connection to my LAN (and thus, the internet as
well) the connections are lightning quick, as they're apparently
supposed to be.

The only possible explanation I can come up with is that it's DNS
related, somehow... Lookups and reverse-lookups getting snagged
somewhere... Though, one wouldn't think that and DNS-related functions
would have to be used in order to process "localhost" or "127.0.0.1"...

In any case, I've been to the end of the 'net and back again (heh)
multiple times looking for a possible solution to this problem. At this
point, I'd even settle for any evidence that anyone else anywhere is
HAVING this problem... At least then I'd no I'm not just losing my mind.

Considering VS.NET has the ability to build to and debug directly from a
remote server using FrontPage extensions, it wouldn't be the absolute
end of the world if that's the only way I could develop ASP.NET web apps
and services... But it would be nice to have some clue as to what's
going on.

If anyone could shed any light on this issue, I'd be eternally grateful.

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #2
Well to clarify..ONLY do this if you are still using COM components in your
aspx pages. Otherwise don't do it.

"Nathaniel Sherman" wrote:
Alright, folks, here's the deal...

I'm working on migrating a classic ASP website to an ASP.NET codebase.
At the heart of the site is a MySQL database.

To make sure an "in-process" program doesn't screw up the live site, I
run a local IIS webserver on my XP Pro (AMD XP 2500+, 512MB DDR RAM)
machine, which resides behind an XP ICS gateway on my LAN. I also have a
MySQL server set up locally for development purposes.

Now, I use essentially the same code for database functionality in
ASP.NET that I'm using in the ASP pages -- thanks to the .NET ADODB
wrapper (Note that I am NOT using ADO.NET per se, but that I have tried
and get the results I'll speak of later) Using said code, connections to
both my local DB server and the DB server which resides on my hosting
provider's servers are initiated quite quickly. The code also works
great in ASP.NET form if compiled and run from the hosting provider's
webserver.

Unfortunately, it takes a good 15-20 seconds to run the
ADODB.Connection.Open() method if I try to run the same ASPX page on my
local webserver. Note that this dramatic pause occurs regardless of
server address/name, and does not seem to be directly related to the
success of the function. And it gets better than that -- if I disable
the server computer's connection to my LAN (and thus, the internet as
well) the connections are lightning quick, as they're apparently
supposed to be.

The only possible explanation I can come up with is that it's DNS
related, somehow... Lookups and reverse-lookups getting snagged
somewhere... Though, one wouldn't think that and DNS-related functions
would have to be used in order to process "localhost" or "127.0.0.1"...

In any case, I've been to the end of the 'net and back again (heh)
multiple times looking for a possible solution to this problem. At this
point, I'd even settle for any evidence that anyone else anywhere is
HAVING this problem... At least then I'd no I'm not just losing my mind.

Considering VS.NET has the ability to build to and debug directly from a
remote server using FrontPage extensions, it wouldn't be the absolute
end of the world if that's the only way I could develop ASP.NET web apps
and services... But it would be nice to have some clue as to what's
going on.

If anyone could shed any light on this issue, I'd be eternally grateful.

Thanks in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #3
Well, first off, thanks for the reply... Unfortunately, I'm using the
.NET ADODB interface component (not ADO.NET objects, but the ADODB
component listed in the .NET "references" section) and not the COM
interface.

To clarify my original post (since, after re-reading it myself, I think
it may have been it bit unclear about some things):

1) The problem: the ADODB.Connection.Open() method takes 15-20 seconds
to intitiate a connection to either a local or a remote MySQL database
server. I have done a good deal of tracing and debugging, and nailed
the delay specifically to the Open statement. I have also used MySQL's
".NET Connector" interface, as well as the generic ADO.NET interface --
same results.

2) This problem does not occur making calls to either the local database
or the remote database using the ADODB COM interface from a .ASP page,
whether the page is served from the local IIS server or my hosting
provider's server.

3) This problem does not occur if I upload the VB.NET ASPX project in
question to my hosting provider's webserver and run it from there.

4) With the ASPX page on the local IIS server, I have attempted to
connect to both the local MySQL server on the same machine (via
"localhost", "127.0.0.1", and the NetBIOS computer name) as well as my
database on my hosting provider's servers (via domain name) with same
results.

5) The local server machine is connected to a home LAN, with internet
gateway functionality being performed by an ICS (Internet Connection
Sharing) gateway computer. The XP firewall is also turned on on the
gateway (but not on my server).

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #4
.... Anybody? :-)

---
Nathaniel Sherman
mailto:na*****@shermanmedia.com
Sherman Media Services
http://www.shermanmedia.com

"Nathaniel Sherman" <na*****@shermanmedia.com> wrote in message
news:OR**************@TK2MSFTNGP14.phx.gbl...
Well, first off, thanks for the reply... Unfortunately, I'm using the
NET ADODB interface component (not ADO.NET objects, but the ADODB
component listed in the .NET "references" section) and not the COM
interface.

To clarify my original post (since, after re-reading it myself, I think
it may have been it bit unclear about some things):

1) The problem: the ADODB.Connection.Open() method takes 15-20 seconds
to intitiate a connection to either a local or a remote MySQL database
server. I have done a good deal of tracing and debugging, and nailed
the delay specifically to the Open statement. I have also used MySQL's
".NET Connector" interface, as well as the generic ADO.NET interface --
same results.

2) This problem does not occur making calls to either the local database
or the remote database using the ADODB COM interface from a .ASP page,
whether the page is served from the local IIS server or my hosting
provider's server.

3) This problem does not occur if I upload the VB.NET ASPX project in
question to my hosting provider's webserver and run it from there.

4) With the ASPX page on the local IIS server, I have attempted to
connect to both the local MySQL server on the same machine (via
"localhost", "127.0.0.1", and the NetBIOS computer name) as well as my
database on my hosting provider's servers (via domain name) with same
results.

5) The local server machine is connected to a home LAN, with internet
gateway functionality being performed by an ICS (Internet Connection
Sharing) gateway computer. The XP firewall is also turned on on the
gateway (but not on my server).

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BGuy | last post by:
When I am attempting to connect to SQL Server 2000 on my local server, I get the following error: "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection" My...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
6
by: Arsalan Ahmad | last post by:
Hi all, I am creating a website in which in an Item detail page there are a number of web controls (7 or 8) and what is happening that inside each of control's Page_Load() function I am creating...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
12
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus...
3
by: Hahn, Thomas | last post by:
Hallo, I have an ASP.NET application with masterpages, skins and diffrent themes. The application works fine, but the performance is not realy good. If I load an ASPX file, which has no database...
3
eboschi
by: eboschi | last post by:
Hi all, i'm new to .net programming and i have some problems with database connection. I have written two web application. Both of them use ADODB Connection to Sql Server 2000 database. The problem...
2
by: Nikhil21 | last post by:
database connection with ms sql server in window application by using vb.net
0
by: Jim Chapman | last post by:
I've got software that is used by 20 or so people both through a local network and through the internet. The software (.net/c#) polls a sql database every 10 seconds or so to show plant data. This...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.