.NETGURU
VS.NET Interop Problems
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmigrate' list.


Bigger, Blair
-- This message, which was originally sent to "aspngvs", has been copied to "aspngmigrate" mailing list by the List Master --This message is in MIME format. Since your mail reader does not understandthis format, some or all of this message may not be legible.------_=_NextPart_001_01C12BE9.61E69400Content-Type: text/plainHas anyone wrapped a COM object that internally used ASP calls likeResponse.Write? My COM works fine with old ASP, but when I wrap it and try to use in inASP.NET I get a System.Runtime.InteropServices.COMException: Object variable or With blockvariable not set. I have referenced the COM - which when VS.Net creates the wrapper it alsopulls in the ASPTypeLibrary as well. Is there something special I need todo. All of my other methods inside the COM work fine, but the methods thathave output (Response.Write) calls, throw this exception every time. Thanks, Blair------_=_NextPart_001_01C12BE9.61E69400Content-Type: text/htmlContent-Transfer-Encoding: quoted-printable<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =xmlns:w=3D"urn:schemas-microsoft-com:office:word" =xmlns=3D"http://www.w3.org/TR/REC-html40";><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =charset=3DUS-ASCII"><meta name=3DProgId content=3DWord.Document><meta name=3DGenerator content=3D"Microsoft Word 10"><meta name=3DOriginator content=3D"Microsoft Word 10"><link rel=3DFile-List href=3D"cid:filelist.xml@01C12BC7.92CEB0B0"><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings></xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument></xml><![endif]--><style><!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal    {mso-style-parent:"";    margin:0in;    margin-bottom:.0001pt;    mso-pagination:widow-orphan;    font-size:12.0pt;    font-family:"Times New Roman";    mso-fareast-font-family:"Times New Roman";}a:link, span.MsoHyperlink    {color:blue;    text-decoration:underline;    text-underline:single;}a:visited, span.MsoHyperlinkFollowed    {color:purple;    text-decoration:underline;    text-underline:single;}span.EmailStyle17    {mso-style-type:personal;    mso-style-noshow:yes;    mso-ansi-font-size:10.0pt;    mso-bidi-font-size:10.0pt;    font-family:Arial;    mso-ascii-font-family:Arial;    mso-hansi-font-family:Arial;    mso-bidi-font-family:Arial;    color:windowtext;}span.EmailStyle18    {mso-style-type:personal-reply;    mso-style-noshow:yes;    mso-ansi-font-size:10.0pt;    mso-bidi-font-size:10.0pt;    font-family:Arial;    mso-ascii-font-family:Arial;    mso-hansi-font-family:Arial;    mso-bidi-font-family:Arial;    color:navy;}@page Section1    {size:8.5in 11.0in;    margin:1.0in 1.25in 1.0in 1.25in;    mso-header-margin:.5in;    mso-footer-margin:.5in;    mso-paper-source:0;}div.Section1    {page:Section1;}--></style><!--[if gte mso 10]><style> /* Style Definitions */=20 table.MsoNormalTable    {mso-style-name:"Table Normal";    mso-tstyle-rowband-size:0;    mso-tstyle-colband-size:0;    mso-style-noshow:yes;    mso-style-parent:"";    mso-padding-alt:0in 5.4pt 0in 5.4pt;    mso-para-margin:0in;    mso-para-margin-bottom:.0001pt;    mso-pagination:widow-orphan;    font-size:10.0pt;    font-family:"Times New Roman";}</style><![endif]--></head><body lang=3DEN-US link=3Dblue vlink=3Dpurple =style=3D'tab-interval:.5in'><div class=3DSection1><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'>Has anyone wrapped a COM object that internally used =ASPcalls like Response.Write?<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'>My COM works fine with old ASP, but when I wrap it =and tryto use in in ASP.NET I get a <o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p><p class=3DMsoNormal><i style=3D'mso-bidi-font-style:normal'><font =size=3D2face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial;font-style:italic;mso-bidi-font-style:normal'>System.Runtime.InteropServices.COMException:= Objectvariable or With block variable not =set.<o:p></o:p></span></font></i></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'>I have referenced the COM - which when VS.Net =creates thewrapper it also pulls in the ASPTypeLibrary as well. Is there something =specialI need to do. All of my other methods inside the COM work fine, but the =methodsthat have output (Response.Write) calls, throw this exception every =time.<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'>Thanks,<o:p></o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p><p class=3DMsoNormal><font size=3D2 face=3DArial><span =style=3D'font-size:10.0pt;font-family:Arial'>Blair<o:p></o:p></span></font></p></div></body></html>------_=_NextPart_001_01C12BE9.61E69400--
Reply to this message...
 
    
Simon Fell
There's a flag you have to set to have ASP.NET expose the old ASP
objects, it doesn't do it by default. add this to the top of your aspx
files.

<%@ Page aspCompat=3D"true" %>

Cheers
Simon

On Thu, 23 Aug 2001 11:36:31 -0400, in asp-ml you wrote:

>-- This message, which was originally sent to "aspngvs", has been copied=
to "aspngmigrate" mailing list by the List Master --
[Original message clipped]

Reply to this message...
 
 
System.Runtime.InteropServices.COMException




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification