Doubts in Design Level. Desktop ->Web-Based in .NET TECH.

G

Guest

Hi all,

We have one product. It is client/server based application. We
have developed client application in VC++ 6.0. Our client is desktop based
application like dialog based application. Client application will connect to
server according to user requests. This is current scenario.

We would like to make this application as a web-based
application. I have core functionality in VC++ application in client
application. I can put this functionality in com dlls also.

To achieve this web-based approach, what technologies I have to
select? Can you please advise me? I am planning to select aspx pages for
web-page and com dll for core functionality in VC++. Is it correct approach?
I have to give compatibility for Microsoft Windows NT/ 2000, Professional 98
SE to Windows Vista and windows 2003 server.

I will implement everything in .NET if .NET is correct
technology for this web-based application. But, I need to reuse my client
code in web-based application.

Please suggest me.

Thanks in advance
 
N

Nicholas Paldino [.NET/C# MVP]

John,

First, if this is going to be a web-based application, do you mean that
you are going to have a web-based front end (i.e. something in a browser) or
will you have a client app that performs operations over the web? If the
answer is the former, then you don't have to worry about the client
machines, as you are programming against the browser (not literally, but
that is what you have to worry about when it comes to platform
considerations). If you are going to have a client app, then I don't know
if you will be able to use .NET, since Windows 98 is a requirement (one I'd
seriously reconsider).

As for the server side, you can implement this in anything you want,
since you will be controlling the server. If all of your client code is in
C++, I wouldn't exactly rush to expose the functionality as COM components.
If you did this, and you were hosting in ASP.NET (one of the options, the
other is in WCF), then you would have to set ASPCompat to true on all of
your pages that call these COM components and it would cause a performance
hit.

I think the best bet would be to create managed wrappers for your code
using the CLI extensions for C++, and then use ASP.NET or WCF to make calls
to your components.

Hope this helps.
 
G

Guest

Nicholas,

How to create managed wrappers for C++ code (using the CLI
extensions)?

I created type library for TestDll.dll (ATL COM DLL) using tlbimp
from VS2005 command prompt. Output is TESTDLLLib.lib. It has only one
function which is CreateFileInCDrive(). It just creates one text file in C
Drive.
code snippet:
STDMETHODIMP CMyTest::CreateFileInCDrive()
{
// TODO: Add your implementation code here
FILE* fp = fopen("C:\\TestDll.txt","w");
if (fp != NULL)
{
fprintf(fp,"%s","welcome\n");
fclose(fp);
}

return S_OK;
}

I created asp.net project and selected code behind is visual c#. I
would like to use atl com dll (TestDll.dll) in Page_Load event. Is it
possible?

In Visual C#, (i mean page_load function) I am able to create object.
But, I cannot create the TestDll.txt file.

Please suggest me.

Is it correct approach?

--
Thanks & Regards,
John.


Nicholas Paldino said:
John,

First, if this is going to be a web-based application, do you mean that
you are going to have a web-based front end (i.e. something in a browser) or
will you have a client app that performs operations over the web? If the
answer is the former, then you don't have to worry about the client
machines, as you are programming against the browser (not literally, but
that is what you have to worry about when it comes to platform
considerations). If you are going to have a client app, then I don't know
if you will be able to use .NET, since Windows 98 is a requirement (one I'd
seriously reconsider).

As for the server side, you can implement this in anything you want,
since you will be controlling the server. If all of your client code is in
C++, I wouldn't exactly rush to expose the functionality as COM components.
If you did this, and you were hosting in ASP.NET (one of the options, the
other is in WCF), then you would have to set ASPCompat to true on all of
your pages that call these COM components and it would cause a performance
hit.

I think the best bet would be to create managed wrappers for your code
using the CLI extensions for C++, and then use ASP.NET or WCF to make calls
to your components.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top