IT HIT WebDav server - is a local.webdav.json supported? - ithit-webdav-server

Setup: webdav server with files stored in SQL server.
Goal: to locally override the connection string during development and not affect the git repository.
Issue: webdav uses a file called appsettings.webdav.json to specify the license, connection string to SQL and a few other params.
Ideally we could add an appsettings.local.webdav.json and set this one on gitignore. The master version remains generic in git, while the local version overrides the connection string.
We tried injecting it in Program.cs and Startup.cs without success.
Is such a setup even supported?
Thank you!

Related

why after deploying mvc app to azure tables not created?

I use code first and the app works well on a local database which was generated.
But when I deploy to Azure, although it succeeds, the tables are not created, just the empty database.
I excluded the local app_data folder and chose to run code first migrations
in the deployment options.
Any tips what's wrong?
Have you configured Azure deployment to replace connection strings (via the publishing wizard) or are you using environmental variables in your code? It doesn't sound like it. It sounds like you deployed with localdb which does not work in Azure.
You need to either (there are more options, but these are easy to implement):
Configure your deployment process to update your web.config with your SQL Azure connection string (you can use config transformations or deplyment wizard)
Use Azure environmental variables to be used automatically when running in Azure and local variables when locally

How to configure P4Ant Tasks to use ssl port

We use a few P4Ant tasks to commit code to our perforce depots from within an Ant task. This has been working fine for months, however we recently changed our perforce server to only accept trusted/ssl connections.
As such, our new P4 port now looks like ssl:server_hostname:port and we’re getting an error when running our Ant task: non-numeric Perforce server port specifier: p4java://ssl:server_hostname:port .
From the P4Java api (which P4Ant uses under the hood), it seems that the connection should have looked like: p4javassl://server_hostname:port
Does the P4Ant library support SSL perforce ports? If so, how can I configure it to pass this port properly to p4java.
Regarding P4Ant and SSL, not as downloaded because it is bundled with a pre-2012.1 P4Java version. SSL support was added for P4Java versions 2012.1 and forward as noted in the release notes:
http://www.perforce.com/perforce/doc.current/user/p4javanotes.txt
It should work by using (replacing) the p4java.jar with the latest version.
See the following Knowledge Base article:
http://answers.perforce.com/articles/KB_Article/P4Ant--SSL-p4d
Also, you can check this article regarding your java installation in case you may also need the following:
http://answers.perforce.com/articles/KB_Article/Using-P4Java-and-P4Eclipse-with-SSL-enabled-Perforce-Servers

RoR app deployed on Heroku and working with SQL Server database

