[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

IIS hosted object and SQL Server connection

ajafry

8/5/2004 9:55:00 PM

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
1 Answer

Sam Santiago

8/6/2004 5:45:00 AM

0

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/se...

This might also be helpful:

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

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.SoftiTe...
_______________________________
"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