CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Israel
    Posts
    76

    SQL Server in WebApp

    Hellow everybody

    I have connection problem in Web Application with SQL Server.
    I created sqlConnection, sqlDataAdapter, dataset with Designer.
    I tested connection and data fill with Designer and it's okey.
    But when I run the application exception is throwed on code line :

    adapter.Fill(dataset)

    Exception message is 'SqlException: Login failed for user 'STATION\ASPNET''

    What is the problem and how to solve it ? Are there forums on SQL Server
    in internet ?

    Thank you

  2. #2
    Join Date
    Sep 2001
    Location
    San Diego
    Posts
    2,147

    Re: SQL Server in WebApp

    As you know, both SQL Server and ASP.NET are both very security conscious.

    As such, you need to define the ASP.NET username as a valid login account inside SQL Server (as the release notes probably indicated).

    To do this, you can simply create a login with access to the databases you're working on inside SQL Server assigned to the domain\user for your ASP.NET account, which from your comments is STATION\ASPNET (station being your domain name I assume).

    If you check the authentication settings of your ASP.NET application (inside web.config), you can also use another login if you like. This would be an impersonation type of login. Again this login would need access to the database too. It is this file that controls your user login account being used and also the type of authentication being used while the application runs.

    Hope this helps,

    - Nigel

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