StrataFrame Forum

Unhandled Exception

http://forum.strataframe.net/Topic7503.aspx

By Larry Caylor - 3/15/2007

I’ve got the ES server set up on Windows Server 2003 Web Edition with SP1. I’m able to access the ES status page but when it try to run a client application I get the following exception. Any suggestions on what I may have missed?

-Larry

 

By Trent L. Taylor - 3/15/2007

This generally occurs when the pre-shared key is not the same on both the server and the client.  If you go to the server status page, make sure that you are initializing the client connection with the same key.


    '-- Establish Locals
    Dim loESDS As MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem

    '-- Create the Enterprise Server data source item
    loESDS = New Enterprise.EnterpriseDataSourceItem("", "My.Host.Name", 80, "", New SqlDataSourceItem(""))

    '-- Set the encryption and compression properties.  Refer to the documentation for more
    '   information about these settings.
    loESDS.IsEncrypted = True
    loESDS.EncryptionKey = New Byte() {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}
    loESDS.EncryptionVector = New Byte() {1, 2,3,4,5,6,7,8}
    loESDS.IsCompressed = True

    '-- Manually add the ES data source
    DataBasics.DataSources.Add(loESDS)

When you get the message "Bad Data" it means that the server and the client connection are not talking with the same handshake.  You can also get this message when you add a license file and do not restart the application pool (just restarting IIS will restart the pool also). 

 

By Larry Caylor - 3/15/2007

I checked the keys and they match. I also tried setting the client and server to IsEncryped = False and IsCompressed = False and received the same error.  I’ve installed ES under the server’s default website. The hostname in the server license is“my.host.name” while it’s “my.host.name/StrataFrameES” in the EnterpriseDataSourceItem. Would this make a difference? I’ve made sure to restart IIS after any changes.

By Trent L. Taylor - 3/15/2007

Would this make a difference?

Yes.  Since the hostname is part of the license file then the host name provided must match what is shown in the Server Status page under Server Hostname.

By Larry Caylor - 3/15/2007

When I think of host name I think of the server host name, not the DNS name of the website. Anyway I’ve got that fixed and now I’m getting timeout errors. The only thing I can think of is the connection string in the data source which looks okay. I dropped a plain old client/server SF application on the ES server and it can connect to the database server so I know the DB server is reachable from the ES server. What next?

By StrataFrame Team - 3/15/2007

What exactly is the timeout error?  Is it wrapped in an exception that was thrown by the ES itself and sent back over, or is it an HTTP timeout exception?
By Larry Caylor - 3/15/2007

This is what comes back after a long wait.

By StrataFrame Team - 3/16/2007

hrm... that could mean that either the enterprise server itself it timing out against SQL Server, or your EnterpriseDataSourceItem is not reaching the enterprise server.  Put Timeout=10; on the end of your SQL Server connection string within the ES configuration and if you get a different response after only 10 seconds, then you'll know that the ES cannot reach SQL Server.  However, if it still takes 30 seconds to come back, and you get the same message, then your client cannot reach the ES.
By Larry Caylor - 3/16/2007

Ben,

Thanks for the timeout hint… It’s working nowSmile  It turned out that it was the client that couldn’t reach the ES server because of a configuration error in the host header value in IIS. I was spinning my wheels trying to figure what could be preventing the ES server from seeing the SQL server.  

-Larry 

By Trent L. Taylor - 3/16/2007

Great!  Glad you got it going!