Hello everyone,
I am currently developing a web application that retrieves and updates contact information in a database. I am coding the application with VB.Net and ASP.Net with a little bit of javascript. It is accessing a SQL Server Database.
Everything is working fine when I run the web application from within the VS.Net environment. However after publishing the website to our local Intranet (where the app will be stored) I get the following error:
Server Error in '/ollodev1/RIC' Application.
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.
Exception Details:System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Source Error:
An unhandled exception was generated during the execution of thecurrent web request. Information regarding the origin and location ofthe exception can be identified using the exception stack trace below.
I assume that this message appears because I am not retrieving setting the proper access rights from the DB but I don't know how to go about doing this. Could someone provide me with a link to a few examples to help resolve my issue?
Thanks,
Eric
Also, I've been testing to resolve the matter and I assume it is because of this.
When I added the line of: label1.text = Request.Servervariables("AUTH_USER")
it shows: domain1\<winnt id>
But when I published the website to our intranet:
The label is blanked...
I'm trying to add as much info as possible.
Thanks again
The Null user error is related to your SQL Server installed with Windows Authentication and your application connecting to SQL Server with SQL Server authentication, you can solve this by changing SQL Server to mixed authentication. That is covered in the link below.
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Asp.net account in IIS5 that is Win2k and XP, and Network service account in Win2003 needs permissions in SQL Server, there are two permissions in SQL Server the server permissions in the security section under management in Management Studio and the database permissions in the new security section within the database in Management Studio. When you have finished creating the permissions adjust your Web.Config as in the link below. Hope this helps.
http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx
No comments:
Post a Comment