Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Solution not able to access network resources from network drive

Posted on 2011-03-08
4
Medium Priority
?
382 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

719 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