Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing data from a different server
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00910911
Message ID:
00913235
Vues:
9
>Hello All,
>
>I am pretty new to .NET. I am trying to create a web application in VB .NET. Here is the Situation, I have a login form and verify the the user name and password against a VFP database stored in a different server. my oledb connection string is
>
> Dim oleDBCon As New OleDb.OleDbConnection(System.Configuration.ConfigurationSettings.AppSettings("Provider=VFPOLEDB.1;Data Source=\\10.0.0.10\sample.dbc;Mode=Share Deny None;Extended Properties='';User ID='';Password='';Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN=''"))
>
>but when i try to open the connection i get the following error
>
>System.Data.OleDb.OleDbException: Invalid path or file name.
>
>Please help

So, a couple people pointed out a few things here...

1. When you use a UNC you HAVE to have a share... so:

\\10.0.0.10\sample.dbc is most certainly invalid. Put this in your run window and if it doesn't work then you know it is wrong.

2. Someone mentioned that you have to escape your backslash... I don't think that's true since you are using VB, but I'm not 100% on that one.

3. You were pointed to security. Once you get the path right you need to ensure that your aspnet worker process (the idnetity it runs as) has rights to this share. For accessing files on other machines that usually means it has to run under a domain account, or it has to impersonate a domain account. Or, it could run on a local machine account that has the same password on both machines.

Good luck,
BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform