Ton_upload + twurl




I have a site that invokes the Ruby ton_upload script via C# .NET managed code which is fine during development, when deployed however I receive a strange error:

Your ~/.twurlrc could not be found. Please install and setup twurl then try again:

gem install twurl
twurl authorize --consumer-key key --consumer-secret secret

What is strange is Twurl has already been authorized on the target web server. Ruby and the respective dev kit naturally exist.

If I debug through the exact same code in Visual Studio, it executes successfully.

Any ideas?

Is there a .NET offering that provides the same functionality as the ton_upload script?



Are you sure that the .twurlrc file was also copied to the server as part of your deployment script? It may have been hidden and/or not picked up by whatever script copies files so that is the first thing I would check. This is the file that contains your consumer and secret keys and should normally be kept in a secure manner - some implementations actually prefer to not store this file on a shared server because of the sensitivity of the content. (To do that you would have to, as you say, implement a custom C# implementation though and retrieve the keys from a secure store)

We are not currently tracking a complete C# SDK solution and since there are no plans to build one in the short term we would actively encourage the community to rally around a solution.

Let us know if you are still having trouble, but if the file is there and in the right place this particular error should go away.


Hi, thanks for replying.

I’m sure .twurlc was copied as I have a development environment on the cloud server also (Visual Studio) and when I debug from the cloud server it runs successfully as I step through the code.

The site is deployed to IIS and when I browse to the deployed site over the web, that’s when my logging framework identifies this issue.

I am currently wondering if that because I am logged in as an Administrator to the cloud server it somehow has “access” to the .twurlc file whereas general users coming in over the web in .NET are given a generic IIS_USER account. I’m going to check this aspect of things out as well as double checking TWURL configs via the command prompt and will feedback.