How do I write a Windows Service using Strataframe BOs


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Just FYI, within the service you are generally better off providing a user name authentication that integrated security...it makes deployment easier and more reliable depending on the environment in which it is being installed.  But really either will work, but I have seen this cause issues before in the field with trying to use integrated security via a server and having a hard time connection to the server.
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (652 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Sounds like you are on the right track Smile. That is just a permissions issue, but it looks as though you are on top of it. Let us know if you hit any speed bumps!
Peter Denton
Peter Denton
StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)
Group: Forum Members
Posts: 77, Visits: 787
Thanks Guys,

I'm not sure that I'm out of the woods yet, but I've got my service to install, start and stop, now I only have to get it to do something useful.

I've copied the SetSources out of the AppMain of one of my StrataFrame projects, put it in my service.vb, and called it directly from the sub main (in the designer code). I haven't got anything from the database yet, but i found the error in the event log about the account NT AUTHORITY\LOCAL SERVICE not having access to MSSQL strangely encouraging.

Peter

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I haven't specifically done windows services with SF, but I have done web services implementing SF with great success, and I think they are very similar.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Absolutely.  Our medical software has a critical component which is a service.  We have a server to which all clients connect to manage database connections, licensing, automated tasks, and a whole lot more.  Bottom line is that our software won't work without this server.  So it is the hub of all operations.  And it is written using StrataFrame and BOs, etc.

The reason that we do not have a sample is because there is not a whole lot to add past creating a service.  It is just a matter of adding the SF assemblies and then start programming as though it were a class library or a program without UI.

We have a UI console that talks to the service so that certain things can be setup, status seen, etc.  But as for the service, it is obviously non-UI (as you will want to be sure that it is...even if you intend for your service to "Interact with desktop").

But there really isn't a whole lot to add past that...just add your SF references and get to work.  One other piece of advice that I might share is that we used Http requests and responses versus having sockets open all of the time for communication between the client and server which has worked out very nicely, but this doesn't have anything to do with SF...just a suggestion.

Peter Denton
Peter Denton
StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

We have a continuous task that checks a database table for the existence of unprocessed records, and if it finds any processes them. This is done without user interaction, and doesn't need a user interface. We have previously handled this by running a form on the console of the Server (started in the logon script of a user which is automatically logged in). However It would seem preferable to do this as a service.

Can Strataframe BOs be used in a service, and is there an example of how it is accomplished somewhere? I've had a look in the documentation, demos and forum but didn't find anything.

Peter

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search