Security for Visual Studio.Net

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Security for Visual Studio.Net

    I installed VS.NET 2003 on an XP/Pro Client. Also, MSDE 2000A.
    This configuration works fine.

    When I attempt to use another SQL Server on another machine I get one of two
    messages:

    1) Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    Server connection. (If I used Windows NT Integrated Security)
    the connection string is: workstation id=FERRING;packet size=4096;user
    id=sa;data source=TRURO;persist security info=False;initial catalog=pubs
    or
    2) Login failed for user 'sa'. (If I used SQL security)
    the connection string is: workstation id=FERRING;packet size=4096;integrated
    security=SSPI;data source=TRURO;persist security info=False;initial
    catalog=pubs

    The SQL Server I am trying to access is on Win2K/SP4 and has the .Net 1.1
    Framework installed.
    The server is PDC of a domain. The security mode of the SQL Server is set to
    Mixed Mode.

    The XP/Pro client is not a member of the domain but is a member of a
    workgroup.

    I have tried giving permissions to IUSR_FERRING and IWAM_FERRING in Active
    Directory on TRURO and then mapped these to SQL Server logins/users. No
    improvement,

    I also create an ASPNET account on TRURO and gave it appropriate SQL
    permissions but also no improvement.

    This is driving me nuts. Can anyone point me in the right direction?

    Thank you

    /Bob


    Robert D. Pinkerton Guest

  2. Similar Questions and Discussions

    1. DW8 to Visual Studio
      I would like to get my DW8 asp.NET pages to open up in Visual Studio 2003. I have some co workers that need to do some work as well..... I have...
    2. Visual studio?
      Not that i dont like the flex ide, but i'd much rather use visual studio? has anyone found a plug in or tried to intergrade into vs.net yet?
    3. Visual Studio Tools for Office 2003 and Security
      Has anybody any experience in using Visual Studio Tools for Office 2003? I'm having a problem with security settings on a Word document that I'm...
    4. Visual Studio .Net
      You may need to repair your IIS mappings. To do this, run the following command: aspnet_regiis.exe -i Here's further information:...
    5. Visual Studio.NET and PHP
      Hello, Does anyone have an idea how to integrate PHP into Visual Studio .NET 2003. Thanks, Albert Ahtenberg
  3. #2

    Default Re: Security for Visual Studio.Net

    Hi,

    I assume you have your connection strings mixed up in this post, because the
    first one is attempting to use an SQL Server login ID (and you getting a
    Windows login failure), and the second connection string is attempting to
    use Windows authentication, and you are getting an error relating to using
    an SQL Server login.

    If you want to use Windows Integrated Authentication
    -and-
    You are running the webpages (or VS.NET) on your Windows XP Machine
    -and-
    You want to connect to a remote SQL Server
    -then-
    You will be need to be running the webpage or VS.NET in the user context of
    an account that can login to SQL Server. It is the current user context on
    *your* machine that is attempting to login to SQL Server on the remote
    machine. If you're running your ASP.NET pages as Machine\ASPNET, then you'll
    see a logon failure for user "Null" because Machine\ASPNET is local to your
    WinXP machine, and can't be assigned permissions to remote resources


    If you want to use SQL Server Authentication, then I suggest:
    a) you do not use the "sa" account - you should be using a least privilege
    account
    -and-
    b) you need to supply an appropriate password. There is no password in your
    connection string. Running SQL Server as "sa" with no password is the
    dumbest thing I can think of. That's just asking to be hacked. It appears
    that the remote SQL Server has a password on the "sa" account, hence your
    login failure.

    Cheers
    Ken

    "Robert D. Pinkerton" <bob@somehopesymantry.com> wrote in message
    news:eFTJGI$TEHA.1260@TK2MSFTNGP11.phx.gbl...
    : I installed VS.NET 2003 on an XP/Pro Client. Also, MSDE 2000A.
    : This configuration works fine.
    :
    : When I attempt to use another SQL Server on another machine I get one of
    two
    : messages:
    :
    : 1) Login failed for user '(null)'. Reason: Not associated with a trusted
    SQL
    : Server connection. (If I used Windows NT Integrated Security)
    : the connection string is: workstation id=FERRING;packet size=4096;user
    : id=sa;data source=TRURO;persist security info=False;initial catalog=pubs
    : or
    : 2) Login failed for user 'sa'. (If I used SQL security)
    : the connection string is: workstation id=FERRING;packet
    size=4096;integrated
    : security=SSPI;data source=TRURO;persist security info=False;initial
    : catalog=pubs
    :
    : The SQL Server I am trying to access is on Win2K/SP4 and has the .Net 1.1
    : Framework installed.
    : The server is PDC of a domain. The security mode of the SQL Server is set
    to
    : Mixed Mode.
    :
    : The XP/Pro client is not a member of the domain but is a member of a
    : workgroup.
    :
    : I have tried giving permissions to IUSR_FERRING and IWAM_FERRING in Active
    : Directory on TRURO and then mapped these to SQL Server logins/users. No
    : improvement,
    :
    : I also create an ASPNET account on TRURO and gave it appropriate SQL
    : permissions but also no improvement.
    :
    : This is driving me nuts. Can anyone point me in the right direction?
    :
    : Thank you
    :
    : /Bob
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: Security for Visual Studio.Net

    Thanks, Ken. I did, in fact, document the errors/connection strings in
    reverse.
    The sa account does have a password and I forgot to include that in the
    connection string.
    Adding the password fixed my problem.
    Point taken about using a less privileged account for SQL Server access.
    Security is a little sloppy around here because this is a closed Intranet
    behind a firewall (and a 2-person company).

    Thanks for your sage advice.

    /Bob
    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:%23$cjViSUEHA.1952@TK2MSFTNGP12.phx.gbl...
    > Hi,
    >
    > I assume you have your connection strings mixed up in this post, because
    the
    > first one is attempting to use an SQL Server login ID (and you getting a
    > Windows login failure), and the second connection string is attempting to
    > use Windows authentication, and you are getting an error relating to using
    > an SQL Server login.
    >
    > If you want to use Windows Integrated Authentication
    > -and-
    > You are running the webpages (or VS.NET) on your Windows XP Machine
    > -and-
    > You want to connect to a remote SQL Server
    > -then-
    > You will be need to be running the webpage or VS.NET in the user context
    of
    > an account that can login to SQL Server. It is the current user context on
    > *your* machine that is attempting to login to SQL Server on the remote
    > machine. If you're running your ASP.NET pages as Machine\ASPNET, then
    you'll
    > see a logon failure for user "Null" because Machine\ASPNET is local to
    your
    > WinXP machine, and can't be assigned permissions to remote resources
    >
    >
    > If you want to use SQL Server Authentication, then I suggest:
    > a) you do not use the "sa" account - you should be using a least privilege
    > account
    > -and-
    > b) you need to supply an appropriate password. There is no password in
    your
    > connection string. Running SQL Server as "sa" with no password is the
    > dumbest thing I can think of. That's just asking to be hacked. It appears
    > that the remote SQL Server has a password on the "sa" account, hence your
    > login failure.
    >
    > Cheers
    > Ken
    >
    > "Robert D. Pinkerton" <bob@somehopesymantry.com> wrote in message
    > news:eFTJGI$TEHA.1260@TK2MSFTNGP11.phx.gbl...
    > : I installed VS.NET 2003 on an XP/Pro Client. Also, MSDE 2000A.
    > : This configuration works fine.
    > :
    > : When I attempt to use another SQL Server on another machine I get one of
    > two
    > : messages:
    > :
    > : 1) Login failed for user '(null)'. Reason: Not associated with a trusted
    > SQL
    > : Server connection. (If I used Windows NT Integrated Security)
    > : the connection string is: workstation id=FERRING;packet size=4096;user
    > : id=sa;data source=TRURO;persist security info=False;initial catalog=pubs
    > : or
    > : 2) Login failed for user 'sa'. (If I used SQL security)
    > : the connection string is: workstation id=FERRING;packet
    > size=4096;integrated
    > : security=SSPI;data source=TRURO;persist security info=False;initial
    > : catalog=pubs
    > :
    > : The SQL Server I am trying to access is on Win2K/SP4 and has the .Net
    1.1
    > : Framework installed.
    > : The server is PDC of a domain. The security mode of the SQL Server is
    set
    > to
    > : Mixed Mode.
    > :
    > : The XP/Pro client is not a member of the domain but is a member of a
    > : workgroup.
    > :
    > : I have tried giving permissions to IUSR_FERRING and IWAM_FERRING in
    Active
    > : Directory on TRURO and then mapped these to SQL Server logins/users. No
    > : improvement,
    > :
    > : I also create an ASPNET account on TRURO and gave it appropriate SQL
    > : permissions but also no improvement.
    > :
    > : This is driving me nuts. Can anyone point me in the right direction?
    > :
    > : Thank you
    > :
    > : /Bob
    > :
    > :
    >
    >

    Robert D. Pinkerton Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139