My Windows application connects fine to the Sql Server I have on my machine but the same code in a Web Application does not. Here is the code in the Windows App and the Web App.


Dim objConnection As New SqlClient.SqlConnection ("Server=Elliot;Initial catalog=Pubs;Integrated Security=true")

objConnection.Open()


Here is the error message I get when running the Web App.

Login failed for user 'ELLIOT\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'ELLIOT\ASPNET'.

Source Error:


Line 21:
Line 22: Dim objConnection As New SqlClient.SqlConnection("Server=Elliot;Initial catalog=Pubs;Integrated Security=true")
Line 23: objConnection.Open()


Any help would be much appreciated.

Thanks,
Elliot