Visual Studio 2008 and Windows 7 RRS feed

  • Question

  • Hi There

    I've just recently obtained a nice shiny new machine with Windows 7 Enterprise and have had my installation of Visual Studio 2008 Professional installed on it.

    This went without issues, there seems to be a problem with debugging a project located on a network drive that has database connections. When I run the project and run the routine to connect to database and get data, I get the message stating that the remote server cannot be contacted. When I run the project from a local drive, this does not happen and the project runs as expected.

    I think that this has something to do with trust, I have used CASPOL.exe to try and configure this, but it has not worked, these are the commands I have used:

    caspol.exe -m -pp off -ag 1 -url "file:///<MAPPED_HOME_DRIVE>:/*" FullTrust
    caspol.exe -m -pp off -ag 1 -url "file:///<MAPPED_SHARED_DRIVE>:/*" FullTrust

    CasPol.exe -m -ag 1.2 -url file:///<MAPPED_HOME_DRIVE>:/* FullTrust
    CasPol.exe -m -ag 1.2 -url file:///<MAPPED_SHARED_DRIVE>:/* FullTrust

    CasPol.exe -m -ag 1.2 -url file://<UNC_TO_HOME_DRIVE>/* FullTrust
    CasPol.exe -m -ag 1.2 -url file://<UNC_TO_SHARED_DRIVE>/* FullTrust

    Where <MAPPED_HOME_DRIVE> and <MAPPED_SHARED_DRIVE> relate to a letter
    Where <UNC_TO_HOME_DRIVE> and <UNC_TO_SHARED_DRIVE> relate to a fully qualified UNC Path

    This is not a database server configuration issue, as when I run the project from a local drive, its runs OK, and when I build the application and deploy, the application runs OK as well. For reference, the application/project connects to a Oracle 11g database and SQL Server 2008 database.

    Can anyone offer any guidance on this?

    Monday, August 6, 2012 11:07 AM


All replies

  • Hi Toastmax,

    Thanks for your post.

    Does the database a local database or remote server database? 

    What's your detail error message?

    Additionally, could you please refer to this page http://msdn.microsoft.com/en-us/library/bt727f1t(v=vs.90).aspx

    "To enable remote debugging, you can do one of two things:

    Install the Remote Debugging Monitor (msvsmon.exe) on the remote computer and start it when you begin debugging.

    Run the Remote Debugging Monitor remotely from a share.

    Running the Remote Debugging Monitor from a file share is the easiest way to enable remote debugging. Visual Studio installs msvsmon.exe into these directories: 


    Best regards,

    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, August 7, 2012 8:05 AM
  • Hi

    Thanks for looking at this.

    This error is:


    "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"

    As stated before this happens when I run the project from a network drive, when I run from a local drive, this error does not occur. Its not a database server configuration as I have other applications using the same database and they all run fine.

    On my previous machine, which was a Windows XP, I could run the projects from the network location with no errors, which leads me
    to believe that it is a PC configuration issue.

    Tuesday, August 7, 2012 8:16 AM
  • Hi Toastmax,

    After a research of the exception http://msdn.microsoft.com/en-us/library/24xy33d0(v=vs.90).aspx

    This exception is thrown whenever the .NET Framework Data Provider for SQL Server encounters an error generated by the server.

    You may need to change your project setting for this connecting problem.

    From your description, your Visual Studio installed without problem. This forum is not a dev forum so I may have to redirect you to the right forum.

    What's your project type and programming language?


    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, August 7, 2012 8:52 AM