Re: IIS hosted object and SQL Server connection

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 08/06/04


Date: Thu, 5 Aug 2004 22:45:10 -0700

For an in depth discussion on .NET Remoting Security check out this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/secmod11.asp

This might also be helpful:

Trusted SQL Connections with ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;316989

Here's an excerpt:

"To resolve this issue, use any of the following methods:
  a.. Programmatically change the security context of the ASP.NET worker
process to a user who has the correct SQL Server permissions.

  -or-
  b.. Change the default configuration of ASP.NET so that the ASP.NET worker
process starts and runs under the context of a user who has the correct
permissions in SQL Server.

  -or-
  c.. Grant the correct permissions on SQL Server so that the aspnet_wp
account (or NetworkService account, for an application that runs on IIS 6.0)
has the appropriate access to the required resources."
Thanks,

Sam

-- 
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"Ali" <ajafry@gmail.com> wrote in message
news:d0c7dc86.0408051355.be66643@posting.google.com...
> Hi,
> Is it possible for an IIS hosted remote object to connect to a SQL
> server database using a trusted connection(SSPI?).
> When my remote objects try initiating a connection I get the following
> exception:
> -------Begin Exception text---------
> [.Net SqlClient Data Provider - System.Data.SqlClient.SqlException]
>         Login failed for user '(null)'. Reason: Not associated with a
> trusted SQL Server connection.
>            at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
> isInTransaction)
> -------End Exception text---------
>
> How can I associate a remote object with a trusted account?  What
> context are the remote objects running under?
>
> The virtual directory where my remote object is hosted only has
> Anonymous access checked.
>
> How can I get this to work?  I do not want to pass a username/password
> on every request to the remote object.
> If setting clear text password will solve my problem how can I do that
> while making a remote request?
>
> Thanks for your help.
>
> Ali


Relevant Pages

  • Logon failed for user (null)..... error
    ... Not associated with a trusted SQL ... The user has a SQL Server ...
    (microsoft.public.sqlserver.security)
  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... I moved every table I was able to move to the SQL ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... communication between ODBC (OLEDB and Native Client, ...
    (microsoft.public.sqlserver.connect)
  • It can be Done
    ... I just installed a 3 SQL Server 2005 instances on a 2 node Active/Passive cluster. ... IWiz will then offer you a choice of Group on where you can install teh Fail Over Clustered Instance of SQL. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Unable to Apply SP4 to SQL 2000 Cluster (new Node)
    ... Rebuild the node in the failover cluster. ... Scenario 1" in SQL Server 2000 Books Online. ... This setup process updates to SP4 only the binaries on the new ...
    (microsoft.public.sqlserver.clustering)
  • Re: WSS 3.0 question
    ... I followed the advise given in removing WSS 3.0 etc, ... the server is complaining that the SQL service(?) was tempered with or corrupt. ... I may just instal the SQL server as I was going eventuall use it anyway. ... If WSUS 3.0 is installed, I would suggest you uninstall it and then you install WSS 3.0. ...
    (microsoft.public.windows.server.sbs)