Is it feasible to have a Ruby on Rails app, which is:
a) deployed on Heroku, and
b) working with a remote SQL Server database?
I take it that I'll need unixODBC installed on Heroku, but I cannot find a way to do so. Is this possible?
Or, is there any other way (without ODBC?) to accomplish this?
Thank you very much for any guidance or tip.
Updated:
Some info on the subject:
1) Heroku pre-installs both unixODBC and FreeTDS by default, so you already have them.
2) Also, it is possible to run shell commands via Heroku Console in backticks, e.g.:
heroku console
`odbcinst`
(runs "odbcinst" command in Heroku shell and shows the result)
3) You do not have access to filesystem outside of your slice where the packages are installed. If you only need a driver path, Heroku support can provide it (/usr/lib/odbc/libtdsodbc.so in my case).
4) You cannot run sudo commands in Heroku shell.
At the moment, to connect to MS SQL Server you at least need to append ‘freetds.conf’ file. Even when using tinyTDS (there is an open ticket#2 in tinyTDS gitgub issue page). DSN-less connection instructions from "wiki.rubyonrails.org SLASH database-support SLASH ms-sql" didn’t work for me, I guess this connection requires some extra-configuration either.
‘freetds.conf’ cannot be modified without sudo. Therefore, I conclude that currently there is no way to make MS SQL and Heroku work together.
I’ve managed to set up this connection with EngineYard and activerecord-sqlserver-adapter.
I followed these instructions:
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation---Ubuntu
(there are only some filepath differences, e.g. ‘odbc.ini’ is located in ‘/etc/unicodbc’, not in ‘/etc’ - this is easy to work out).
I installed 'unixODBC' and 'freetds' packages using EY Unix Packages feature, and made all configurations manually through SSH. Sudo is available in EY (no password required). There is also Chef Recepes feature to automate those configurations (seems to be pretty easy, I'm going to try it tomorrow).
Hope this is helpful.
It is possible.
Because Heroku copies/symlinks its own config/database.yml over whatever you supply in your repository, you may need to take additional steps (e.g. in config/environments/production.rb or in config/initializers/remote_mssql_from_heroku.rb) to set up your application appropriately.
You will face the challenge, however, that traffic from Heroku to your MSSQL database will traverse the public internet. By default, this traffic will not be encrypted. Potentially everyone in the world will be able to monitor your traffic between your Heroku application and your database, and even alter the traffic in-flight, whether for benign or malicious purpose, without you being able to detect it. MS SQL offers the capability to connect over SSL. This capability requires explicit configuration in the MSSQL server, so you must be able to access and modify that configuration. Additionally, this configuration requires that your client library be up-to-date and capable of talking with MSSQL over SSL. Note that MSSQL server will enforce that your server certificate list a Common Name or Subject Alternative Name exactly matching or wildcard-matching the server's FQDN (at least, the FQDN that the server knows about), and that the client use an FQDN for the server exactly matching or wildcard-matching one of the names on the certificate.
I've successfully used the following article which uses Heroku's newer buildpack feature to use TinyTDS and connect remotely to SQL Server 2008 R2. I'm still investigating how I could encrypt traffic. Hope this helps others!
http://blog.firmhouse.com/connecting-to-sql-server-from-heroku-with-freetds-here-is-how-on-cedar#
We're having a similar problem where we're needing to import old data from a SQL Server database into our new app. The data isn't a straight table import, but needs to undergo some processing and conversions. We've built an import layer for this which lives in a private gem, so as to not pollute the new app with the old data conversion issues. This approach is also designed to permit incremental updates, as we get closer to launch we'll keep syncing records up to the moment of switch-over.
Heroku told us that it's not trivial to connect to SQLServer, in particular as they don't support FreeTDS. Their support staff recommended to run an instance with the import gem from a laptop in our office and configure it to connect to their database (which requires a dedicated DB, not the free shared one). This sounded like the most palatable approach to us.
Secondly, regarding security that was mentioned by #Justice, we discussed configuring SSL for SQLServer with the hosting company and they pointed out the complexities of this. They recommended VPN as an easier solution. As we don't have office-side VPN hardware, the simplest and free solution proved to be an SSH tunnel.
We've set up an SSH tunnel from the laptop to the SQLServer Windows box. That was straightforward. We had CopSSH installed on Windows (which comes with a Linux shell, by the way) and we were able to simply set up a tunnel, having the laptop talk to localhost for its SQLServer connection, i.e.:
ssh -L 1433:localhost:1433 user#windows_server_name
I did not know Heroku has FreeTDS on it? I was told they did not. TinyTDS if used with FreeTDS 0.91 can have a zero freetds.conf dependency and be driving by runtime connection args. We are looking into building an Ubuntu 10.4 native gem that statically links 0.91 with OpenSSL so you can just drop it into Heroku and us it to connect to Azure and/or you own outside DB.

Remote SubversionSVN connection to Unix Server

Having installed TurtoiseSVN locally (local repository, no server) for my Delphi projects, i now want to share my updates via internet. To make it possible i did install Subversion (version 1.6) on an Apache Unix server (RedHat, VDS Hosting plan with Sphera) and created a repository folder at that place. The server is running well but i'm a bit lost at that point:
What are my best options to import the projects to the Unix repository, the easiest will be to clone the local repository to the one on the Unix machine? - ideally i would like them both synchro. What is the best tool to manage the Unix Subversion server and its repository (right now i'm using SSH Explorer) and best tool to checkout/import/export files on the repository of that server?
Tx
To copy the local repository to the server, you can use svnadmin dump to backup the local repo including all revisions to a portable backup file. On the target server, use svnadmin load to install the backup.
See 'Repository Maintenance - Migrating Repository Data Elsewhere' in the documentation.
If you have the server running, there is no need for the local repository anymore. If you really want to keep and synchronize a local repository with the server, you can use the svnadmin hotcopy command.
I have found a solution to my problem.
General remote connection script from a Windows SubversionSVN to a unix Subversion server:
svn+ssh://<username>#<hostname>:<port>/<location of the SVN repository>
Better, lets have username and password parameters added to TortoisePlink.exe, Open Explorer file window, right-click in the file section (get a pop-up), choose: TortoiseSVN -> Settings -> "Network" Pane-> SSH Client.
exemple: 'TortoiseSVN\bin\TortoisePlink.exe -l username -pw password'
now the connection will be:
svn+ssh://#<hostname>:<port>/<location of the SVN repository> ... no need to add username and no password asked for.

Symfony with only FTP access

I'm currently developing on my local pc, to which I have complete access of course.
However to my production server I have only FTP access.
Now, this step
http://www.symfony-project.org/getting-started/1_4/en/05-Web-Server-Configuration
On Symfony's installation guide, suggests that I need to edit the httpd.conf
I was wondering if there's an alternative since I don't have access to it on production.
Try reading this. I haven't tried installing Symfony on a shared host, but I see no reason for it not to work.
Generally shared hosts allow you to set configuration parameters in .htaccess files, so you can override httpd.conf without modifying it.

Resources