Building COM Interop Library Using 4.0 Framework / VS2010?

Feb 7, 2011

A client of mine is only proficient in development for ASP Classic. They have recently acquired an account for a site originally written in ASP.NET. They are rolling the site into something they can actively maintain, but the site originally included an image handler that took dynamically changing data regarding water levels and outputs an image containing a graphical representation of that data. The requirement is to develop a COM interop library that can be registered on the server and called with CreateObject to generate the same image's byte array for output using Response.BinaryWrite. The COM interop library must be registered at the remote site on a Windows 2000 Server, and I can't make any assumptions about their having access to regasm/gacutil to accomplish that task.

The Difficulty

I've built the class library by creating a Class Library project in Visual Studio 2010, choosing "COM Class" from the template, and inserting my code to generate a class with a single public method to return a byte array when given an integer (well, enumerator, but all the same). Unfortunately, even on my own development machine after building the library and registering (regasm) and caching the assembly (gacutil), I can't make a call through Classic ASP to instantiate the object, receiving instead an "ActiveX component can't create object" error. And, of course, at the server site, the DLL can't be registered, the response being "Required module was not found."

Resources I've Used

I've already had a look through the following articles and haven't turned up the answers I need:

(basic steps) Walkthrough: Creating COM Objects with Visual Basic Build and Deploy a .NET COM Assembly .NET COM+ Interop Component with Classic ASP

What I Need

Essentially what I need is a bit of hand-holding on a kind of step by step of what it's going to take to meet the requirements and create a COM+ interop module correctly in VS2010. Creating the actual class object itself isn't terribly difficult. However, none of the articles I've looked through really discuss project options or build procedures with VS2010 or the .NET 4.0 Framework, nor have any of them really discussed if there are special considerations for deploying to older systems like Windows Server 2000 and the actual registration of the library on a system with only, say, regsvr32 on hand. Unfortunately, most of the information I find centers on ASP.NET 2.0 and supporting older applications while still in the middle of transitioning from ASP Classic to the new technology.

View 1 Replies


Similar Messages:

Controls :: Read And Import MS Word Document To Database Using Microsoft Interop Word Library

Feb 25, 2016

I have QuestionTable.

ID Question Answer1 Answer2 Answer3 Answer4

But I want import from MS Word into table. I have question like this:

Question:   @1.The capital of India.

 Answer:$A) Dushanbe;$B) Moscow;$C) Delhi;$D) Kabul;

@2.The capital of Tajikistan.

$A) Dushanbe;$B) Moscow;$C) Delhi;$D) Kabul;

@3.The capital of Afganistan.

$A) Dushanbe;$B) Moscow;$C) Delhi;$D) Kabul;

Output result:

ID Question Answer1 Answer2 Answer3 Answer4

1 1.The capital of India. A) Dushanbe; B) Moscow; C) Delhi; D) Kabul;

View 1 Replies

Dll - How To Slow The First Time After Building A Class Library

Jun 10, 2010

I've got a web app solution containing a class library project.

Whenever I rebuild the class library and then refresh the page, it takes ages the first time, and is then quick again subsequently.

It's almost as if the newly rebuilt dll is having to 'bed in' to the app.

View 3 Replies

Building Application Framework For Database Web App

Nov 20, 2010

I am looking to build a web application from the ground up. I have done a bit of research, however I just thought I would post here to see what kind of responses I get. I will give a brief description of the type of application I am trying to build. It will be a database web app for managing clients and financials of those clients. The application will need a secure log on system for approximately 160 end users, with the ability to change permissions for each user given their individual rights.

Depending on the type of user created they will have access to 1 of 7 unique application modules within the app framework. A data dictionary will be designed and created prior to starting the project as the 7 unique application modules will have common database fields and custom relationships. Based on this information, what asp.net tools, libraries or books would you recommend using?

View 4 Replies

Unable To Install VS2010 And .NET Framework

Mar 9, 2011

unable to install VS2010 and .NET framework

View 1 Replies

Configuration :: Framework 4. Not In Build Dropdown Vs2010?

Feb 11, 2011

