Cannot create ActiveX Object (Excel) in visual studio.net 2003

Hi. I was able to develop a program that calls on a PDF writer (Neevia.com's docuPrinter SDK at http://www.neevia.com) to open and convert a Microsoft Excel file in ASP.net WebMatrix. However, I'm supposed to make it to Visual Studio.net 2003. I was able to move all the VB codes into the pages' code-behind, but except for this thing:


Private Sub createpdf(ByVal fname As String)
Dim farr() As String
= fname.Split(".")
Dim docToConvert As String
= fname
Dim DPSDK As Object
= CreateObject("docuPrinter.SDK")
DPSDK.DocumentOutputFormat = "PDF"
DPSDK.DocumentOutputName = Path.GetFileName(farr(0))
DPSDK.DocumentOutputFolder = Server.MapPath("/Temp") & "\"
DPSDK.HideSaveAsWindow =
True
DPSDK.DefaultAction = 1
DPSDK.ApplySettings()
Dim MSExcel : MSExcel = CreateObject("Excel.Application")
MSExcel.DisplayAlerts =
False
Dim XLDoc As Object = MSExcel.Workbooks.Open(docToConvert, 0, True
)
XLDoc.Activate()
XLDoc.PrintOut(, , ,
False
, "docuPrinter")
XLDoc.Saved =
True
XLDoc.Close()
XLDoc =
Nothing
ReleaseComObject(XLDoc)
MSExcel.Quit()
MSExcel =
Nothing
ReleaseComObject(MSExcel)
Dim RVal As Integer = DPSDK.Create
' Create output document
DPSDK =
Nothing
If (RVal <> 0)
Then
Label1.Text = "Error while converting the document!!!"
Else
Label1.Text = "Document Converted...."
End
If
End Sub



Error message says that "Cannot create ActiveX Object".

I found a tip somewhere that I should add security to my Excel application by going through DCOMCONFG and adding access to ASP.NET

After I did so, the error message disappeared.... but the program hangs!

I traced the events in task manager, and I saw that when I run my WebMatrix code (works ok), it opens EXCEL.EXE as my user account, while in Visual Studio.net, it opens EXCEL.EXE as user ASPNET. Is there perhaps a shortcut way to have my system read my Visual Studio.net application as my user account opening Excel too, so it could work (and if it does work, is there cause for concern when I upload my application in the server?)?
 
If not, can anyone help me why the code hangs in Visual Studio.net?

Also, I notice that EXCEL.EXE stays in my task manager even after calling my ReleaseComObject method:


Private Sub ReleaseComObject(ByRef Reference As Object)
Dim count As
Integer
Try
Do Until
System.Runtime.InteropServices.Marshal.ReleaseComObject(Reference) <= 0
count += 1
msgbox(count)
Loop
Catch
Finally
Reference =
Nothing
End
Try
End
Sub


Did I miss anything?


0
dguy202000
6/13/2005 6:49:42 AM
asp.net.vs2002-vs2003 3502 articles. 0 followers. Follow

0 Replies
914 Views

Similar Articles

[PageSpeed] 16
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

visual studio.net 2003 conflict visual studio.net 2003
hello does visual studio.net 2003 makes conflict with visual studio.net 2003? thank you for the help and for the support No, the RTM version (I think this is true also for Beta 2), will work on the same machine without any problems./Fredrik Normén - fredrikn @ twitterMicrosoft MVP, MCSD, MCAD, MCTASPInsidersMy Blog i am shure 2003 doenst conflict with 2003 ;-)-Hanneshttp://www.preishuber.net http://weblogs.asp.net/hpreishuber the subject says "visual studio.net 2003 conflict visual studio.net 2003". is he talking about 2003 and 2005 ? pradeep_TP I think he is talking abo...

