Solved

Solution not able to access network resources from network drive

Posted on 2011-03-08
4
380 Views
Last Modified: 2012-05-11
Hi,

I'm running VS 2010 Ultimate on a Win7 Professional machine. The policy of my employer is that everyone does there work on the provided network drives.

The problem that I am having is that if I write an application that uses an external source such as Active Directory or an external web service I get varying error messages varying from " dead network " (I cant remember the full error) to " The Network Path was not found ".

However when I copy my solution to the local drive or a USB drive the project works fine. To add to the confusion any linqtosql or edm projects work fine.

I am an administrator of my local machine and I am running visual studio as an administrator. I've tried using caspol to set Exclusive entry’s for fully trusting the network drive.

When I run: caspol -rsg  for the exe location on

C: the Enterprise and User are fully trusted and for Machine Zone MyComputer is fully trusted

for P (network) I have. 1.  All code: Nothing
   1.2.  Zone - Intranet: LocalIntranet
      1.2.1.  All code: Same site Web
      1.2.2.  All code: Same directory FileIO - 'Read, PathDiscovery'
   1.6.  Url - P:\*: FullTrust (Exclusive)
   1.7.  Url - \\domain\staff\drives\ME\*: FullTrust (Exclusive)
   1.8.  Url - file://\\domain\staff\drives\ME\*: FullTrust (Exclusive)
   1.9.  Url - file://P:\*: FullTrust (Exclusive)

I am possibly missing the caspol command to set the appropriate permission on the network drive.   The main thing that is confusing me is the inconsistency of it. It's very frustrating, especially as the error messages don't seem to completely relate to the problem at hand.

I hope someone can help point out where I am going wrong.

Kind Regards,

David
0
Comment
Question by:Neogeta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35083780
Security changed quite a bit in 4.0, and I am still trying to get my head around the changes...

Security Changes in the .NET Framework 4
http://msdn.microsoft.com/en-us/library/dd233103.aspx

Starting with the .NET Framework 4, the common language runtime (CLR) is moving away from providing security policy for computers. Historically, the .NET Framework has provided code access security (CAS) policy as a mechanism to tightly control and configure the capabilities of managed code. Although CAS policy is powerful, it can be complicated and restrictive. Furthermore, CAS policy does not apply to native applications, so its security guarantees are limited. System administrators should look to operating system-level solutions such as Windows Software Restriction Policies (SRP) or AppLocker on Windows 7 and Windows Server 2008 R2 as a replacement for CAS policy. SRP and AppLocker policies provide simple trust mechanisms that apply to both managed and native code. As a security policy solution, SRP and AppLocker are simpler and provide better security guarantees than CAS.
0
 
LVL 1

Author Comment

by:Neogeta
ID: 35127143
Thanks for that bit of information.  I have set SRP to allow unrestricted access to the network path to no effect.

I've had to install VS2005 to update a project. I'm now getting the same error despite that it worked fine in winXP. Now on win7 Its not working and im getting same/simlar error messages that I've been getting on VS2010.
In light of this I've tried running VS2005 in XP compatability Mode and still getting the same error.

The client was unable to establish a connection because of an error during connection initialization process before login. Possible causes include the following:  the client tried to connect to an unsupported version of SQL Server; the server was too busy to accept new connections; or there was a resource limitation (insufficient memory or maximum allowed connections) on the server. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)

The error itself I think is a red hearing as the SQL Server is available, you can preview data through VS2005/2010 and SQLManagementStudio. Yet As soon as I move my projects to C: they work.

I'm at a complete loss on where the problem is.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 35129496
Do you have a strong-named assembly?  If not, you should try to strong-name the assembly, and apply trust that way.
0
 
LVL 1

Author Closing Comment

by:Neogeta
ID: 36179582
I've been having to live with this problem, my employer keeps dumping more work on me and I;ve not had an oppertunity to follow up.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question