For starters, type in subst from your command line just to see what shortcuts you've already created. This is a concept that is normally done in Unix. Your syntax is correct though. At the command line, type in dir e:\ and see what is listed.
Sorry, I never saw your question. I'll give it a try in the next 5 minutes. In the meantime, I have upgraded from Express to Pro so that might make a difference too.
When I run VS2012 normally (NOT as Administrator), I can see the path and the access databases in Server Explorer. But a debug run fails in the AccessMembershipProvider:
An error occurred loading a configuration file: Failed to map the path '/'.
When I "Run as Administrator", Server Explorer tells me that the path is invalid. A debug run gives me this error:
'E:\HostingSpaces\rjmolloy\kd2uj.com\data\Members.mdb' 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.
rjmolloy
Member
2 Points
7 Posts
OleDB Connection string to a virtual drive not working
Nov 15, 2012 06:03 PM|LINK
Hello All,
I have an asp.net application that uses an Access database. If the connection string contains:
C:\ActiveHost\HostingSpaces\rjmolloy\kd2uj.com\data\Members.mdb
everything seems to be fine.
However, when I create a virtual drive
subst e: c:\ActiveHost
and use the path
E:\HostingSpaces\rjmolloy\kd2uj.com\data\Members.mdb
I get this error:
'E:\HostingSpaces\rjmolloy\kd2uj.com\data\Members.mdb' is not a valid path.
I swear this worked under VS2010 Pro. I'm now using VS2012 Express for Web.
Any ideas?
Thanks,
Bob Molloy
bbcompent1
All-Star
33873 Points
8776 Posts
Moderator
Re: OleDB Connection string to a virtual drive not working
Nov 15, 2012 06:08 PM|LINK
For starters, type in subst from your command line just to see what shortcuts you've already created. This is a concept that is normally done in Unix. Your syntax is correct though. At the command line, type in dir e:\ and see what is listed.
rjmolloy
Member
2 Points
7 Posts
Re: OleDB Connection string to a virtual drive not working
Nov 15, 2012 06:34 PM|LINK
Thanks for the reply. Here's the stuff you asked about:
C:\>subst
E:\: => C:\ActiveHost
C:\>
C:\>dir e:\
Volume in drive E is OS
Volume Serial Number is 2486-D52E
Directory of e:\
11/15/2012 11:29 <DIR> .
11/15/2012 11:29 <DIR> ..
11/15/2012 11:29 <DIR> HostingSpaces
04/29/2012 13:24 <DIR> root
0 File(s) 0 bytes
4 Dir(s) 578,727,038,976 bytes free
C:\>
rjmolloy
Member
2 Points
7 Posts
Re: OleDB Connection string to a virtual drive not working
Nov 15, 2012 06:35 PM|LINK
Probably should have mentioned that the OS is Windows 8 Pro.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: OleDB Connection string to a virtual drive not working
Nov 16, 2012 08:38 AM|LINK
Hi,
Your problem needs deeply analyzing. I'll submit this to a senior department to analyze your issue.
Reguards!
Cathy Mi - M...
Member
741 Points
165 Posts
Microsoft
Re: OleDB Connection string to a virtual drive not working
Nov 20, 2012 04:28 PM|LINK
Hi,
What is the connection string?
Thanks,
Cathy Miller
rjmolloy
Member
2 Points
7 Posts
Re: OleDB Connection string to a virtual drive not working
Nov 20, 2012 04:37 PM|LINK
Hi Cathy,
The virtual drive is setup with this:
subst e: c:\ActiveHost
The connection string:
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\HostingSpaces\rjmolloy\kd2uj.com\data\Roster.mdb"
Regards,
Bob Molloy
Cathy Mi - M...
Member
741 Points
165 Posts
Microsoft
Re: OleDB Connection string to a virtual drive not working
Dec 07, 2012 05:08 PM|LINK
Hi Bob,
Are you opening Visual Studio as Administrator?
Can Visual Studio see the mapped drive if you try to browse to the .mdb file using the mapped drive?
Do you see the problem only from within Visual Studio, or after it is deployed?
Thanks,
Cathy
rjmolloy
Member
2 Points
7 Posts
Re: OleDB Connection string to a virtual drive not working
Dec 18, 2012 02:16 PM|LINK
Hi Cathy,
Sorry, I never saw your question. I'll give it a try in the next 5 minutes. In the meantime, I have upgraded from Express to Pro so that might make a difference too.
Regards,
Bob
rjmolloy
Member
2 Points
7 Posts
Re: OleDB Connection string to a virtual drive not working
Dec 18, 2012 03:22 PM|LINK
OK, Cathy, here's what I'm seeing:
When I run VS2012 normally (NOT as Administrator), I can see the path and the access databases in Server Explorer. But a debug run fails in the AccessMembershipProvider:
Dim cfg As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath)
An error occurred loading a configuration file: Failed to map the path '/'.
When I "Run as Administrator", Server Explorer tells me that the path is invalid. A debug run gives me this error:
'E:\HostingSpaces\rjmolloy\kd2uj.com\data\Members.mdb' 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.
Regards,
Bob