473,662 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help connecting to Access DB from web service

I am creating a web service that returns data from an Access 2000 database
using VS2005. The Access database is located on a different server than
where the web service is running. The Access database is also opened by a
different desktop application running on various workstations on the
network.

While developing / debugging the web service is hosted on my development
machine using the 'ASP.NET Development Server' that is included with VS2005.
When deployed it is being host with IIS.

I am using the following connection string:

Provider=Micros oft.Jet.OLEDB.4 .0;Data Source="\\slo-science1\data\P BI Chem
data\PBIChemDat abase.mdb"

If the database has NOT opened by any of the workstations running the
desktop application then the web service runs correctly on both my
development machine as well as on the IIS server.

If the database has been opened by any of the workstations running the
desktop application the web service runs correctly ONLY on my development
machine and fails on IIS with the following error:

System.Data.Ole Db.OleDbExcepti on: Could not use ''; file already in use.

What are the differences between the 'ASP.NET Development Server' and IIS
that would effect how a web service opens a remote Access database?

Does anyone know how what settings can be changed so that the web service
runs correctly on IIS?

Thanks in advance,
Jeff Richardson
Apr 1 '06 #1
5 2313
Hi Jeff,

Welcome to the MSDN newsgroup.

Regarding on the accessing Access mdb database in ASP.NET application, it
is likely the ASP.NET application doesn't have sufficient permission or the
mdb file is locked. From your description, you've another desktop
application that will also open and access the mdb file, if so, I'm afraid
the ASP.NET application hosted in IIS will not be able to access it
concurently (if get locked). This is different when accessing from local
computer or in testserver because when deploying in IIS, the asp.net
appliation runs under the asp.net worker process (under the worker proces
indenitity) and this process's security session is not a interactive
session which can not perform many action like desktop application. So for
your scenario, I think you may consider the following options:

1. Do not make other application access the same mdb file concurrently that
make it get locked.

2. Use SQL express db instead, this is also file based however is designed
for concorrent server-side application and has much better performance
against access.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Apr 3 '06 #2
Hello Steve,

Thank you for your reply.

I would love to move the database to SQL Express but that is not an option
since the desktop application is a comerical application and its native file
format is Access.

Given that I can not move the data to a better database, what can be done to
make my web service work well with the Access db while hosted on IIS? Can
the worker process for this application be given additional permission?

Thanks,
Jeff.
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:dD******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hi Jeff,

Welcome to the MSDN newsgroup.

Regarding on the accessing Access mdb database in ASP.NET application, it
is likely the ASP.NET application doesn't have sufficient permission or
the
mdb file is locked. From your description, you've another desktop
application that will also open and access the mdb file, if so, I'm
afraid
the ASP.NET application hosted in IIS will not be able to access it
concurently (if get locked). This is different when accessing from local
computer or in testserver because when deploying in IIS, the asp.net
appliation runs under the asp.net worker process (under the worker proces
indenitity) and this process's security session is not a interactive
session which can not perform many action like desktop application. So
for
your scenario, I think you may consider the following options:

1. Do not make other application access the same mdb file concurrently
that
make it get locked.

2. Use SQL express db instead, this is also file based however is
designed
for concorrent server-side application and has much better performance
against access.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 3 '06 #3
Thanks for your response Jeff,

After some further research, If you do have to use the Access as the
datastorage which will be accessed by multiple processes, you need to take
care of the following things:

1. Since your mdb file is put on a fileshare, make sure you've grant
sufficient permission in both the fileshare and the NTFS's permission
setting. In my test case I grant both of them everyone full control though
you can adjust them according to your decent scenario.

2. In the OLEDB connectionstrin g, specify the connection mode as
"Mode=Share Deny None", this means that the connection to the db file won't
lock it and won't deny any type of access from other client/process(read,
write....). e.g here is the connectionstrin g generated through the VS ide
connection wizard:(used in my desktop application)

=============== =========
Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Data
Source="D:\Shar e_Data\mydb.mdb ";Mode=Shar e Deny None;Jet OLEDB:Engine
Type=5;Provider ="Microsoft.Jet .OLEDB.4.0";Jet OLEDB:System database=;Jet
OLEDB:SFP=False ;persist security info=False;Exte nded Properties=;Jet
OLEDB:Compact Without Replica Repair=False;Je t OLEDB:Encrypt
Database=False; Jet OLEDB:Create System Database=False; Jet OLEDB:Don't Copy
Locale on Compact=False;U ser ID=Admin;Jet OLEDB:Global Bulk Transactions=1
=============== =========

Then, in our ASP.NET application, just use the same connection setting to
access the mdb file(through remote file share). Based on my local test, it
works correctly(I can access it well in both desktop & asp.net application
concurrently).

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 4 '06 #4
Thanks Steven,

