An ASP.NET page exists of an aspx file and an aspx.cs file. The code in the
aspx.cs file is compiled into the dll in the bin directory.
The first line in your aspx file is something like:
You need to add AspCompat="true" to this line.....
So your new line should say:
AutoEventWireup="false" Inherits="Project.Graph" AspCompat="true"%>
Have you tried it exactely as abonve, 'cause I believe it's case
I had the same problem with OWC10, it worked without the AspCompat... on
WinXP pro and failed on Win2k.....
(I don't know if it works with your wrapper dll...)
> Thanks Martijn...that looks like an excellent lead...that may be the
> problem, but I have a couple of questions:
> I did some reading on the Microsoft Knowledge Base about "AspCompat" and
> recommends adding
> the following command to ASP.Net pages:
> That looks like old ASP code, not ASP.Net code...I don't understand how
> put code like that in an ASP.Net
> page. I tried it and it didn't work...the ASP.Net page wants to see VB
> and that's HTML code.
> Another question is this call that I'm having a problem with is not on the
> ASPx page at all. It's in a separately
> compiled DLL assembly (I've developed my own "wrapper" DLL around the
> Web Components).
> That might mean I'm sunk without a solution...
> Here's a quote from an article on this subject:
> STA components cannot be used from .NET Framework code modules (compiled
> .NET assemblies); they can be used only from ASP.NET pages
> Thanks for your help,
> > Hi Chuck,
> > Try adding the following in the Page directive of your aspx file:
> > AspCompat="true"
> > Martijn
> > > I have a VB application that I've converted to DotNet that uses the
> > > Web Chart Components to draw graphs. There is apparently an
> > incompatibility
> > > between the OWC10.DLL component and DotNet Interop Services.
> > > The application fails on the following call:
> > > Dim objBinaryData As Object = ChartSpaceObj.GetPicture(FileType,
> > > ChartWidth, ChartHeight)
> > > with the following error:
> > > System.Runtime.InteropServices.SafeArrayTypeMismatchException:
> > Specified
> > > array was not of the expected type
> > > Apparently DotNet Interop Services doesn't like the variable that
> > OWC10.DLL
> > > is attempting to return, but its returning an "Object". Inside of the
> > > object is a binary array of the form Byte(), but I haven't even gotten
> > > the point of doing a type conversion on it. It fails when it trys to
> > > receive it as an object. I'm not sure I understand why this is
> > > Is DotNet looking inside of the Object variable and finding something
> > > doesn't like? Does anyone know of a solution to this problem?
> > > Thanks,
> > > Chuck