Results 1 to 4 of 4

Thread: [RESOLVED] Connection String Problem

  1. #1

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    Resolved [RESOLVED] Connection String Problem

    Never entirely sure if these questions belong in Database forum or the language it's written in but....

    I've never had this error before and for the life of me can't fix it. The error is
    Code:
    Additional information: Request for the permission of type 
    System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
    and my connection string is
    Code:
    "Server=mh3-
    sqlrpt01;Database=Sales_Campaign;User 
    ID=SCUser;Password=******;Trusted_Connection=False"
    I've also tried
    Code:
    "Server=mh3-sqlrpt01;Password=******;Persist 
    Security Info=False;User ID=SCUser;Database=Sales_Campaign"
    but both give the same error.

    Any help greatly appreciated as I'm stuck at this point and can't get any further.
    Last edited by Hack; Feb 23rd, 2006 at 12:57 PM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Connection String Problem

    Are you performing your database calls in an external class library?

  3. #3
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    Re: Connection String Problem

    That would be code access security. I'm assuming you're using a web application? If so, it's probably running under a trust level below full. Have a look at http://msdn.microsoft.com/library/de...l/THCMCh08.asp - should help you resolve the problem.

  4. #4

    Thread Starter
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    Re: Connection String Problem

    It was in an external class and it's not a web app it's a console app.

    Cheers for info axion_sa although not exactly the same thing it pointed me in the right direction and i managed to get it working by messing around with the secruity levels in the code groups.

    Not entirely clear why yet though but it was at a clients company and who knows how their systems are set up (the system admins there certainly didn't).

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