salfasano
salfasano

Reputation: 297

Convert existing .NET application to web interface

I developed an application for a client that required interfacing with an A/D board, displaying graphics on a second monitor and an SQL database. To accomplish this I developed a .NET application (that uses some C++ DLLs for Direct3D and A/D interfacing).

Now, the client is asking if they could run the software from a mobile device (tablet, phone, etc.) instead of the computer.

I have no experience with web development. I was thinking maybe it would be possible to run a web server on the local device that hosts a web application that can be accessed from any device connected to the local network. This web application would have the same functionality as the desktop application.

Since a lot of my C++ code is interfacing with hardware, I'm not sure a web application would even have permissions to do this.

Any ideas/thoughts on how to accomplish this or if it's not possible at all would be greatly appreciated.

Upvotes: 1

Views: 349

Answers (2)

Ali Umair
Ali Umair

Reputation: 1424

@Jason is right , you have to convert all your c++ code into dlls and also core logic into dlls VIA class library projects. After that you can access your ddls and exe using a website or a web project. Interfacing with hardware would not be an issue if you are using a dedicated server as you have full control over it,you can configure IIS and give permissions to directories etc but in shared hosting environment this will be problem as they strict security.

Upvotes: 0

Jason Evans
Jason Evans

Reputation: 29186

You could have all the core logic of your app inside of a class library project (a separate DLL file), rather then a console application. That way, you could create a console application, or a website, that uses this DLL to call the API that it exposes.

I don't know how much work this would be for you, but the plan would be to extract all the code from the console application (I'm assuming it's a console app. If it's a webforms app then the same plan applies) that does the core work (i.e. making calls to the hardware, calling C++ code etc) and place that into a class library.

That way, it does not matter what type of UI you want to build e.g. console, web, you have the same code inside of the DLL ready to be used, and you simply need to reference it in the project.

Upvotes: 1

Related Questions