Deploying database from a web app

scootdawgscootdawg Posts: 5
edited August 24, 2009 11:26AM in SQL Packager Previous Versions
Ok, so I'm trying to create an application that a sales person can go and fill out a form with some info and then it creates a database from that info.

Here's the code I use:
            Process myProcess = new Process();
            ProcessStartInfo myProcessStartInfo = new ProcessStartInfo();

            myProcessStartInfo.FileName = Server.MapPath("ImageDB.exe");
            myProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            myProcessStartInfo.CreateNoWindow = true;
            myProcessStartInfo.UseShellExecute = false;
            myProcessStartInfo.RedirectStandardOutput = true;
            myProcessStartInfo.Arguments = "/server:dblocation /database:customerdb /username:user /password:password /quiet";
            myProcess.StartInfo = myProcessStartInfo;
            myProcess.Start();
            myProcess.WaitForExit();
            StreamReader myStreamReader = myProcess.StandardOutput;
            string myString = myStreamReader.ReadToEnd();
            Response.Write(myString);
            myProcess.Close();

when I run the code, I get the following error:

"Red Gate SQL Packager 'ImageDB' Error: File or assembly name ImageDB.exe, or one of its dependencies, was not found. "

I verified that the file is in the correct directory and that my process is pointing to that directory.

Does anyone know what's going on?

Thanks in advance!

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I can think of two possibilities right away. One happens if the package is created with compression. If that's true, then the package creates a copy of zlib1.dll in a temporary folder and references it dynamically to do the decompression. The other is the fact that if the packaged script gets larger than 100MB, a seperate satellite DLL is built for every 100MB of script, and the dlls have to be deployed in the same folder as the script.

    Strapping fileMon to the ASP .NET worker process or using Fusion logging will probably tell you exactly which file it is trying to load.
  • Fusion logging doesn't show anything and I tried creating a non-compressed version and I still have the problem.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Does it work if you recreate the package and do not use the "compression" option?
  • I tried that and it still doesn'twork
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Are you absolutely sure that this is the latest version 6 of Packager that you are using? Version 5.x had this problem where you could not rename the assembly, which sometimes Windows like to do for you in the background when it wants to use a "temporary" file name. In that case, the assembly it can't find is the very one that is currently running, strangely enough.
  • That's probably it. I have version 5. Sorry about that...

    How do I get the latest version? I think my license is still up to date.

    thanks again
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    There should be a "check for updates" hanging off SQL Packager's Help menu. That's how you can get the latest version. Even if you do not have a current maintenance agreement you can still run the software side-by-side with the old version and see if it fixes the problem you've got.
Sign In or Register to comment.