By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

Run VB.Net code from simple ASP.net page

P: n/a
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
be*******@quinton.com
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

"ben" <be*******@quinton.com> wrote in message
news:09****************************@phx.gbl...
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
be*******@quinton.com

Nov 18 '05 #2

P: n/a
> 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.

"ben" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl... No, I am net to asp.net(as you can tell). I will try
that out and see what happens.

Does anyone know what the offical MS name is for what I
am trying to do? So I can do some more research.
-----Original Message-----
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.

"ben" <be*******@quinton.com> wrote in message
news:09****************************@phx.gbl...
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
be*******@quinton.com

.

Nov 18 '05 #3

P: n/a

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\Pi ck_List_Local_debug.md
b", False)

Then is jumps to the catch section.

Any sugestions?

Thanks,
Ben

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.