CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    25

    [RESOLVED] Unable to connect to database when running via mapped drive

    I've got a weird problem, it's probably related to the way Windows manages security.

    I have an application that connects to a mysql database. If the exe file is copied to a computer and run it connects to the database fine. If I put the exe on a shared folder on the network and try and run it, then I get an error that it cannot connect to the database.

    This is with only 1 user accessing the exe, it's not in use by anyone else.

    I'm using the mysql connector/net.

    Has anyone encountered this before?

    Any suggestions to overcome it?

  2. #2
    Join Date
    May 2003
    Location
    Germany
    Posts
    936

    Re: Unable to connect to database when running via mapped drive

    You can not run a .NET application from a network folder by default. The security policies from .NET prevent it. So you have to copy the application to a local folder or you have to reconfigure the security policies. You will find the right options under Code Access Security Policy.
    Useful or not? Rate my posting. Thanks.

  3. #3
    Join Date
    Oct 2007
    Posts
    25

    Re: Unable to connect to database when running via mapped drive

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured