1

I'm working on a project with a couple of my friends on Windows Azure using ServiceStack to create a RESTful API for our service. We're using SQLAzure to save spatial data provided by the users, and then our service queries the DB, performs some calculations, and then returns a location or index. I'm suing a library my colleague wrote to communicate with the DB. Configuration settings are stored in Web.config. When I test the service locally and on the Azure emulator, everything works fine, but once our code is uploaded and running it keeps throwing exceptions whenever it tries to connect to our SQLAzure server. Are there any special configuration setting I need to include for the instance to be able to connect? I already added the local services exception to the firewall rules.

7
  • What do the exceptions look like? Commented Apr 20, 2012 at 9:43
  • Have you tested running locally in the emulator and pointing at SQL Azure as opposed to a local SQL Server instance? Commented Apr 20, 2012 at 9:44
  • Yes, I tested it locally, and it works just fine. Commented Apr 20, 2012 at 10:33
  • As for the exceptions, I'm fairly new to Azure and ServiceStack, and I don't know exactly how to see the exceptions. I pin-pointed the problem down to the methods that call the database, so it must be a connection problem. ServiceStack theoretically should return through the response package any exception thrown, but in my case it just returns 0 for normal input. However, if I give it malformed data, it returns the exception as it is supposed to do. Commented Apr 20, 2012 at 10:38
  • 1
    I'm wondering if its a ServiceStack issues, logging in via RDP might give you a better indication. Have you set the ServiceStack DLL's to copy local true when you deployed it? My assumption is that your deployment is missing something that your local machine has and it has nothing to do with the connection string and all to do with ServiceStack. (Is it supported on Azure?) Commented Apr 20, 2012 at 11:57

1 Answer 1

1

One thing that caught me out before was with 'web config transform', I was updating my web.config connection string but not the web.config transform for release mode, that one took me a full day to diagnose, painful!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.