RE: Plaese help a newbie with data access



I assume that the IIS is set up to use Windows Authentication (with anonymous
access disabled) for your web application.

In order to allow asp.net to use the Windows credentials when connecting to
your (local) SQL Server, you need to enable delegation by adding the
following line to the web.config file (in the system.web section):

<identity impersonate="true"/>

This will not suffice if the web server and SQL Server are on different
machines since you will then run into all kinds of delegation issues, but for
your case it should work.

HTH, Jakob.


"UKDeluded" wrote:

> Okay, I'm new to .NET development. I need to build a simple tool web based to
> display a data set from a SQL2000 database.
>
> When I create the connection and test it, it works fine. I build the page,
> test it and get denied access to the database (ASP error) because user is
> 'NULL'.
>
> The IIS and SQL are on the same server. We also run Sharepoint and that
> recognises the user from the wondows logon. The web application should take
> the user information from the Windows logon and authenticate on the SQL using
> that. The issue does not appear to be caused by the user not having rights
> but that the user information is not sent though.
>
> I've had a search around and someone mentioned firewall but that doesn't
> apply in this case.
>
> Thanks all!!!
.



Relevant Pages

  • Re: asp.net sql trusted connections between machines
    ... > connect to a remote SQL Server instance w/ Read-Write permissions. ... > connection string in the web.config. ... > Windows Authentication setting for access via IIS doesn't seem pass the ... is this impersonation behavior with IIS and Windows Authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Windows Authentication with IIS on separate machines
    ... Yes, setting Basic Authentication in IIS works, but the ... >in SQL server but doesn't work if user account was ... >imported from a Windows account. ...
    (microsoft.public.sqlserver.security)
  • Re: Help please to authenticate Windows users
    ... status error code as well as Win32 error code -- I know the HTTP status code ... Windows Authentication automatically works if the machines are joined to the ... Is VS.Net on the same machine as IIS ...
    (microsoft.public.inetserver.iis.security)
  • Re: Windows security
    ... sp_change_users_password only works with SQL Server ... Authentication, not Windows Authentication. ... > Windows NT environment but still have entries in the Microsoft SQL Server ...
    (microsoft.public.sqlserver.security)
  • Re: Very basic login question
    ... Both computers are NOT members of a domain. ... In order to use Windows Authentication the two computers have to be ... you should have a login at the SQL Server on the XP Pro ...
    (microsoft.public.sqlserver.security)