Hi Brett,
As Alexey has mentioned, the problem you encounter is likely due to the
current IIS worker process account(Network Service) doesn't have permission
to access the remote SQL server instance. Though your ASP.NET application
is using forms authentication, it will use windows authentication when try
accessing the sql datdabase(on remote machine) when query the database for
authentication validating. I think on your development environment, the
worker process account have enough permission to access the backend
database.
As Alexey also recommend, you can try granting your network service account
the permission to the remote SQL server instance. Or you can consider grant
a group membership to that account(should be a domain group) which also
apply to the remote SQL machine and have permission to access the certain
SQL database.
Here is a security guideline article for ASP.NET:
#Security Guidelines: ASP.NET 2.0
http://msdn.microsoft.com/en-us/libr...lines0001_data
access
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Brett" <br*****@newsgroup.nospam>
Subject: Login failed for user '(null)'
Date: Fri, 29 Aug 2008 15:54:14 -0400
>
I have an ASP.NET 2.0 application that uses Forms Authentication. The
startup page contains just a login control, and the site works well on an
IIS 6 web server. I am now setting the site up on the production web
server, which runs Windows 2008 Server and IIS 7. The login page comes
up,
>but when I try to log in, I get the error, "Login failed for user
'(null)'.
>Reason: Not associated with a trusted SQL Server connection." For
debugging
>purposes, the Windows identity is displayed on the login page, and it is
"NT
>Authority\Network Service". Anonymous authentication is enabled and uses
the application pool identity (NetworkService.) Impersonation is enabled
and uses the authenticated user's identity. NT Authority\Network Service
has been granted full permissions to the application database, as well as
the ASP.NET membership database on SQL Server. (The SQL Server resides on
a
>different machine from the web server.) The connection strings section of
web.config is as follows:
<clear/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=Jupiter;Initial
Catalog=aspnetdb;Integrated Security=true"
providerName="System.Data.SqlClient"/>
<add name="SMS_ConnString" connectionString="Data Source=Jupiter;Initial
Catalog=SMS;Integrated Security=true"
providerName="System.Data.SqlClient"/>
>
Does anyone know what might be causing the "login failed" of how I can
debug
>this problem?
Thanks in advance,
Brett