Connections to an Access database are stalling (looping?) on IIS - loops

I have a pc with windows server 2008 (but it also happens with Windows Server 2003) and IIS, with different installed sites, which normally function properly.
Sometimes (2-3 times a day) it happens that the mdb connection of the server stalling, in the sense that all the sites that read mdb database come into a kind of loop, since the browser returns the classic timeout error.
Not depend on the database or from the site, but occurs on all sites on the server. In general, they are sites in asp with classic ADODB connection. The web access continues to operate, it's just the mdb connection that goes into loop.
It’s sufficient to restart the service of web publishing or restart IIS, to run again the connection, but I want to prevent the problem, not solve it every time someone report it.
May depend on what? Some of the sites that does something that is blocking the mdb connection on entire server? A hacker attack of some kind? How can I monitor any abnormal behavior of the sites or external attacks?
Thank you.

Stop using an Access database file (.mdb or .accdb) as a back-end database for a web application.
Microsoft strongly recommends against it; it is simply the wrong approach for a number of reasons.

Related

Does windows authentication work even if the AD server cannot be reached?

The basic question is this, if our Windows service uses Windows Authentication for connections to SQL Server, and then because of a network disconnect, SQL server and/or the client machine cannot reach AD to authorize or authenticate, will our service still be able to connect to SQL Server and operate?
I’ve tried it and it seems to work, but we are concerned if it will work even after a few days of being disconnected or after server reboots and the like.
The alternative would be to use SQL Server Authentication, but we would rather not have to deal with potentially exposing and having to protect the password on the client computer. This computer may be in a remote location with little supervision. SQL Server would typically be running on this same remote computer.
And for the follow up questions, does it matter which edition of SQL Server we use? Does it matter that both SQL Server and the service are running on the same computer?
If AD connection is lost, existing SQL connections will keep working (at least for some time), and connection pools will be still available (again, for some time). However, I wouldn't get too comfortable with this, because these time spans might depend on settings outside of a typical DBA' reach.
Alternatives are:
Use an AD proxy. Depends on circumstances, might not be always viable;
Use local user accounts instead of AD. Works always.

How to deploy C# winForm(EntityFramwork) application on LAN network

There are dozens of questions like this but none of them resolve this issue.
I have created WinForm application using entityFramework modelFirst approach. I have deployed it using InstallShield and it works perfectly fine.
I have been using VisualStudio server explorer for all database related work, not SQL server Management studio.
Questions
What I simply want is how can I make its database centralised
through out the LAN network?
One computer will act as server and
will contain that application too, others will just have application
and use database from server. Do I have to make two builds? or what
do I do?
In-case of change in IP address of server of location of
database at server? Shall it require new deployment or just some
changes in connection string?
Shall it require some changes in code
as well to handle exceptions in case of server no-response or
anything?
Kindly elabore with steps and process, whatever you are suggesting as I am very new to this.
The general way to do this is to have a ConnectionString that points to the machine running the server. The machine name is used, not the IP address.

Deploying a Microsoft Access application with SQL Azure

How can I deploy Access applications to multiple companies, with linked tables to SQL Azure servers?
I'm planning to deploy the Access programs with Microsoft Access runtime, and I'm assuming that I'll need to include the odbc drivers as well? Is there a way to automatically have Azure create a new server when a company signs into my website and downloads a program, and have the Access program link to it? And is there a way to get around the IP address settings in Azure as well? Because companies will be using the programs on multiple PCs. Or is it possible to utilise that and charge per PC?
If you distribute the application pre-linked, then the user should not have to do anything to consume the data.
When using Access with SQL server you can in general use the standard windows built in SQL driver. However in the case of Azure you do need to download + install the native 11 drivers (so I recommend you use that driver during development and setup).
You can also have code include to re-link to the sql server, but as noted, if your application is “already” linked, then you really don’t have to do anything on application startup. Such re-linking would not be required every time the application starts, but only a “one time” re-link is required say if you’re going to change the database, or perhaps the user logon. How to re-link (DSN less) is outlined here:
http://www.accessmvp.com/DJSteele/DSNLessLinks.html
As noted, you really don’t need the above.
As for IP restrictions, in the Azure setup you can turn off such restrictions if you need a connection that will occur from any location, but that does open up a security hole. (when you first create the SQL database you will be prompted for firewall rules).
All of the above assumes you been developing that Access application with SQL server as the back end (you can even use the free edition of SQL express for development on your local machine).
Last but not least:
Because your connection is occurring OVER the internet, then you speed will be MANY times slower then using a local server. Read the following article to get a “grasp” of this speed difference:
http://www.kallal.ca//Wan/Wans.html
So MUCH additional work is required in Access to obtain good performance when your connection is OVER the internet as opposed to SQL server running on your local network.

What could cause latency between two VMs on the same physical server?

I have a web VM and a database VM on the same physical server (Windows Server 2012 Hyper-V). The web site is a classic ASP site on a Windows 2012 server, and the database is on SQL Server 2012, also on Windows Server 2012.
My colo has a DNS server (not used for these VMs), and when it goes down, the site experiences Script Timeout errors -- the pages take 180+ seconds to process. When inspecting the site profiling, many of the database calls are taking several seconds each.
However, the SQL profile shows no performance issues -- all queries take only a few milliseconds to process. Putting a filter of 1,000+ milliseconds shows no matching results. So this leads me to believe the latency is between the web and database VMs.
However, this makes no sense for several reasons:
The DNS server does not host and entries related to this site or database.
All connections use IPs, not domain/machine names.
The latency is between the two VMs, but these are on the same server, so network issues should not impact the communication between the VMs. I verified this by running Wireshark, no web-to-DB traffic hits the NIC.
What could be causing this?
Edit:
Forgot that the DNS server does have a reverse DNS for the IP and site domain. But still can't imagine how this would result in the latency between the web and DB VMs.
Additional details in response to comments:
The MDAC version, according to this article, is 6.2.9200.16384. I don't remember installing MDAC separately, so I'm assuming it's what comes installed w/ Windows Server 2012.
They are on the same subnet. A tracert shows a direct route from the web server to the DB server.
Here is the connection string:
Provider=SQLNCLI11;Server=[DbServerIp];Integrated Security=SSPI;Network=DBMSSOCN
This is not running VMWare, but instead is Windows Hyper-V. Thought I mentioned that before, but I see now that I didn't (have now added it above).
I think the following link may resolve your very issue:
Read thread to the bottom to disable the NETBIOS Helper
Essentially, as odd as it sounds, try disabling NETBIOS on your network adapter(s):

Slow performance using local impersonation on ASP

I'm working on a large web application running under IIS 6.0 and connecting to an SQL Server 2005 database. I'm currently trying to connect to the database using Windows Authentication to properly log which user account updates records in the database, but I've run into a bit of a performance issue; The initial connection that establishes the session takes easily over a minute to finish.
There are no network issues (This is a test server, so all tests are local). My IIS is configured to use Basic Authentication (I need the login info plain) and Local Impersonation is enabled, with an empty username/password setting.
This setup establishes the connection properly, but as mentioned, takes way too long to start up (subsequent queries are performed at normal speed)
Does anyone know if Local Impersonation should affect performance this dramatically? Am I looking in the wrong place? Is there any way to force SQL Server to keep the database connection open?
Thanks in advance for any help!
Try changing the way you reference your local server. If your application settings are (local)\instance_name update it to (127.0.0.1)\instance_name.
I’ve had similar performance issue in the past and this fixed it. Note that you’ll need to add this IP address as one of the listeners in SQL Server Configuration manager under Network configuration -> TCP/IP

Resources