Visual Basic .NET 2003 vs Visual Studio .NET 2003
Hi, If im going to be coding my ASP.NET in just VB.NET then would I be able to go for the cheaper option of buying Visual Basic .NET 2003 ?? - Carl S Yes.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog Are there any limitations if I was doing my ASP.NET with VB.NET in Visual Basic .NET 2003 than if I was using the full Visual Studio .NET 2003 ?? Or are the only advantages of Visual Studio .NET 2003 in that it supports more programming languages ?? - Carl S You should check the MS Web site, but I believe that, given an edition (Standard, Professional...

Visual Studio .NET vs Visual Studio .NET 2002 or 2003?
As an admin, I'm working to determing what systems I need to update with the update on MS08-017, particularly with respect to Visual Studio .NET 2002 and 2003. I've got quite a few systems that appear to have Visual Studio .NET, no 2002 or 2003 mentioned when I view what's there in Add/Remove Programs. Is there a definitive way to determine if I have a 2002 or 2003 version?   sandy_wood:Is there a definitive way to determine if I have a 2002 or 2003 version? In add/remove programs it would indicate it VS2003 as Visual Studio 2003. Alternatively launch the applicatio...

Loading Visual Studio.net 2003 on a pc with Visual Studio.net 2005 installed
I have recently installed Visual Studio.net 2005 on a pc and have been using it to create a .net 2.0 application. I also have pc running Visual Studio 2003 that I use to support a .net 1.1 application. This pc has broke. Would I be ok loading Visual Studio 2003 on the machine I have running Visual Studio 2005 so I can manage both the .net 1.1 and the .net 2.0 applications?               Thanks Danny Hmmm. Not sure if it works in that direction, but I installed VS2005 on a machine that has VS2003 already installed and they se...

can we migrate visual studio .net 2003 project to visual studio.net 2005
Hai friends, I am doing project in ASP.NET(vb language)  I have visual studio .net 2003 installed in my pc and i am doing my project in it , because i need to use additional functionality like "AJAX" , i want to use visual studio .net 2005 or visual studio .net 2008 my project folder name is "sqls" can i install visual studio .net 2005 or visual studio .net 2008 and migrate this project folder to work in visual studio .net 2005 or visual studio .net 2008 i have uninstall visual studio .net 2003 and install visual studio .net 2005 or visual ...

Error:Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the We
Hi, I installed the IIS 5.0 after VS.Net 2003 (1.1). after that I did run the aspnet_regiis -i at the visual studio command prompt. I am able to run local web application created on my PC. But when I tried to copy an web application created at shared PC into the wwwroot folder, I get the following error while trying to open the project in VS.Net. I've created the virtual directory for the project and also set the integrated windows authentication under the directory security tab in the IIS. Please help me resolving the problem. Thank You.   Do you have FrontPage Server Ext...

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See www.iis.net for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

Converting windows application using web service from Visual C#.net 2003 to Visual Studio.net 2005
Hello, everyone! I have a solution which contains a windows project,a web service project and several other library projects. These projects were coded under visual c#.net 2003. Now I need to converted them to use Visual Studo.net 2005. Does any one know any article providing step-by-step guide  to converting WINDOWS APPLICATION with web service? I can find one under MSDN for converting web project.  But I guess I am a little confused if mine should follow this article since I am using web service in my windows application? Thanks a lot in advance.  ...

Activex Componants, Visual Studio.net and C#.net
As part of a university project i have to a create an activex componant that times the download of a file of known size. This is so that my website can measure the bandwidth of any client machine that accesses it.I am coding my website in C#.net using visual studio.net 2003, i have never used activex before and am unsure of how to link my web site to an activex componant let alone code the activex componant.Below i have wrote an algorithm of what i believe the activex componant will do. I am unsure of whether this is correct.Start downloadStart timerError = Falsewhile error = false &nbs...

Visual Studio .Net? Visual Basic .Net?
Okay, I admit it -- I know nothing about .Net. I'm a Visual Basic and ASP developer. DotNetNuke is my first tentative step into the whole ".Net Thing", and I'm looking for some advice... What do I really need to be able to make some modifications, or new modules for DotNetNuke? Do I need the full, THOUSAND DOLLAR Visual Studio .Net 2003 package, or can I get away with the HUNDRED DOLLAR Visual Basic .Net Standard package?Chameleon Systems, Inc. You can use webmatrix, available here for free. One of the drawbacks of webmatrix however is that it does not support code-be...

Visual Basic.NET or Visual Studio.NET?
OK, this has probably been asked before... I'm a student looking to cut my costs, and I can do this by just purchasing Visual Basic.NET as opposed to the fully-fledged Visual Studio.NET application. Of course, I'll only be able to program in VB, but that's fine with me. I wanted to know if all of the ASP.NET specific options are available, such as using a WYSIWYG editor? I'd also like to know if VB.NET has IntelliSense, or that's a specific option only available to Visual Studio.NET users. Thanks in advance. I'd have to believe that VB.Net has intellisense. What is the price d...

installing .net 2.0 with visual studio.net 2003
Hi, I'm currently developing using VS.net 2003, .net1.1. Due to development reasons i can't upgrade to vs2005 yet. However i want to upgrade to SQL Express 2005, but this needs .net 2.0. Will my VS.net 2003 still work if i install .net 2.0? Are there any known problems? Thanks, drazic19 .Net 1.1 and  .Net 2.0 will work side by side. Baiju  "This posting is provided "AS IS" with no warranties, and confers no rights"...

Running Visual Studio .NET 2003 and Visual Studio 2005 on the same machine.
Hi there,   I have many projects i develop and continue to maintain on my server. Visual Studio .NET 2003 is currently installed and is what i use to do this. I'd really like to install Visual Studio 2005 and give that a whirl on the same machine, and perhaps develop upcoming sites with it also.I understand that upon installation of VS 2005 it will install the 2.0 Framework. Will this effect my 1.1 sites at all? Does the 2.0 Framework upgrade the 1.1 framework, or does it leave the 1.1 framework intact so older projects can still use it?Any advice would be welcome! :)Thanks,Cr...

How Do I Upgrade to .NET Framework 2.0 From Visual Studio .NET 2003
Hello,I am currently using Visual Studio .NET 2003, which uses the .NET Framework 1.1. How do I upgrade to 2.0, and integrate it into my IDE?Thanks!~ Di You need to get VS2005 to develop under .Net 2.0."This posting is provided "AS IS" with no warranties, and confers no rights"...

Web resources about - Cannot create ActiveX Object (Excel) in visual studio.net 2003 - asp.net.vs2002-vs2003

ActiveX - Wikipedia, the free encyclopedia
... 1996 and is commonly used in its Windows operating system. In principle it is not dependent on Microsoft Windows, but in practice, most ActiveX ...

유자드 웹-무료 웹브라우저(Flash, ActiveX) on the App Store on iTunes
Get 유자드 웹-무료 웹브라우저(Flash, ActiveX) on the App Store. See screenshots and ratings, and read customer reviews.

Activex - ARN
The source for IT industry news, views and analysis across the channel, business and technology

Microsoft warns of Video ActiveX flaw; Vista unaffected
A new vulnerability has been found in ActiveX that affects users running …

South Korea looking to scrap ActiveX payment requirement bad news for Internet Explorer
In 1999, South Korea pushed a law that forced online vendors to adopt Microsoft ActiveX, in order to utilize the SEED cipher developed by the ...

ActiveX for Windows - Free downloads and reviews - CNET Download.com
The most downloaded ActiveX software, including Audio Capture ActiveX Control, VB Activex Controls (HVEE 2008), and Innobate Product Key Recovery ...

Microsoft offers patches to ward off ActiveX attacks
In rare out-of-cycle security update, Microsoft fixes hole that put IE users at risk of attacks via ActiveX and other controls. Read this article ...

RIM releases patch for buggy ActiveX control
Research In Motion has patched a piece of software for Windows PCs that could leave them vulnerable to attack when loading new applications onto ...

IE's new ActiveX vulnerability: drive-by exploiting msvidctl.dll
IE has a new ActiveX vulnerability, now being exploited by drive-by downloads: in msvidctl.dll. In IT Blogwatch, bloggers unpick fact from fiction. ...

Activex Articles on Engadget
Activex articles, stories, news and information.

Resources last updated: 12/30/2015 10:20:05 AM