CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2011
    Posts
    8

    Red face Websockets, ASP.NET, and C++

    Hey everyone, its been forever since I've been on here. I lost access to my email and wasn't ever able to get it back until I found the password saved in a text file in one of my old externals!

    Let me begin by saying THANK YOU SO MUCH FOR READING MY THREAD! It means a ton that you are willing to take time out of your day to see if you can help me. I truly mean that. So again, thank you!

    I have recently started a company and I want my products to be available to everyone on any device or platform, right? So I've been looking through the options, and currently the most appealing setup to me is using HTML5, with ASP.NET MVC (it seems MVC has a great number of benefits over webforms). However, I currently have an extremely poor understanding of both ASP.NET and HTML5. So I am spending a good while learning it. I have a few weeks where my entire days will literally be consumed with nothing but learning those.

    I chose ASP.NET because I've been coding in C/C++ for a GREAT number of years (I started about 15 years ago), and I've heard it isn't too difficult to make the leap to C# with ASP.NET (though not to be underestimated). PHP just doesn't really strike my fancy. I haven't messed with the .NET library that much before (I've mainly been a native app developer -- and this is me finally making the move and recognizing .NET has a TON to offer).

    So here's the reason for my starting the thread (sorry for the babbling, wanted to give a bit of background so everyone can more easily understand my situation, I know how thorough everyone here is ! ).

    I already have several C++ programs coded up that do all of the ACTUAL processing/execution/etc for the software I am going to sell. This is because I was going to use RAD Studio and develop an app per device... Then I realized it would be a massive project and would consume far more resources than me just making my products web apps. So they're pretty much completely finished (a few tiny tweaks, but that's about it).

    I want to actually keep them as C++ apps, because I was involved in software protection for almost my entire time as a C/C++/Assembly programmer (that is why I originally got into it -- then my interests branched off and became far more wide). I KNOW I can lock down the application and ensure the apps won't be able to be stolen/hacked/leaked or whatever the case, unless they put forth a ridiculous amount of effort (which it seems someone is always willing to do such. Ugh. But I refuse to just lay down and make it easy). I already have all of my software protection in order and what not.

    So I have the C++ apps and I want to lock them down on the server, so they can execute the actual code and keep it safe -- far away from any sort of clients or individuals that would be happy to send it to their friends if they had the ability to do as such.... Or an even bigger fear... Someone taking it, reversing it, and then coming out with a competitive product (as there are currently no other products in this market I am going into -- and for a good reason. ITS EXTREMELY INVOLVED AND COMPLEX). That would seriously crush me as a person if my work was stolen and then others started profiting. I have ZERO issue giving to the community, but there are some things that just aren't for that! This is what I am doing to pay for my children I will have soon, and for my future!

    Since the apps are native windows C++ binaries, I have looked into using websockets to have it communicate with the frontend of the site (what the clients have access to). This way, the clients enter any information they need to into the HTML5 frontend, and then those variables get sent over to the C++ binaries, the C++ binaries process it, and then send the data back over (in some instances, it will take the finalized data, put it into a pdf file, and then send it to them so they can download it). PLUS, it will have to keep all sorts of data, regularly.

    Would this be possible with ASP.NET?

    I have a few other questions as well -- if anyone is willing to answer them. Would it just be way too ridiculous and not worth it? Do you think I should even bother with ASP.NET? I'm curious to hear some experts' opinions on this!



    And just a note. It has occurred to me I could just take the code and make it C# .NET code and run that way. But I'm absolutely terrified of the thought of someone being able to access and steal it. Plus, if someone were to hack the server, any .NET code is a joke when it comes to any sort of software security! Its decompiled in absolutely no time.

    Whereas with my software protection, I have a number of benefits. For one thing, it takes the original code and then scrambles it (aka metamorphism), and then utilizes "virtualization" (to turn the code into some BS new random language, with an interpreter in the binary that is required to execute it -- that way if they attempted to disassemble it, it wouldn't show anything). The virtualization even takes the code and completely replaces certain instructions with others (such as replacing math instructions with NAND -- that way even if someone was successful in breaking the software protection and reversing it, they'd never be able to get the actual original code).

    The code is currently in C++ binaries, but if necessary I can EASILY make them Dll's, utilize the software protection on the Dll's, and make the function calls through the ASP.NET if necessary. Do you all think that would be a good way to go about it? Or is my lack of webdev/server dev/etc making me out to sound like a complete and utter fool?

  2. #2
    Join Date
    Jan 2011
    Posts
    8

    Re: Websockets, ASP.NET, and C++

    After thinking it over, I definitely feel making the binaries into Dll's and loading them into the ASP.NET bit would be the best way to go about this.

    But if anyone has any sort of recommendations or anything of the sort... I will be more than happy to listen!

    Also, for those of you that know. Its impossible for anyone to "grab" (or see) the ASP files and what not, unless they have direct access to the server -- correct?

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Websockets, ASP.NET, and C++

    I agree that turning the exe into dlls is the way to go. As far as the non-MVC asp.net route, I would skip that altogether and just go to MVC 5. In my opinion, that is what is current and there are many advantages to using MVC and if you are going to do that, why not start with the latest? Coming from C++ there still is a bit of a learning curve going to C# (both asp.net and mvc asp.net a .net language like C# or VB.net), but after it's all done your skills with the web will be current with mvc 5, rather than dated. In addition, you'll find more mvc5 documentation and tutorials out there to help you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured