|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. - HelpIt is an asp.net application written in VB. It is very data heavy and makes multiple calls to a database. The application itself sits on an IIS6.0 server. And the database is on an SQL2000 server with SP 3a. On Tuesday we started getting an error when we tried to call up the application. It said: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The IIS server settings for the application are set to Windows Authentication only The web.config setting are as follows: <identity impersonate="true" /> <authentication mode="Windows" /> <deny users="?" /> <!-- Allow all users --> <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" /> And the connection string is: "data source=myserver;initial catalog=myDatabase;Integrated Security=true" I thought I was fine, I thought that I had a trusted connection set up between the IIS server and the SQl server. Am I missing something here? I think I have tried almost everything I have read about. Anybody have any ideas? Thanks for your help. Hi,
I had this similar problem in the past.....Is your IIS Server and Database on the SAME BOX or different? If its on a different box, does your SQL Server has the WINDOWS ACCOUNT USER that your IIS Server is CURRENTLY LOG ON AS? Also, try this: Configuring IIS to use with TRUSTED_CONNECTION ONLY: 1) Open IIS (Open up Control Panel/Administrative Tools/ Internet Information Services) 2) In IIS, expand the Local Computer Tree/Web Site/Default Web Site 3) Once the Default Web Site Tree has been expanded, you will see a list of all your applications 4) Right Click Internet Information Services on A Specific Application that you want to configure , select properties, go to the Directory Secuirty Tab at the top, click on the Edit Button under Anonymous access and authentication control, make sure that ONLY Integrated Windows Authentication is Check, and select OK. 5) Close IIS. 6) In your web application, open up the Web.config File 7) Find the following tag in your file: <authentication mode="Windows" /> 8) Add the tag <identity impersonate="true" /> below <authentication mode="Windows" /> 9) Your Web.config should how look like this: .. . . <authentication mode="Windows" /> <identity impersonate="true" /> .. . . You must make sure that SQL Server has the Same Windows User Account that IIS is under, ie, the same windows user account you use when you "LOGGED ON" to your OS. Let me know how it turns out. |
|||||||||||||||||||||||