Asp.Net

I don't see any documentation or tutorials regarding asp.net applications. Does wybuild support updating of basic asp.net applications (simple app, sql db, .net 2.0 running in inetpub\wwwroot)?

I'd purchase it right away if it did. I currently use the visual studio installer with no update support.

John.

Hey John,

Yes wyUpdate supports updating ASP.NET apps -- many of our users do it. For instance, let's say your main app is located somewhere outside of the "wwwroot" folder (e.g. C:\Program Files\YourApp\ ). To update your main application files you'll add your files to the "Your program's folder" within wyBuild.

Then, to update the ASP.NET app, first create a new folder in the "Windows Root Drive (e.g. C:\)" folder in wyBuild. So it's look something like this:

Windows Root Drive (e.g. C:\)----inetpub--------wwwroot------------myapp

Then, within that "myapp" folder you created inside wyBuild, you'll add the ASP.NET application files.

Does this make sense?

I kind of figured that. I just thought maybe there was something I was missing since there wasn't any documentation regarding asp.net or IIS and wybuild. I think I can figure out the rest from here.

Thanks for the info.John

Sure, if you have any other questions we'll be happy to help.

Wow. Unbeliveable, got a fully functioning updater in under 2hrs and no code. Brilliant. Definitely buying.

Once more question. I understand how the updater will be used for normal windows gui apps (by launching wyupdater.exe via command line). Is there a way I can check for updates for a web app and show a message or something.

e.g. "Update available. Please logon to this web server and update application abcd to 1.3?"

There's no way a medium trust web app would be allowed to execute an exe so it'd probably have to be a web service call or an assembly that can do what the exe does. Is this possible?

John

There's no way a medium trust web app would be allowed to execute an exe so it'd probably have to be a web service call or an assembly that can do what the exe does. Is this possible?

That's a good question. Unfortunately there's no easy way to do this currently because running the wyUpdate.exe is the only way to check if there are updates. We'll make a small assembly that can do simple update checks from medium trust applications (like ASP.NET) in the near future.

Thanks for suggesting that.

In the meantime the only real way to do it is to have a Windows Service or app running in the background on the server. This dummy app/service will check for updates and talks to your ASP.NET application. But this is a bit hacky -- it will be easier when we make the small assembly for you.

I would also love to have an updater for asp.net applications

Has this assembly been made available yet?

Hey Sam,

Not quite yet. It's coming with wyBuild 2.6.15

Hello,Any update on this one?

Thank you.

It's being worked on. No hard date yet, sorry. The best option is to call wyUpdate.exe from your app to check for updates.

Hello?

sorry

You posted: We'll make a small assembly that can do simple update checks from medium trust applications (like ASP.NET) in the near future

Any word on this? Just downloaded version 2.6.18.4

Don't see any information about it in help.

It hasn't been a priority because of lack of demand. You have a couple of choices in the meantime (described in previous posts in this thread).

I have created a windows service. I am using the AutomaticUpdater.dll for .Net 4.0

The update is working as expected - no Gui.

Is there a way to run this without restarting the service? I am updating a web app. The service kicks the ForceCheckForUpdate() at intervals using System.Timers.ElapsedEventHandler.

I am providing a path to wyUpdate.exe using wyUpdateLocation & wyUpdateCommandline settings.

When I run the service, I hit: auBackend_ReadyToBeInstalled, then the service stops, then the service starts, then I get: auBackend_UpdateSuccessful.

After this, I can let the service run, but it will never run an update again. And in the windows evenlt log (System)- I have "service terminated unexpectedly". This occurs when the service stops.

I'd like to run this without restarting the service. Is there a setting for that?

Forgot to mention - I set an EventHandler for CloseAppNow. But I don't know what to do there. After doing this, the update hangs. If I manually stop the service, the update will finish.

How do I tell it to continue without waiting for the service to stop?

Ok. I have everything working using AutomaticUpdater.dll . Except that I am still getting the "service terminated unexpectedly" error on every interval in the System Event Log. I want to purchase his product, but not sure I'm ok with that error showing up on client machines.

I tried using wyupdate.exe with " /quickcheck /justcheck /noerr", and then using "/skipinfo" when I get a exitCode ==2.

This works fine once, and then never runs again. The reason for this - wyupdate.exe is running continuosly. I have to kill the process in task manager to get the next interval to run properly.

Is there a way to kill wyupdate.exe in code?

For anyone else reading this - got this working using wyupdate.exe.

proc.Dispose(); was not behaving properly. It had issues with me calling it twice - once to check for updates, once to run updates.

I was able to fix this by wrapping the Process code - using (Process proc = new System.Diagnostics.Process()){}

Here is the final working code:

------------------------------------------------------------------------------------------------------------------

public static Int32 RunExe(String ExeFileWithPath, String arguments) { try { System.Diagnostics.ProcessStartInfo file_to_process = new System.Diagnostics.ProcessStartInfo(ExeFileWithPath); using (Process proc = new System.Diagnostics.Process()) { proc.StartInfo = file_to_process; proc.StartInfo.Arguments = arguments; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.ErrorDialog = false; proc.Start(); proc.WaitForExit(Int32.MaxValue);

if (proc.HasExited) { Int32 exitCode = proc.ExitCode; proc.Close(); proc.Dispose();

if (exitCode == 1) { Common.Common.WriteToEventLog( "Exit Code = " + exitCode + "; Proc.StandardError: " + proc.StandardError.ReadToEnd(), EventLogEntryType.Error); } return exitCode; } } return -1; } catch (Exception ex) { Common.Common.WriteToEventLog("{RunExe} " + ex.Message, EventLogEntryType.Error); return -1; }

}