Permissions was the source of my troubles.

Jeff.
"Steven Cheng[MSFT]" <st*****@online .microsoft.com> wrote in message
news:1g******** ********@TK2MSF TNGXA01.phx.gbl ...
Thanks for your response Jeff,

After some further research, If you do have to use the Access as the
datastorage which will be accessed by multiple processes, you need to take
care of the following things:

1. Since your mdb file is put on a fileshare, make sure you've grant
sufficient permission in both the fileshare and the NTFS's permission
setting. In my test case I grant both of them everyone full control though
you can adjust them according to your decent scenario.

2. In the OLEDB connectionstrin g, specify the connection mode as
"Mode=Share Deny None", this means that the connection to the db file
won't
lock it and won't deny any type of access from other client/process(read,
write....). e.g here is the connectionstrin g generated through the VS ide
connection wizard:(used in my desktop application)

=============== =========
Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Data
Source="D:\Shar e_Data\mydb.mdb ";Mode=Shar e Deny None;Jet OLEDB:Engine
Type=5;Provider ="Microsoft.Jet .OLEDB.4.0";Jet OLEDB:System database=;Jet
OLEDB:SFP=False ;persist security info=False;Exte nded Properties=;Jet
OLEDB:Compact Without Replica Repair=False;Je t OLEDB:Encrypt
Database=False; Jet OLEDB:Create System Database=False; Jet OLEDB:Don't Copy
Locale on Compact=False;U ser ID=Admin;Jet OLEDB:Global Bulk Transactions=1
=============== =========

Then, in our ASP.NET application, just use the same connection setting to
access the mdb file(through remote file share). Based on my local test, it
works correctly(I can access it well in both desktop & asp.net application
concurrently).

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 6 '06 #5
You're welcome Jeff,

Glad that you're figured out the problem.

Have a good day!

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Apr 7 '06 #6

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

Similar topics

4
5488
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP applied some sort of extra security arrangements to their SQL Server to allow access only through port 1433. they have told me to configure an alias using Network Client and to register this alias in the usual way using my Enterprise Manager. My...
0
1288
by: Rob | last post by:
Is there a way to query Microsoft's index server service from an Access front-end? When you run the index service on a workstation (or a server), you can full-text index a directory/series of directories and you can query that via the quick-and-dirty query capability under My Computer/Manage/Services and Applications/Indexing Service/Query... Can you connect to the same "engine" from Access? Can you do the same from a client machine...
6
4984
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
1
2563
by: SqlJunkies User | last post by:
Hi I try to call a Webservice via java, the webservice is loacated on a IIS-server(Dot-net). It is a trusted Domain so I do not have to Connect with a Username and Password. It seems to be a problem to get Information from the Service. At all I do not get Access. Anybody have same problem or experiance with this. I use following Code to access the Webservice. If anybody have other suggestions I am willing to try that My Code. import...
0
1558
by: Steve DeLong | last post by:
I have a C# Web Service (anonymous access has been disabled) that I would like to connect to with a standard Windows Service, also in C# as part of a scheduled synchronization system. I have configured my windows service to run as a particular user account. I would like to use that account's credentials with the web service proxy, but I can't seem to make it work. The following code works:
18
1620
by: Barry Wright | last post by:
Hi All, I have been connecting to this group through Rogers cable my internet service provider. However, Rogers has announced that effective Dec 15th they will no longer providing access to "usenet". What is your preferred method of accessing this group? Regards, Barry Wright
35
2545
by: robert d via AccessMonster.com | last post by:
I was asked to provide a proposal. I provided a proposal on my application and the prospective client likes what I have but is wary of it having been developed in Access. I don't understand this concern since my front-end application will be linked to a SQL SERVER backend. But there seems to be this "conventional wisdom" among IT people that Access is a toy database. Okay, let's redefine that as "Jet" is a toy database (which I don't...
3
2602
by: Chris | last post by:
Don't know if there is a simple solution for this one or not. When running SQL server on a machine with 2000 loaded and the complete SQL package I don't have any issues. Now I'm trying to login using my XP machine with MSSQL developer edition, and I can not connect to my remote servers via TCP/IP. It can see the server, and it establishes a connection, but I can't access my files, and the connection seems incredibly slow. I have checked my...
10
15944
by: mairhtin o'feannag | last post by:
Hello, I'm having problems connecting to my new v9 db box. The pertinent information is below: DB2_db2inst1 60000/tcp DB2_db2inst1_1 60001/tcp DB2_db2inst1_2 60002/tcp DB2_db2inst1_END 60003/tcp
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8762
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
8545
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
8633
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...
1
6185
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
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
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...
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.