my clients PC has framework 4.0 installed and my web app runs in IIS 7 configured to use framework 4.0.

but for some reason when i open the same app in VS2010 it says that the app is running in framework 2.0??

when i open the startup options and go to build, the dropdown for the framework does not have framework 4.0 as an option only goes up to 3.5?

View 1 Replies

Visual Studio 2010 - Upgrade A VS2010 3.5 Entity Framework Project To EF 4.0?

Nov 4, 2010

How do I upgrade an existing VS2010 ASP.Net 3.5 project from Entity Framework 3.5 to Entity Framework 4.0?

Do I:
- Change the references?
- Change the target framework?

View 2 Replies

Configuration :: Upgrading Website To Vs2010 And Framework 4.0 - Internal System Error 500 IIS 7.0?

Sep 3, 2010

I have recently developed a new vs2010 web application that I would like to add to my web site.

The existing website was developed using vs2008. The web site is hosted on a windows 2008 server running iis 7. My new web application sits below my main website i.e. mywebite mywebsite/mynewwebsite

I have set the application pools for the mynewwebsite to be asp.net v4.0, leaving the application pools for mywebsite as .net v2.0 If I try and open my new web application i.e. [URL] then I get 500. Internal server error. I assume that it is iis that is unhappy here. Do I have to rebuild the whole of my web site to be vs2010 using asp.net v4.0. If I do should I use ASP.Net v4.0 or ASP.net v4.0 Classic for my application pools, and should I have a separate and distinct application pool for each of my web applications ( I have 4 of these) Just to clarify my clients can log on the web site as

[Code]....

View 1 Replies

C# - Selecting And Building A Control From A Control Library Dynamically, Using The Control Name From A Table?

Feb 1, 2010

I have a custom DDL that lives in my Server control library. Currently I add this control to a table by strongly typing the name of the control, the customary way.

Control_Library.Report_NumberDDL newDDL = new Control_Library.Report_NumberDDL();


What I want to be able to do is dynamically create that control by pulling the control name from a table. So I would have the name of the control in my code, in this case "Report_NumberDDL", and I would like to then create the control without having to strongly type it.

Something like this, though I know this doesn't work:

string controlName = "Report_NumberDDL";

Control_Library."controlName" controlNum1 = new Control_Library."controlName"();

Edit:I tried to do this:

Type type = Type.GetType("Control_Library.Report_NumberDDL");
object control = Activator.CreateInstance(type);

But on the CreateInstance(type) I get a null value exception. So the Type isn't getting created correctly.

View 1 Replies

Visual Studio :: Getting "unable To Start Debugging On The Web Server" Error In VS2010 Targeting 4.0 Framework

Aug 11, 2010

I am getting this error, without any further details, when attempting to debug my ASP.Net project in VS2010. There are other developers using the same tools and code who are not having this problem therefore I know the problem is not in the web.config file. I have found several suggestions when googling the issue and tried them all to no avail. I uninstalled and re-installed VS2010 along with the .Net 4 framework. I made sure Anonymous as well as Windows authentication is enabled in IIS. I uninstalled and reinstalled IIS. I am at a loss. I can attach to the process and debug the ASP.Net code that way, but what I really need to be working on is a Silverlight app that is called from the ASP.Net and the breakpoints don't work in Silverlight when I attach to the process manually.

View 3 Replies

C# - Twitter Api Library / Get The Twitters From Parse Out The New Ones And Use A Library To Retweet Them On Own Account?

Mar 2, 2010

I am looking at the twitter api page http://apiwiki.twitter.com/ and I noticed that they have already built libraries that are wrappers against the twitter api. So I am thinking this is the best way to go but I am unsure which C# library I should use.

What I am trying to do is make some simple service or cmd line application that will help me automate retweeting.

So I am looking for a library that will allow me to get posts from other twitter accounts and then retweet them from another account.

I am not sure if the library can do this or not. Otherwise I was thinking of getting the RSS feed from the twiter account I want to get the twitters from parse out the new ones and use a library to retweet them on my own account.

I have not used twitter much so I am hopping someone can shed some light on this.

