473,803 Members | 3,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MS Access on a web farm

9 New Member
Is there any way to set up connecting to an MS Access file on a 3rd server (which is on a domain) from a Web Farm (which is not on the domain)?

Hardware/OS:
Windows Server 2003
Web Farm (two web servers which are network load balanced, or NLBs)
ASP.NET v1.1
Microsoft Access 2003

We're seeking to set up an NLB webfarm. One of the web-apps uses a MS Access database.
Given the NLB (2 boxes), the MS Access database can't reside on either (to remove "single point of failure" scenario).
The NLBs are not part of the domain.
We've put the MS Access file on a 3rd server (which is part of the domain).
We can see files on the 3rd server (such as serving up images and other pages. In the Web.Config, we put this connection string:
\\Server3\MSAcc ess\DatabaseFil e.mdb

The folder \\Server3\MSAcc ess| is shared for full control for everyone; guests included (yeah, security hole...)

We keep getting this following error, to which we've not been successful in resolving:

The Microsoft Jet database engine cannot open the file '\\Server3\MSAc cess\DatabaseFi le.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

I did visit Microsoft's website and read through several KB articles, but no success; #253580, #315276 (NTRights Utlitity)


Is there any way to "mount" \\Server3\MSAcc ess\ shared folder as a specific lettered drive when the sever starts up (vs having to log on)?

Any insights appreciated.

Gary Noter
Feb 20 '07 #1
11 2614
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi Gary

I've frequently used Access databases though a citrix farm but unfortunately had nothing to do with setting them up there. I will have a word with some experts who may be able to help and see what can be done.

Mary
Feb 21 '07 #2
Motoma
3,237 Recognized Expert Specialist
I am entirely unfamiliar with Access; however, I do have a bit of knowledge with databases. What it sounds like you have here, is a permissions conflict. I don't know how you are trying to access the Access database, because you did not post any code to accompany your question, but the error alludes to the idea that your user does not have permissions on the database (not to the file mind you, the database itself). Either that, or someone else has an exclusive lock on the database. Is the file in use by anyone else?
Feb 21 '07 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
Good suggestion Motoma. I assumed the database was already working correctly in a multi user environment.

In the database go to Tools - options - advanced and check that the default open mode is not set to Exclusive. It should be set to Shared. Also the Default Record Locking should be set to Edited record although this would not be causing the error.

Mary
Feb 21 '07 #4
Killer42
8,435 Recognized Expert Expert
In the database go to Tools - options - advanced and check that the default open mode is not set to Exclusive. It should be set to Shared. ...
Quick question, mostly to satisfy my curiosity. Does this apply to that specific database, or to Access as a whole? (And does it need to be set per user?)
Feb 21 '07 #5
MMcCarthy
14,534 Recognized Expert Moderator MVP
Quick question, mostly to satisfy my curiosity. Does this apply to that specific database, or to Access as a whole? (And does it need to be set per user?)
Applies to specific database rather than Access or a user. If the database is set to Exclusive then the default open mode of that database will be in exclusive mode and no one else will be able to open it except in read only mode.

Mary
Feb 21 '07 #6
GNoter
9 New Member
Motoma, all,

I did post "some" code, per se.

I'm using ASP.NET v1.1, using a standard OLEDb connection (referencing the database by path [see code below]).

From the ASP.NET v1.1 "web.config " file (I'll refer to this as ConnectStringA)
Expand|Select|Wrap|Line Numbers
  1.  <appSettings>
  2.     <add key="strConnectAccess" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Server3\MSAccess\DatabaseFile.mdb"/>
  3. </appSettings>
  4.  
actual "connect" code:
... I'm pausing here.
I went to go look at the connection code and there is a direct inline connection string to another database which ap[ears to not be failing:
\\Server3\C$\MS Access\LogError .mdb
--> I'll refer to this as ConnectStringB,

The difference between ConnectStringA and ConnectStringB is that ConnectStringA assumes a shared folder, whereas ConnectStringB goes direct, as it includes the "\C$" element.

Well, I added the "\C$" to ConnectStringA, (now "\Server3\C$\MS Access\Database File.mdb") and it still fails.


Yes, I would agree there is some sort of permissions error. The database is set for Shared.

HEre is my "connect" code (modified to protect a client's database)
Expand|Select|Wrap|Line Numbers
  1.     Sub btnlogin_click(ByVal sender As Object, ByVal e As EventArgs)
  2.         Dim conpw As OleDb.OleDbConnection
  3.         Dim cmdpw As OleDb.OleDbCommand
  4.         Dim strsql As String
  5.  
  6.         Dim dappw As OleDb.OleDbDataAdapter
  7.         Dim dstpw As DataSet
  8.         Dim rowpw As DataRow
  9.         Dim bldpw As OleDb.OleDbCommandBuilder
  10.         Dim inti As Integer
  11.         Dim rdrpw As OleDb.OleDbDataReader
  12.  
  13.         Dim xx As String
  14.         Dim yy As String
  15.         Dim strmsg As String
  16.         Dim strcounties As String
  17.         Dim lngposition As Long
  18.         Dim strIsCSR As String
  19.  
  20.         If txtIsCSR.Checked = "True" Then
  21.             Session.Contents("IsUser2") = "True"
  22.             Session.Contents("userName2") = txtUserName.Value
  23.             Session.Contents("userPass2") = txtPassword.Value
  24.             Response.Redirect("user2Logon.aspx")
  25.         End If
  26.  
  27.         lngposition = InStr(txtPassword.Value, "'")
  28.         If lngposition > 0 Then
  29.             Response.Redirect("loginError.aspx")
  30.         End If
  31.  
  32.  
  33.         conpw = New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("strConnectAccess"))
  34.         conpw.Open()
  35.  
  36.  
  37.         strsql = "SELECT * " & _
  38.         "FROM [ User] " & _
  39.         " WHERE ( ([ User]].UserName = '" & txtUserName.Value & "') AND ([ User].password = '" & txtPassword.Value & "') )  "
  40.  
  41.         cmdpw = New OleDb.OleDbCommand(strsql, conpw)
  42.         rdrpw = cmdpw.executereader
  43.  
  44.         xx = 0
  45.         While rdrpw.read
  46.             xx = xx + 1
  47.             strmsg = rdrpw.item("userID") + rdrpw.item("userName")
  48.             strcounties = strcounties + strmsg
  49.         End While
  50.  
  51.         conpw.close()
  52.  
  53.         If xx > 0 Then
  54.             Session.Contents("counties") = txtMemberid.Value
  55.             Response.Redirect("Here.aspx")
  56.         Else
  57.             If Len(Trim(Session.Contents("logintrys"))) = 0 Then
  58.                 Session.Contents("logintrys") = 0
  59.             End If
  60.             ctry = (Session.Contents("logintrys"))
  61.             ltrys = CInt(ctry) + 1
  62.             If ltrys > 6 Then
  63.                 Response.Redirect("lockout.aspx")
  64.             End If
  65.             ctry = CStr(ltrys)
  66.             Session.Contents("logintrys") = ctry
  67.             Response.Redirect("loginError.aspx")
  68.         End If
  69.  
  70.     End Sub
  71.  
So, in all, this error [below] is occuring, it does point to "permission s" of some kind. Thing is, how to I "connect" from a webfarm not on a domain to a server (Server3) which is on a domain?
The Microsoft Jet database engine cannot open the file '\\Server3\C$\M SAccessDBs\Data base.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
Feb 21 '07 #7
Motoma
3,237 Recognized Expert Specialist
Try running the app from the machine the database is on (\\Server3\C$\M SAccessDBs\Data base.mdb should still work from the local machine). Do you still get the error?
Feb 21 '07 #8
GNoter
9 New Member
Motoma,

Yes, the database access works just fine when running the application on the same server (no access errors) and using the UCN name
( \\Server3\MSAcc essDB\DatabaseF ile.mdb )
Feb 21 '07 #9
Motoma
3,237 Recognized Expert Specialist
Motoma,

Yes, the database access works just fine when running the application on the same server (no access errors) and using the UCN name
( \\Server3\MSAcc essDB\DatabaseF ile.mdb )
And have you been able to open the database in Access, using the filename \Server3\MSAcce ssDB\DatabaseFi le.mdb?
Feb 21 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
9997
by: Steve | last post by:
Hi What is difference between web farm and web garden? What i understand so far Web Farm Multi Server Environment Support Session share Application object not supported Caching not recommended (??) What about Page Cache (??)
0
1621
by: LearninGuru | last post by:
Hi Folks, I am creating a web service that will be hosted on a web farm. The web service also uses sessions to store user specific data. I have the following doubts about session timeout in a web farm scenario: 1. In a web farm essentially the web service application will be hosted on multiple servers running IIS (any request being routed to one of the servers in the farm depending on various parameters). The session timeout value can...
5
5169
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature. In other words, different web servers may serve different requests in the SAME session. In non-mobile ASP.NET, my understanding is that the view state information is passed between each client browser and server with every post-back. Even if...
8
4678
by: Danny J. Lesandrini | last post by:
A while back (around mid September) I posted a message about how I'd configured my client apps to upload error messages to my web server. I really like the service, but David Fenton suggested that the IE factor was unsafe and ill advised. Since that time, I was tasked to figure out how to consume a Web Service from Access. Well, I worked up some code and an article that is now posted out at DBJ ... ...
43
4256
by: James Stewart | last post by:
If I were to begin creating a fairly simple database, i.e. a datasheet that would include two related tables to create an encyclopedic style database and then create some fairly indepth forms to filter and query the info in the database, would there be any great advantage to upgrading from Access97 to a later version?
0
856
by: user | last post by:
Hi everyone, I've a web farm enviroment without any centralise data storage (MS SQL); a form has to be created and save some data to some where (MS ACCESS) But because it is a web farm enviromnent , we can only place the access in one of the server (eg: 192.168.1.10) and the data source, we specify 192.168.1.10; hence all the connection strings we point to 192.168.1.10
4
1743
by: Jeffrey Davis | last post by:
I'm hoping that someone here can give me some assistance with a database I'm trying to set up. My skills in Access are fairly basic, and I'm trying to skill up, but some of the stuff is a little opaque. I'm trying to put some data I've got on paper into Access. Recently, I got together with some other people marketing organic produce and offered to do some marketing for us on a coop basis in the city.
0
3967
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was getting the Access denied error. After checking different settings and googling I wasnt able to pinpoint the problem and as a temporary fix I decided to merge the two assemblies into one, my logic being no offending assembly no access denied...
3
2974
by: latif87 | last post by:
An example of how the XML file is structured: <xml> <farm name="NAME1"> <size x="INTEGER1" y="INTEGER2" /> <neighbor name="NAME2" /> <crop name="PLANT" area="INTEGER3" /> <crop … /> … </farm> <farm name="NAME2" …>
0
9565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.