Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Silverlight 3 OOB on Mac!

Silverlight 3 OOB on Mac!

Scheduled Pinned Locked Moved WPF
csharpdatabasequestionloungelearning
4 Posts 2 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nader Elshehabi
    wrote on last edited by
    #1

    Hello all, I did a quick search and found my case as unique. I hope I didn't miss something. I have a .net windows desktop program just like any other. The task is to port it to Mac so intuitively I chose Silverlight 3 utilizing the new Out-of-Browser feature to bring the software offline. I knew I'd face some issues but here are three issues that I need advice about and would greatly appreciate your responses. 1- The software must uniquely generate a code to identify the machine -the license is per machine-. On windows we got the HDD serial number using windows management objects. What's the alternative on Mac? random Guid is obviously not an option. 2- The program uses MS Access file for Data storage. The driver are installed by default on windows. Can we port this Access database and the data access drivers to Mac in the Isolated storage somehow? Of course the alternative is to use Isolated Storage and serialize the data.. I just wanted to maintain consistency between windows and Mac versions. 3- Printing is not available in Silverlight 3. I know SL 3 doesn't support printing yet, but if you have a workaround I'd appreciate it. Thanks!

    Regards:rose:

    M 1 Reply Last reply
    0
    • N Nader Elshehabi

      Hello all, I did a quick search and found my case as unique. I hope I didn't miss something. I have a .net windows desktop program just like any other. The task is to port it to Mac so intuitively I chose Silverlight 3 utilizing the new Out-of-Browser feature to bring the software offline. I knew I'd face some issues but here are three issues that I need advice about and would greatly appreciate your responses. 1- The software must uniquely generate a code to identify the machine -the license is per machine-. On windows we got the HDD serial number using windows management objects. What's the alternative on Mac? random Guid is obviously not an option. 2- The program uses MS Access file for Data storage. The driver are installed by default on windows. Can we port this Access database and the data access drivers to Mac in the Isolated storage somehow? Of course the alternative is to use Isolated Storage and serialize the data.. I just wanted to maintain consistency between windows and Mac versions. 3- Printing is not available in Silverlight 3. I know SL 3 doesn't support printing yet, but if you have a workaround I'd appreciate it. Thanks!

      Regards:rose:

      M Offline
      M Offline
      Mike Marynowski
      wrote on last edited by
      #2

      We are currently beta testing a Silverlight 3 application, and we decided not to use OOB because of all the disadvantages that are currently present. The app is always online and after login, it always launches into a popup window without all the toolbars and such - basically the same thing. I'll go in reverse order: #3 - the way we do this is to open a new browser window linked to an auto-generated PDF/XPS file. This obviously wouldn't work if you needed your application to run offline, but otherwise it works pretty well - the user gets a "print preview" right away and they can print from there. #2 - You can use an embedded database that has been ported to Silverlight, such as: http://blogs.msdn.com/dachou/archive/2009/07/11/embedded-database-engine-for-silverlight-applications.aspx[^] or port an existing open source .NET database engine. There was one I ran into a while ago, don't remember the name, but it used the standard DBase file format. I don't think there is any way to retain support for your access database locally. If you don't mind going over the internet for data, you could use SQL or whatever on the backend and communicate query results with web services. #1 - You are on your own for this one...I'm not sure to be honest. But I will say that licenses that tie themselves to a particular hardware configuration drive me nuts - what happens if my HDD dies? What happens if you guys go out of business and my HDD dies, and then I can't even use the license I still own! --- It is my honest opinion that if you are going the Silverlight route, you should re-think the architecture of your application. I have no idea what your application does, but GENERALLY speaking, anything that needs a database and licensing is better off being a connected application. Licensing can be enforced by the server (i.e. only one connection with a particular license key is allowed) so you don't have any hardware-binding issues, and the database would obviously be centralized in that scenario. The printing issues are largely taken care of with PDF/XPS exporting from the server.

      N 1 Reply Last reply
      0
      • M Mike Marynowski

        We are currently beta testing a Silverlight 3 application, and we decided not to use OOB because of all the disadvantages that are currently present. The app is always online and after login, it always launches into a popup window without all the toolbars and such - basically the same thing. I'll go in reverse order: #3 - the way we do this is to open a new browser window linked to an auto-generated PDF/XPS file. This obviously wouldn't work if you needed your application to run offline, but otherwise it works pretty well - the user gets a "print preview" right away and they can print from there. #2 - You can use an embedded database that has been ported to Silverlight, such as: http://blogs.msdn.com/dachou/archive/2009/07/11/embedded-database-engine-for-silverlight-applications.aspx[^] or port an existing open source .NET database engine. There was one I ran into a while ago, don't remember the name, but it used the standard DBase file format. I don't think there is any way to retain support for your access database locally. If you don't mind going over the internet for data, you could use SQL or whatever on the backend and communicate query results with web services. #1 - You are on your own for this one...I'm not sure to be honest. But I will say that licenses that tie themselves to a particular hardware configuration drive me nuts - what happens if my HDD dies? What happens if you guys go out of business and my HDD dies, and then I can't even use the license I still own! --- It is my honest opinion that if you are going the Silverlight route, you should re-think the architecture of your application. I have no idea what your application does, but GENERALLY speaking, anything that needs a database and licensing is better off being a connected application. Licensing can be enforced by the server (i.e. only one connection with a particular license key is allowed) so you don't have any hardware-binding issues, and the database would obviously be centralized in that scenario. The printing issues are largely taken care of with PDF/XPS exporting from the server.

        N Offline
        N Offline
        Nader Elshehabi
        wrote on last edited by
        #3

        Now that's why I always come to CodeProject. I posted the same question in Silverlight.net official forums I got nothing. I'll go with your order: #3- My application is out of browser, and on Mac. How can I launch the browser to open the exported html that I want to print? using Process class like windows? I never programed no worked on mac environment by the way. #2- I'm looking into the Database engines you provided. Thanks! If they don't support Access though I don't think they'd save much. Actually if I designed the original program I wouldn't have gone to DB. The data is so simple a well structured XML file is more than enough. #3- If I could have gone online my life would have been much easier. Unfortunately I'm porting this application for a client. I don't think I can move freely in his server environment!! Yet I absolutely agree with you. However this brings an interesting point. If we made the activation process online what if the user can't get a consistent internet access? and what if the servers are down (or out-of-business :laugh: ) If the user gets the activation code and the key without online verification that these key-code combination have been used already he can share them as much as he wants, and that's how cracks site work! I appreciate your reply -despite the part when we go out of business ;P -. Thanks man.

        Regards:rose:

        M 1 Reply Last reply
        0
        • N Nader Elshehabi

          Now that's why I always come to CodeProject. I posted the same question in Silverlight.net official forums I got nothing. I'll go with your order: #3- My application is out of browser, and on Mac. How can I launch the browser to open the exported html that I want to print? using Process class like windows? I never programed no worked on mac environment by the way. #2- I'm looking into the Database engines you provided. Thanks! If they don't support Access though I don't think they'd save much. Actually if I designed the original program I wouldn't have gone to DB. The data is so simple a well structured XML file is more than enough. #3- If I could have gone online my life would have been much easier. Unfortunately I'm porting this application for a client. I don't think I can move freely in his server environment!! Yet I absolutely agree with you. However this brings an interesting point. If we made the activation process online what if the user can't get a consistent internet access? and what if the servers are down (or out-of-business :laugh: ) If the user gets the activation code and the key without online verification that these key-code combination have been used already he can share them as much as he wants, and that's how cracks site work! I appreciate your reply -despite the part when we go out of business ;P -. Thanks man.

          Regards:rose:

          M Offline
          M Offline
          Mike Marynowski
          wrote on last edited by
          #4

          #3 - my solution requires that the SERVER creates the printing file...so, if you application is www.awesome-app.com, your application would send the data that needs to be printed to the server, the server responds with a unique print-id, and then your open a new browswer window to www.awesome-app.com/print.ashx?print-id=12345. The response is the PDF/HTML/XPS/whatever file that the user prints. In out-of-browser mode with no online connectivity, the only thing you can do is open a "Save As..." dialog and save the file to the users computer - the user would have to find it and open it after. There really is no good way to handle offline printing right now. #2 - if that's the case, then that's probably the way to go. --- This is a bit off topic...but here is my take on licensing: Yes, licensing is a real pain...it's always a compromise between pain-in-the-ass-ness and "trust". In your case, the user has to go online to get the application anyway...just have them enter their license key before the application lets them do the offline install. It is my belief that you should protect your application up to the point where someone has to obtain a cracked version to use it without purchasing it. Anything more is a waste of time, because your application WILL be cracked if it is worth cracking. Silverlight applications are especially easy to crack if they work offline. Anything less is bad too, because a lot of users, even business users, will just re-use a "legal" cd-key if they can, because for some reason that doesn't seem as "bad" as actually cracking a program. Our applications verify their licenses every 30 days. While the application is running, a background thread tries to contact our server and update the machine ID that it is installed on. If it can't contact our licensing server within 30 days, the user gets a 15 day warning. If it still hasn't checked its license, the application gets locked out until it can. If a new machine ID checks a license registration, the old machine ID gets added to the uninstall list. If the app is run on the old machine, the license verification check fails and the user gets an error message that the license was re-assigned to another machine. This takes care of 95% of our license re-allocation problems. The only problem is if they want to move their license BACK to the old machine...in which case they can call us :) Also, if our domain is no longer registered to us, the licensing system shuts off, so their apps still work if we go under :P That'

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups