Click here to Skip to main content
15,910,277 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: This really shouldn't be so difficult... Pin
Deflinek27-Oct-15 5:41
Deflinek27-Oct-15 5:41 
GeneralRe: This really shouldn't be so difficult... Pin
kdmote27-Oct-15 7:18
kdmote27-Oct-15 7:18 
GeneralRe: This really shouldn't be so difficult... Pin
Deflinek27-Oct-15 7:31
Deflinek27-Oct-15 7:31 
GeneralRe: This really shouldn't be so difficult... Pin
R. Giskard Reventlov27-Oct-15 6:00
R. Giskard Reventlov27-Oct-15 6:00 
GeneralRe: This really shouldn't be so difficult... PinPopular
Marc Clifton27-Oct-15 6:02
mvaMarc Clifton27-Oct-15 6:02 
GeneralRe: This really shouldn't be so difficult... Pin
kdmote27-Oct-15 7:23
kdmote27-Oct-15 7:23 
GeneralRe: This really shouldn't be so difficult... Pin
908236527-Oct-15 8:12
908236527-Oct-15 8:12 
GeneralRe: This really shouldn't be so difficult... Pin
Marc Clifton27-Oct-15 8:40
mvaMarc Clifton27-Oct-15 8:40 
kdmote wrote:
what's the FileZilla/Bitvise step for? Is that the only way to transfer my content to EC2?


You can set up Remote Desktop for file sharing[^] but because I didn't know how to do that until just now when I looked it up, and because I like to develop & test locally, then upload with an auto-FTP uploader the latest "release", I like FTP. WinSCP is great for general fussing with the file structure, and faster than working through an RD.

By the way, one more recommendation: definitely use FluentMigrator[^]

I love how I can program DB changes in a fluent syntax, like:
Create.Table("ParticipantHowHearAbout").
  WithColumn("Id").AsInt32().Identity().PrimaryKey().NotNullable().
  WithColumn("ParticipantId").AsInt32().NotNullable().
  WithColumn("HowHearAboutId").AsInt32().NotNullable();

and package the migration DLL as part of the upload. When I restart the server, it automatically runs the migrations (here's my whole class that does that):
public static void RunDatabaseMigration(string dbname)
{
    string connectionString = ConfigurationManager.ConnectionStrings[dbname].ConnectionString;
    // TODO: This assumes we're running out of the bin\Debug or bin\Release folder as a developer.
    string migrateExe = Path.GetFullPath("..\..\..\libs\migrate.exe");

    try
    {
        StringBuilder sb = new StringBuilder();
        ProcessStartInfo psi = new ProcessStartInfo(migrateExe, "-c \"" + connectionString + "\" --db SqlServer -a migrations.dll");
        psi.UseShellExecute = false;
        psi.RedirectStandardError = true;
        psi.RedirectStandardOutput = true;
        Process migrator = new Process();
        migrator.OutputDataReceived += (sender, args) => sb.AppendLine(args.Data);
        migrator.ErrorDataReceived += (sender, args) => sb.AppendLine(args.Data);
        migrator.StartInfo = psi;
        migrator.Start();
        migrator.BeginOutputReadLine();
        migrator.BeginErrorReadLine();
        migrator.WaitForExit();
        Console.WriteLine(sb.ToString());
    }
    catch (Exception ex)
    {
        Console.WriteLine("Error running migrations: " + ex.Message);
    }
}

and the database is brought up to date. I use it also to create tons of test data in a test database for performance tests and demos. FluentMigrator is the cat's meow, and migrations is one of the things I actually thought was cool when I worked with Ruby on Rails.

kdmote wrote:
what do I have to worry about regarding Chinese hackers?


Yes and no. You definitely want to make sure that pages like setting passwords, administration, etc., are authenticated and your admin passwords are not, well, default! I've watched IP's originating from China trying usernames and passwords like "admin/admin".

And while Amazon sets up an administrator account with a password that looks like gobbledygook, the less number of ways to hack into my website (especially since it is a live website for a non-profit), the better.

Marc

GeneralRe: This really shouldn't be so difficult... Pin
milo-xml28-Oct-15 2:46
professionalmilo-xml28-Oct-15 2:46 
GeneralRe: This really shouldn't be so difficult... Pin
kmoorevs27-Oct-15 12:14
kmoorevs27-Oct-15 12:14 
GeneralRe: This really shouldn't be so difficult... Pin
kdmote27-Oct-15 7:57
kdmote27-Oct-15 7:57 
GeneralRe: This really shouldn't be so difficult... Pin
Marc Clifton27-Oct-15 8:44
mvaMarc Clifton27-Oct-15 8:44 
GeneralRe: This really shouldn't be so difficult... Pin
kdmote27-Oct-15 9:01
kdmote27-Oct-15 9:01 
GeneralRe: This really shouldn't be so difficult... Pin
Kirk 1038982128-Oct-15 3:36
Kirk 1038982128-Oct-15 3:36 
GeneralRe: This really shouldn't be so difficult... Pin
Gerry Schmitz28-Oct-15 6:11
mveGerry Schmitz28-Oct-15 6:11 
GeneralRe: This really shouldn't be so difficult... Pin
ClockMeister28-Oct-15 6:16
professionalClockMeister28-Oct-15 6:16 
GeneralRe: This really shouldn't be so difficult... Pin
Member 1073194428-Oct-15 17:43
Member 1073194428-Oct-15 17:43 
GeneralAPOD PinPopular
R. Giskard Reventlov27-Oct-15 4:42
R. Giskard Reventlov27-Oct-15 4:42 
GeneralRe: APOD Pin
glennPattonWork327-Oct-15 4:44
professionalglennPattonWork327-Oct-15 4:44 
GeneralMQOTD Pin
V.26-Oct-15 23:47
professionalV.26-Oct-15 23:47 
GeneralRe: MQOTD Pin
U. G. Leander26-Oct-15 23:50
professionalU. G. Leander26-Oct-15 23:50 
GeneralRe: MQOTD Pin
Pete O'Hanlon26-Oct-15 23:51
mvePete O'Hanlon26-Oct-15 23:51 
GeneralRe: MQOTD Pin
Pete O'Hanlon26-Oct-15 23:51
mvePete O'Hanlon26-Oct-15 23:51 
GeneralRe: MQOTD Pin
Keith Barrow27-Oct-15 4:12
professionalKeith Barrow27-Oct-15 4:12 
GeneralRe: MQOTD Pin
Kornfeld Eliyahu Peter26-Oct-15 23:51
professionalKornfeld Eliyahu Peter26-Oct-15 23:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.