HelloWorld sample not working

Hi,

I've got the HelloWorld sample application working perfectly on one of my laptops. But today I tried to run it on a different laptop and it fails to run properly. Both laptops have similar installations (CSF Dev edition for XP) and use similar app.config and manifest.xml files.

After I press the "CreateSession" button I get a messagebox displaying a SOAPFaultException: Internal server error occurred. I tried to get more detailed exception information, but nothing was written to the event log and using the VS2005 debugger didn't help either.

Does anybody know how I can track this error?


Greetings,

Leon Zandman

[674 byte] By [Stringray] at [2008-2-18]
# 1

Hi Leon,

The best way to deal with these situations is to look into log files. You can enable logs for Session connector by setting Diagnostics\trace element's enabled attribute as 'true' in \Program Files\Microsoft CSF\V3.0\Connectors\Session\Web.config.

Enabling logging for Session connector helps you see all the incoming and outgoing traffic for CSF Session connector/component.

Also, you can enable logging for HelloWorld application, by setting microsoft.web.services3\Diagnostics\trace element's enabled attribute as 'true' in App.config. Enabling logging for HelloWorld application helps you log incomimg and outgoing Soap messages for HelloWorld application.

You can then have a look at the input and out put trace files to see the exact log messages for input and output.

Hope this helps.

Thanks,

Ashish Malhotra

AshishMalhotra at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...
# 2

Thanks for your reply, Ashish.

I've now enabled the tracing/logging for the Session connector. I've also set "detailedErrors" to "true". I now get two log files: Session_InputTrace.log and Session_OutputTrace.log. But unfortunately they still don't tell me what to do. It's just a bunch of XML.

I noticed the HelloWorld sample uses the Enterprise Library Logging block to send logging messages to the event log. I installed the Enterprise Library itself and ran the logging quickstart sample application and noticed it also doesn't write messages to the event log. So I think somehow my event log isn't correctly configured... Really weird...

Stringray at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...
# 3

I've reconfigured the Session connector's logging settings to log to a file instead of the event log. Now I'm finally able to see what goes wrong. Here's the log text:

-
Session OperationalEvent Error: 20000 : Timestamp: 9-10-2006 12:09:59
Message: An internal server error occurred. Your call was not processed. Contact the site administrator for details.
Error detail - System.Data.SqlClient.SqlException: Login failed for user 'Session-Service'. The user is not associated with a trusted SQL Server connection.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)

etc etc etc...

So I guess something is wrong with that "Session-Service" SQL-Server account...

Stringray at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...
# 4

And I solved it! Yes!

It turned out I had set my SQL Server 2005 to accept only Windows Authentication. When I changed it to Mixed Mode authentication the errors disappeared and the HelloWorld sample program now runs correctly. I'm still not getting any logging into the event log, but that's probably not CSF related.

The thing that bothers me is, that in the CSF 3.0 Planning and Deployment Guide it says the following (chapter "Installing SQL Server"):

"CSF requires authentication to be set to Windows Authentication." I guess that's a lie...

Stringray at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...
# 5
Stringray wrote:

The thing that bothers me is, that in the CSF 3.0 Planning and Deployment Guide it says the following (chapter "Installing SQL Server"):

"CSF requires authentication to be set to Windows Authentication." I guess that's a lie...

Can anybody comment on this?

Stringray at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...
# 6

I can't explain why CSF doesn't work in your orginal configuration. In my configuration everything works fine when SQL authentication is set to "Windows Authentication".

I know it's not much of a help, but now you know that CSF can be configured as it says in the manual

Best regards

Joachim Hoffmann

JoachimHoffmann at 2007-9-3 > top of Msdn Tech,Connected Services Framework,Connected Services Framework...