I have a basic VB.Net application that gets data from some websites and then send them to a MS-SQL database automatically. I have developed it as a desktop application with a WinForm front end with logs writing to the WinForm continuously.
Now, is it possible to convert the Winform to a Windows services so that I do not need to keep it opening in front of my PC and watching the logs, instead, it runs quietly in the background and the data gets logged into the system log viewer?
Many thanks!
In Visual Studio choose File->New Project and in the Windows templates you'll see Windows Service. Choose that option and then start migrating your code. If you kept most to all of your non-UI code in a separate DLL it will be easy because then you can have your service reference that library.
The following MSDN link has step by step instructions on how to get started with Windows Services but the answer is it not possible to convert your application but you can create a new windows service and copy your code across. This should be quite trivial.
If you have a specific interval to run the project, then you can use windows schedular to have the executable invoked as per your requirement and interval. However, as answered earlier, to convert your project to win services, you need to create the windows services from scratch and what you can do is, keep your business logic classes seperate and have objects created from the component classes.
Related
I'm trying to find way to save files (pdf or csv) presented in application.
I want those files be available from outside the app.
From what I know it is impossible to save file to sdcard, only in isolated storage.
There is nothing like file manager in Windows Phone, right?
Maybe there is possibility to save file to some cloud from app?
Saving outside of your app doesn't appear to be coming until WP8.1.
In WP8 we do have a few alternatives.
Save the PDF locally and launch the associated app for viewing as per this SO answer.
Use a cloud service for saving the file. The easiest way I've come across is integrating with the CloudSix app for Dropbox. The details on how to integrate the nuget package are here. It's fairly simple if you just need fire-and-forget saving.
I have a local desktop app that needs a UI overhaul, the data in this app is largely driven by a back end DB and the best tools available to make a user friendly UI for this kind of system seems to be to build it as a web app.
However, the primary function of this tool is to have the user make a choice from a list and then use that to kick off a perforce sync on their local machine.
This app needs to run on both Windows and OSX so, my first thought was to use a cross platform GUI framework like wxWidgets and embed a web view for all of the functionality apart from the sync step. However all the wx based web views I have found seem to be very limiting.
So, what are my other options? Is there anyway to invoke a p4 sync from a browser, or is a local app with an embedded web view my only viable choice?
You might be able to use the P4 Javascript API and build your app as a tool accessible from P4V. Not sure if the P4V part of that would be a deal breaker for you.
I'm not sure if the Javascript API is available outside of the context of P4V. If it is, then you should be able to use that to build whatever kind of web app that you want.
I ended up writing a browser plugin that invokes a p4 sync operation to solve this problem.
I used the firebreath framework to provide a javascript api that allows me to invoke a p4 sync on the users' local machine. To do this I needed to be able to have a p4.ini already present on the local machine and know it's location, or I needed to pass the user/pass and client workspace to the plugin.
This works fairly well, but it's not as clean as I would like, piping the output of the sync process to the browser seems to be slow, and the output seems to scroll for a lot longer than the process runs.
I am working on in installer project that needs to gather some info and act on it during the install (mainly online key retreival and registration). The Setup Project UserInterface templates seem inflexible and poorly documented so I am looking at opening a WinForm as a Custom Action.
I know this is possible because I see reference to it in many places but this is my first Windows Installer experience and so far it is mired in googled contradictions, partial or outdated information and guesswork... erg....
Does anyone have (even a pointer to) a clear concise description of how one gets this done in a VS 2008 WinForm project...
Many thanks for inputs
There is no guarantee that the .net framework is installed when the installer is launched (especially on Windows XP). A best practice is to keep your installer away from any dependencies.
Put the online key retrieval and registration in your application rather than doing all that stuff during install.
Create a standard installer class. In the class create your form and show it (ShowDialog is prefered)
I've been looking at the possibility of ReHosting a WF4 Workflow to be used to debug running Workflows. All the posts and samples I've seen regarding WF4 Rehosting are using a WPF application to initially Host the Workflow, and then use the WorkflowDesigner in ReHosting it. Is there any way to Rehost a Workflow that was hosted in a non WPF application, like ASP.Net MVC?
The WorkflowDesigner is basically a big WPF control so you cannot host it in an ASP.NET application. Neither can you in a Silverlight application. If you need to expose the designer over an internet app you would have to either create your own designer or use something like terminal server/Citrix.
You can host the designer in the browser using a wfpbrowserapplication. Details here
I just about read in another post that WF 4 will make the hosting the designer in the application easier than it is today. I too have similar requirement that the workflow designer should be availabe to the user so that he can create his own workflows. This was reasoned in that post to the fact that the WF 4 is completely markup based and no code is involved... making it easier to host in the application....
I've found lots of documentation on how to install com+ components with WiX or an exported msi from dcomcnfg but the problem with these approaches is I can't see where to specify the com+ server.
Currently we register the components with clireg and the -s switch which allows us to specify the com+ server like so:
clireg32.exe BLEH.VBR -s COMSERVER -t BLEH.TLB -d
This is messy to say the least and I've been trying to get this into some automated form of installation that doesn't involve calling a batch file full of clireg32 calls.
Currently WiX is the backbone of our packaging automation so a solution with WiX would be awesome.
Thanks.
Why can't you use the Wix3 ComPlus extensions? (Sorry, no on-line link, check the Wix3 docs for reference and samples), Or maybe you want to register your ComPlus application as a SERVICE which at the moment is not possible with those extensions.