Hosting OWC11 in a user control

J

John the novice

Hi,

Im trying to use a OWC11 component in a UserControl which is being hosted in
a web browser but im unable to get it to work.

What I have is an empty user control (i put just a single label on it). This
user control is used in a web page and is activated by the following html code

<OBJECT ID="Cv"
classid="http:wcv.dll#wcv.UserControl1" >
</OBJECT>

When I navigate to the page my label is shown as expected. However if I add
the OWC11 piviot table control to my user control the web browser no longer
shows my user control.

Can anyone tell me what I need to do to get this to work ?

My User control is written using Visual studio 2005 and im using IE 6 to try
and view the control.

If I take my user control with the OWC11 component included and host it in a
windows form it works fine, it just when its hosted in a web browser that it
fails. No error message is display by IE, all it shows is the little square
box indicating that it failed to load the user control.

Thanks in advance,
John
 
A

Alvin Bruney

OWC support in 2005 has been disabled so that is most likely the source of
your problem.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
J

John the novice

Thanks for the suggustion, however Ive already got around that issue. Ive now
managed to enable some debugging in IE on the client PC and it reports the
following:-

Creating security manager

Microsoft.IE.Manager: Microsoft.IE.Manager: unique id lgth = 46
Microsoft.IE.SecureFactory: Create SecureFactory() with security information
Microsoft.IE.Manager: Created secure factory
Microsoft.IE.SecureFactory: Creating instance of the object in the correct
domain
Microsoft.IE.SecureFactory: pUrl = http://earthandbeyond/icv/test1.HTML
Microsoft.IE.SecureFactory: id =
86474707A3561627478616E646265697F6E64610000000
Microsoft.IE.SecureFactory: link =
Microsoft.IE.SecureFactory: licenses =
Microsoft.IE.Manager: Url = http://earthandbeyond/icv/test1.HTML
Microsoft.IE.Manager: UrlGetPartW returned 0
Microsoft.IE.Manager: UrlGetPartW returned 80070057
Microsoft.IE.Manager: CodeBase = http://earthandbeyond
Microsoft.IE.Manager: Application = icv
Microsoft.IE.Manager: Found a codebase
Microsoft.IE.Manager: UrlCanonicalize returned 0
Microsoft.IE.SecureFactory: URL codeBase: http://earthandbeyond/
Microsoft.IE.SecureFactory: URL application: icv
Microsoft.IE.SecureFactory: Locating domain for http://earthandbeyond/
Microsoft.IE.IDKey: Created key
Microsoft.IE.Manager: The domain does not exist.
Microsoft.IE.IDKey: Created key
Microsoft.IE.Manager: The domain does not exist.
Microsoft.IE.SecureFactory: Need to create domain
Microsoft.IE.SecureFactory: Application base: http://earthandbeyond/
Microsoft.IE.SecureFactory: Private Bin Path: bin
Microsoft.IE.IDKey: Created key
Microsoft.IE.SecureFactory: Trying to create instance of type
http://earthandbeyond/icv/ImpaqCubeViewer.dll#ImpaqCubeViewer.CubeViewer
Microsoft.IE.SecureFactory: System.Security.SecurityException: That assembly
does not allow partially trusted callers.
at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm,
PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor,
Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Activator.CreateComInstanceFrom(String assemblyName, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.AppDomain.CreateComInstanceFrom(String assemblyFile, String
typeName, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at Microsoft.IE.SecureFactory.CreateInstanceWithSecurity(Int32 dwFlag,
Int32 dwZone, String pURL, String uniqueIdString, String link, String
licenses)
The action that failed was:
LinkDemand
Microsoft.IE.SecureFactory: LOG exception
Microsoft.IE.SecureFactory: Creating log entry
?FusionBindError!name=ImpaqCubeViewer.dll ImpaqCubeViewer.CubeViewer



Any idea's ?

Thanks,
John
 
D

dflatcsharp

Can you explain that statement in detail? I have developed web AND
windows form applications (web aspx on vs2003) windows form using
VS2005 pro. The vs2005 pro edition did NOT contain vsto2005 BUT I was
adding OWC11 to my toolbox and dropping the OWC11 charts and
spreadsheets on my windows forms. That was working quite well (with a
few exceptions). I then realized that VS2005 Team edition contained
VSTO2005. I upgraded to VS2005 Team edition. I was expecting to find
a new Chart and Spreadsheet object to add to my toolbox (I did not). I
added Microsoft Office 11 chart to my toolbox and now when I drop the
chart on my windows form I STILL get an OWC11 Chart. What am I
missing? Does VSTO2005 contain a new chart object? I was expecting to
uninstall Office Web Components 2003 from my machine but now I am
hesitant. Can you shed any light on this very confusing subject?
Bottom line, what the heck is VSTO2005 if it does not contain Chart,
PivotTable, Spreadsheet objects?
 

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