Run VB.Net code from simple ASP.net page

  • Thread starter Thread starter ben
  • Start date Start date
B

ben

All,

What I have:
I have written a VB.net application that uses Access DBs
and Make 100s of Excel documents from the data.

What I need:
I need a Simple ASP.NET Page that will basically pass a
string into a function of the Existing Windows
Application. The app does not run all the time so when
the user opens the ASP.NET page types in a string and
clicks the button it calls a function of the existing
application. I do not have the time or knowledge to
convert all the functions into ASP code. I am assuming
there is a simple way to have the ASP.NET standby while
my app runs its functions.

What I have done:
I have made a simple asp.net page and I can pass strings
into ASP.Net functions just fine. Next I added the vb
module from my windows app into the ASP.NET project. Now
I pointed the ASP button at the main function in the vb
module. I goes through parts of the code until it trys
to open COM objects (Access 10 library).

Questions:
1) am I suppose to add special code to have these
functions run in an offline mode.
2) What is this process offically called? So I can
research this on my own if needs be.
3)HOW DO I GET AN ASP.NET PAGE TO RUN A FULLY FUNCTIONAL
VB.NET APPLICATION!!


Thanks so much,
Ben
(e-mail address removed)
 
Sounds like an interop issue. Did you add aspcompat=true to your @Page
directive?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Does anyone know what the offical MS name is for what I
am trying to do? So I can do some more research.

Interop is the term for working with unmanaged COM and other unmanaged
components.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Not working still. Here is the patch of code that fails. I did add the
references into the project for office 10 and access 10. I did add
aspcompat=true in the @Page directive as well. I still go the same
error. An excpetion string says "cannot create active x component.
Here is a sample from my code.


Dim oAccess As Access.ApplicationClass



Try
'Start Access and open the database.
oAccess = CreateObject("Access.Application")
oAccess.Visible = False

oAccess.OpenCurrentDatabase("c:\Print_Pick_List\Pick_List_Local_debug.md
b", False)



Then is jumps to the catch section.

Any sugestions?

Thanks,
Ben
 
Back
Top