473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Marshal in Asp.Net

Hi

I developed a component using 'Queue', it works fine at a Windows application, but i call it at the Asp .Net and return the error 'System.Runtime.InteropServices.COMException

Can I use the Marshal object at Asp .Net? If not what can i do to do some background process

I call at this way

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic
Dim Batch As BatchBR.IExport = Nothin
Dim Arg as Strin
Tr
Batch = CType(Marshal.BindToMoniker("queue:/new:BatchBR.Export"), IExport
Catch l As Exceptio
Console.WriteLine("Caught Exception: " & l.Message
End Tr
Batch.Process(Arg
Marshal.ReleaseComObject(Batch
End Su

Thank

Elton
Nov 18 '05 #1
2 1545
make sure aspcompat is set to true for you form this sets up some plumbing
in order for a webpage to call into a COM interface

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Elton Rabello" <an*******@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
Hi,

I developed a component using 'Queue', it works fine at a Windows application, but i call it at the Asp .Net and return the error
'System.Runtime.InteropServices.COMException'
Can I use the Marshal object at Asp .Net? If not what can i do to do some background process?
I call at this way:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Batch As BatchBR.IExport = Nothing
Dim Arg as String
Try
Batch = CType(Marshal.BindToMoniker("queue:/new:BatchBR.Export"), IExport) Catch l As Exception
Console.WriteLine("Caught Exception: " & l.Message)
End Try
Batch.Process(Arg)
Marshal.ReleaseComObject(Batch)
End Sub

Thanks

Elton

Nov 18 '05 #2
Thanks, but i have a bigger problem, sometimes it works, sometimes not. Sometime is appears running at "Execution Process" at "Component Services", sometimes it don´t cause any error and not run at "Exectuion Process"

Thanks agai

Elton Rabello
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: syd | last post by:
Hello all, In my project, I have container classes holding lists of item classes. For example, a container class myLibrary might hold a list of item classes myNation and associated variables...
0
by: William Stacey | last post by:
The following code works, but I can't figure out why. I take a struct with two members, a single byte and byte. I then marshal the whole struct to a byte. I create a new struct (without init'ing...
13
by: Just Me | last post by:
The following almost works. The problem is Marshal.PtrToStringAuto seems to terminate at the first null so I don't get the full string. Any suggestions on how to fix this? Or how to improve the...
6
by: william.thorpe.b | last post by:
I have recently switched from VS2003 to VS2005 and at the same time from V1 to V2 of the .NET Compact Framework. The target is a Windows CE 5.0 device and an ARMV4I processor. ...
2
by: Pierre Rouleau | last post by:
Hi all, When using Python 2.4.x on a Win32 box, marshal.loads(marshal.dumps(1e66666)) returns 1.0 instead of infinity as it should and does under Python 2.5 (also running on Win32 ). This...
5
by: Anurag | last post by:
I have been chasing a problem in my code since hours and it bolis down to this import marshal marshal.dumps(str(123)) != marshal.dumps(str("123")) Can someone please tell me why? when...
2
by: O.B. | last post by:
When using Marshal to copy data from a byte array to the structure below, only the first byte of the "other" array is getting copied from the original byte array. What do I need to specify to get...
0
by: Charming12 | last post by:
Hi All, I have a strange problem and due to my inefficiency with IntPtr i am unable to figure it out. I have an structure something like: public struct Detail { public int age; public...
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
2
by: O.B. | last post by:
I have operation within a class that marshals the data into a byte array. Below are three different ways that work. Are there any downsides to using one over the the other? public virtual byte...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.