Monday, March 12, 2012

How to Handle Error Message: "Login failed for user (null). Reason: Not associated with a

I'm running WinXP and using "Visual Studio 2005". To make a long story short, my "Default.aspx" page is using a GridView to display data which is being read from a Windows 2000 DB server. When I run the app under the IDE all works fine.

I copied the 1 file and put it into my folder as, "C:\Inetpub\wwwroot\default.aspx". When it loads I receive the error message, "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."

I'm frustrated with Studio Express 05 and will not bother with it again until Microsoft fixes this deployment issue. Can any one PLEASE help me???As you surely understand, this is a question of Access Premissions. When you write "Windows 2000 DB server", do you actually mean SQL 2000 Server? Assigning permissions correctly to the '<machinename>\ASPNET' account can be a bit difficult to grasp sometimes. It would help if you described your exact setup (what is installed on which machine). Example:
- Asp.Net 2.0 version 2.xxxxxxxxxx installed on machine YYYY running OS Windows XP Pro with 'IIS X.X'
- SQL Server version XXXX running on machine ZZZZ running OS QQQQ.

swep wrote:

I'm frustrated with Studio Express 05 and will not bother with it again until Microsoft fixes this deployment issue. Can any one PLEASE help me???


Your error SCREAMS "bad/improper connection string", so i wouldn't be so quick to blame a "deployment issue"
Application created on (my machine):
- Asp.Net 2.0 version 2.0.50215.44 running OS Windows XP Pro SP 2 with 'IIS 5.1'

Accessing database on:
- SQL Server 2000 Enterprise Edition running OS Windows Server 2000.

I'm really stuck...Any help you can offer would be greatly appreciated.
You must put in a valid connection string, because that is what the error is telling you
http://www.connectionstrings.com

I'm really lost right now and need some expect advice. You mentioned in the ASP.NET forum,

"You must put in a valid connection string, because that is what the error is telling you"

If my connection string is wrong then why can I connect to the db server within Visual Web 2005 just fine? My web.config file contains my connection as,

add name="WebConnectionString" connectionString="Data Source=NAME OF SQL SERVER;Initial Catalog=NAME OF TABLE;"

Could it be that I created this in .net framework 2.0 and it is querying a database in the .net framework 1.1?

hello.

maybe the problem is related with the fact that the asp.net user hasn't enough permissions to access the database (you might not have faced this problem because when you use the internal server it'll use the credentials of the active user to process the request - this does not happen when you use IIS: in this case, i't use a specific account for accessing the db).

Labels: , , , , , , , , , , , , , , , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home