[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.7

Compiled service cannot see or access mapped drives

Asked by Quark-E in Windows Server 2008, Windows 2003 Server, Visual Basic Programming

Tags: Windows Server 2008, WNetAddConnection2

We have an application server that was running Windows 2003 that I upgraded yesterday to Server 2008.  This server has several homegrown compiled services that interface with legacy systems by writing files out to mapped network drives.

After the upgrade the services couldn't access the drives.  The logs showed a 1219 error, and some testing revealed that only the first connection to the server worked.  We have a total of six connections to different folders on the same server, all under the same credentials.

In 2003 this worked fine.  We used WNetAddConnection2 in VB6 inside of a drive mapping service.  It read all the desired drive letters, paths and credentials from a database, then executed the maps, checking them periodically and re-mapping as needed.

The other services simply verified the drive letter's status they needed, then ran their extract.  Worked great.  All services ran under the System account.  The drive letters weren't accessible in User mode but showed up as Disconnected drives in Explorer.

Once I saw that I couldn't find a quick fix for the 1219 error, since the central IT group doesn't want my service credentials to be able to make a single high-level map, I tried to trick the system by adding entries to the Hosts file that linked the same server IP to six different hostnames.  It worked in that a ping to any of the names resolved to the correct IP, but now I got an error 52 on all of the map attempts, and I couldn't figure out much about that.

I thought I'd make it through the weekend by creating a quick little CMD to make the maps.

That part worked fine, but the services couldn't see the drives, even if I ran them under my personal credentials, to avoid the Null session of the system account.

Finally, I created a quick little test VB6 app that attempted to verify status of a mapped drive, then write to it.  This would work fine in the IDE, or even if I ran the compiled EXE myself.  As soon as I ran it as a service, the program could not 'see' or access the mapped drive, again, no matter what credentials I used for the service.

I will accept one of three things as a solution:

(1) help me find a way to configure my original VB6 drive mapping program so it doesn't get 1219 errors when it makes multiple maps to the same server with the same credentials.  My research seems to show that MS says this is by design for 'security', but why does it work in 2003 and even in 2008 if I make the maps at the command line via CMD instead of via WNetAddConnection2?

(2) Help me figure out how to configure the services so they can see 'normal' mapped drives.  Keep in mind that I've already tried to run the services as myself (I'm an admin), the actual Administrator, and the system account both with and without the Interact with Desktop ticked.

(3) A no- or low-cost completely different way to specify and create mapped drives that are accessible to compiled VB6 services that will attempt to access a drive letter.  In other words, I need a way to create an 'X:' drive that a VB6 service can use, where all the VB program knows is that it needs to write to X:.

Thanks.
[+][-]07/06/09 04:12 AM, ID: 24784030Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Windows Server 2008, Windows 2003 Server, Visual Basic Programming
Tags: Windows Server 2008, WNetAddConnection2
Sign Up Now!
Solution Provided By: robberbaron
Participating Experts: 1
Solution Grade: B
 
[+][-]07/06/09 05:24 AM, ID: 24784432Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/06/09 06:00 AM, ID: 24784717Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/06/09 04:12 PM, ID: 24790085Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625