Read Access database on Novell Netware 6 from ASPX

G

Guest

Hello!

I have an ASP.NET application which needs to read some data from an Access
database on Novell. I've found an article on Microsoft and did the following:

I've created an account on Novell (IUSR_Machinename) which is the same
account that the aspx is using. This account has full rights to the database
and the folder (on Novell). I've mapped the folder in explorer but when I try
to access the database from ASP.NET I get these errors:

DataSet ds = new DataSet();
Connection.ConnectionsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\ip-adres\filepath;Persist Security Info=False";
DataAdapter.Fill(DS)

Error: The Microsoft Jet database engine cannot open the file "..." It is
already opened exclusively by another user, or you need permission to view
its data.

when I try this:

DataSet ds = new DataSet();
Connection.ConnectionsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=N:\filepath;Persist Security Info=False";
DataAdapter.Fill(DS)

I get Error: 'N:\filepath' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on which
the file resides.

I get the connectionstring from an UDL-file which works with both
approaches. Why can't ASP read the database?

Thanks
Miro
 
H

Hans Kesting

Miro said:
Hello!

I have an ASP.NET application which needs to read some data from an Access
database on Novell. I've found an article on Microsoft and did the following:

I've created an account on Novell (IUSR_Machinename) which is the same
account that the aspx is using. This account has full rights to the database
and the folder (on Novell). I've mapped the folder in explorer but when I try
to access the database from ASP.NET I get these errors:

DataSet ds = new DataSet();
Connection.ConnectionsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\ip-adres\filepath;Persist Security Info=False";
DataAdapter.Fill(DS)

Error: The Microsoft Jet database engine cannot open the file "..." It is
already opened exclusively by another user, or you need permission to view
its data.

when I try this:

DataSet ds = new DataSet();
Connection.ConnectionsString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=N:\filepath;Persist Security Info=False";
DataAdapter.Fill(DS)

I get Error: 'N:\filepath' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on which
the file resides.

I get the connectionstring from an UDL-file which works with both
approaches. Why can't ASP read the database?

Thanks
Miro

Are you sure that the asp-account knows about the "N:" drivemapping?
Usually these are user-specific. When *you* try it, it works, as *you*
have that drive mapping. I don't know how Novell works with
drivemappings though.
For a plain windows network you could use \\server\share instead of N:,
try that (if possible).
 
G

Guest

Hello Hans!

Thanks for your advice. I've tried to map the Novell folder by using UNC
(\\server\folder) but it made no difference. I logged in in windows as IUSR
when I mapped Novell so I guess the IUSR should know about N:

/Miro
 
J

Juan T. Llibre

re:
I've created an account on Novell (IUSR_Machinename)
which is the same account that the aspx is using.

Excuse me if this sounds like a silly question but,
are you sure that's the account ASP.NET is using ?

The two accounts which ASP.NET uses by default are
Machinename\ASPNET and Machinename\Network Service.

Did you *change* the ASP.NET account to the
IUSR_Machinename account, and now it doesn't work ?
 
G

Guest

Hello Juan!

Yes, I'm pretty sure it's IUSR. I've tested on another folder and it worked
only when I granted IUSR full rights. I even tried to specify the user in
web.config:

<identity impersonate="true" userName="domain/IUSR_machinename"
password="****"/>

The anonymous access unchecked in ISS. The password is the same as in Novell.

I tried to add IUSR to Administrator and even changed IUSR_machinename (in
web.config) to the administrator account, with the same negative result.

/Miro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top