View 2 Replies

How To Configure 3.5 To Use Excel Interop

Mar 23, 2010

How can I configure my asp.net application to work with excel interop. I added a reference to my application but when I try and say Imports Microsoft.Office.Interop.Excel it doesnt work.

View 1 Replies

How To Do Excel Interop On Windows 2008

Sep 2, 2010

Recently deployed my web app on Windows Server2008, IIS7 (with Office installed). After chasing (& catching) various other errors, I'm facing one I'm not sure even where to begin.

On Cassini (visual studio dev server) everything worked flawlessly (reading excel through excel interop).

On w2008 IIS it throws vague error:

Value cannot be null. Parameter name: o [ArgumentNullException: Value cannot be null.....

Currently, I'm going to add null check and see if things get better but I do suspect that it just blows up and disposes on finally block before it even starts reading anything.

Tried to set application pool to run under localsystem, but that didn't change anything.

[code]....

View 1 Replies

Running Into A .NET COMException With MS Office Interop?

Feb 16, 2010

I am trying to work with the Windows clipboard and Office Interop in an ASP.NET web application.Everything works well on my local machine running XP (i have created a Windows application first which ran perfectly well on local machine). Then I have executed it on a server running Windows Server 2003 and it worked there as well.Then I made a ASP.NET sample project and it worked on my local machine. However when this time I deployed it at the server, after banging my head with permissions, it started giving me this exception which i have no idea why it is doing this:

System.Runtime.InteropServices.COMException (0x80048240):
Shapes (unknown member): Invalid request. Clipboard is empty or
contains data which may not be pasted here.
at Microsoft.Office.Interop.PowerPoint.Shapes.Paste()

Is the problem with any sort of permissions again on clipboard? If yes, how can I grant appropriate permissions?

View 1 Replies

WCF / ASMX :: Using Word Interop From Web Service

Jan 27, 2011

I have a wcf web service that uses the Word interop to produce documents. All works fine when I run it in visual studio, but when I host the web service in IIS (as it will eventually be on a server) and call it there it will fire up WINWORD.exe but then hangs on a call to the "_WordApp.Documents.Add" method and then times out. I realise that the difference between me running in VS and IIS is that in IIS it will now be running as ASPNET user and I have taken the following steps to try and fix this problem.

I used DCOMCNFG to allow permission for ASPNET on "Microsoft Office Word 97 - 2003 Document" (which I thought was strange as I have Office 2007 installed) and this got me past an earlier error that was stopping me instantiating Word, but then I got stuck where I am now.I then tried using impersonation in the web config to get Word to run as my user (as it does when using VS) but it still runs as ASPNET I've heard that this is because the first time a user fires up Word it pops up a modal form asking you to confirm your name and initials, and because ASPNET hasn't run Word before then I somehow need to get past this form. How can I login as ASPNET to do this? Does this sound right? If I can't do this, how I can get Word to run as a different user?

View 4 Replies

Creating Excel File Using Office.Interop?

Nov 10, 2010

In my asp.net page, I am creating excel file using Office.Interop and saving. The application works correctly in my local. When I am deploying in Win 2003 server I am getting below Error. I don't have excel installed in server.

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

View 12 Replies

C# - Microsoft Office Interop Excel 12.0 Not Working In IIS 7?

Feb 25, 2010

I am creating a pivot table excel sheet in my ASP .NET web application using Microsoft Office Interop Excel 12.0 components. It is creating the excel file correctly, when i run it from my Visual Studio 2008 in Debug/Release mode.

But when i deploy the solution in IIS 7, first i got some permission issues, which i resolved by giving permission in the DCOMCNFG file. Now i am getting the following error, when trying to open the Excel file:

[code]....

These are the code which i used to open and close the excel application object

[code]....

View 1 Replies

C# - Why Not Running Microsoft.Office.Interop.Outlook

Sep 6, 2010

I wrote some code about sending mail, Task, Appoinment etc. For example you can add someone to your outlook contact list over asp.net page. Every thing is ok on my local machine. But if I publish my application to a server I can not add noone on my outlook.

View 2 Replies

Merge Word Documents (Office Interop & .NET) - Keep Formatting

Mar 25, 2010

I'm having some difficulty merging multiple word documents together using Microsoft Office Interop Assemblies (Office 2007) and ASP.NET 3.5. I'm able to merge the documents, but some of my formatting is missing (namely the fonts and images). My current merge code is shown below.

private void CombineDocuments() {
object wdPageBreak = 7;
object wdStory = 6;
object oMissing = System.Reflection.Missing.Value;
object oFalse = false;
object oTrue = true;
string fileDirectory = @"C:documents";
Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document wDoc = WordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
string[] wordFiles = Directory.GetFiles(fileDirectory, "*.doc");
for (int i = 0; i < wordFiles.Length; i++) {
string file = wordFiles[i];
wDoc.Application.Selection.Range.InsertFile(file, ref oMissing, ref oMissing, ref oMissing, ref oFalse);
wDoc.Application.Selection.Range.InsertBreak(ref wdPageBreak);
wDoc.Application.Selection.EndKey(ref wdStory, ref oMissing);
}
string combineDocName = Path.Combine(fileDirectory, "Merged Document.doc");
if (File.Exists(combineDocName))
File.Delete(combineDocName);
object combineDocNameObj = combineDocName;
wDoc.SaveAs(ref combineDocNameObj, ref m_WordDocumentType, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
}

I don't care necessarily how this is accomplished. It could output via PDF if it had to. I just want the formatting to carry over.

View 1 Replies

C# - Why Does Web Application Timeout Using Microsoft.Office.Interop.Word

Feb 21, 2011

I have been using using Microsoft.Office.Interop.Word in my webserver (yes, i know it is not recommended). When I ran it on my machine, it runs fine, but when running on the server I get a timeout on the following line:Documents.Open //when trying to open the file.Is there something I'm missing? Is there a better way to edit a Word document within web servers/websites? (I can't create a new one using string builder or outputting into file; I need to edit an existing one that sits on the server.)

View 1 Replies

Databases :: How To Create Matrix Report Using Microsoft.Office.Interop.Excel.dll

Jan 27, 2010

I wanto to create matrix report dynamically using Microsoft.Office.Interop.Excel.dll so that i can create pivot table and Report from this, how i can create these kind of repots where in user will drag and drop the details and it will create reports.

View 2 Replies

VS 2008 Could Not Load File Or Assembly 'Microsoft.Office.Interop.Word / How To Fix This Error

Dec 10, 2010

I am having an issue that I do not quite understand. I had an ASP project that I built using

Code:

<add assembly="Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>

while I still had Office 2007 still on my development PC. I recently upgraded to Office 2010 and even though the web.config file still remains with the above assembly reference, when I publish it and run it now i keep getting the following error ...

Quote:

Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

I also have installed the PIA for Version=14.0.0.0 on the server but I still get the same result.

View 12 Replies

Configuration :: Error Hresult E_fail Has Been Returned From A Call To A Com Component Windows 2003 Interop Dll

Dec 28, 2010

I am getting above error when I executing a method of Dll in VS 2005 and DLL is made in VB6 which is interoperable . I am unable to trace the error .

View 1 Replies

Configuration :: Running Framework 2.0 Application Within Framework 4.0 Website

May 18, 2010

I host a website that has recently been upgraded from .NET Framework 2.0 to .NET Framework 4.0. Within the website, I have an instance of BlogEngine which still requires .NET Framework 2.0. Each website is in it's own application pool. My issue is that when I browse to the blog portion of my website, I receive a 500.19 error with the following information...

The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration The web.conf file that is listed in the error message is the config file that belongs to my root website which is running .NET Framework 4.0. How do I get the two websites to run together in the same website using different versions of the .NET Framework?

View 2 Replies

Controls :: AutoFit DropDown Cell Width In Excel File Using Interop Excel

Jun 11, 2013

I need to auto fit the dropdown width to auto fit with the cell in excel using c#.net.

I have exported the dropdown to the excel using c#.

when  the column width of the cell is increated, the width of the dropdown should be auto fit to the width of the cell.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved