473,769 Members | 3,755 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not load file or assembly 'Microsoft.Offi ce.Interop.Outl ook, Version=12.0.0. 0,

OuTCasT
374 Contributor
Hi

I have created an asp.net project that exports items from datagridview to and outlook calendar
This is the code that i have used..

Expand|Select|Wrap|Line Numbers
  1. Dim body As String
  2.         Dim ends As String
  3.         Dim location As String
  4.         Dim start As String
  5.         Dim subject As String
  6.  
  7.         'Create an outlook application
  8.         Dim oApp As Microsoft.Office.Interop.Outlook.Application
  9.         oApp = New Microsoft.Office.Interop.Outlook.Application()
  10.  
  11.         'Get Namespace and Logon
  12.         Dim oNS As Microsoft.Office.Interop.Outlook.NameSpace = oApp.GetNamespace("mapi")
  13.  
  14.  
  15.         'Create a new appointment
  16.  
  17.         Dim oAppt As Microsoft.Office.Interop.Outlook.AppointmentItem
  18.  
  19.  
  20.  
  21.         For Each row As GridViewRow In GridView3.Rows
  22.             oNS.Logon("YourValidProfile", Missing.Value, False, True) 'todo:
  23.             oAppt = oApp.CreateItem(OlItemType.olAppointmentItem)
  24.             body = row.Cells(0).Text
  25.             ends = row.Cells(1).Text
  26.             location = row.Cells(2).Text
  27.             start = row.Cells(3).Text
  28.             subject = row.Cells(4).Text
  29.  
  30.             oAppt.Subject = subject
  31.             oAppt.Body = body
  32.             oAppt.Location = location
  33.  
  34.             oAppt.Start = start
  35.             oAppt.End = ends
  36.  
  37.             oAppt.Save()
  38.  
  39.  
  40.             oNS.Logoff()
  41.         Next
It works locally on my machine but once i have uploaded the files to the server on which the application is running then i get the following error.

Could not load file or assembly 'Microsoft.Offi ce.Interop.Outl ook, Version=12.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c' or one of its dependencies. The system cannot find the file specified.

I have loaded the PIA's on the server itself and have checked the C:\Windows\Asse mbly folder and the Microsoft.Offic e.Interop.Outlo ok assembly is within that folder and the version is 12.0.0.0

Can anyone direct to a solution if possible please.
Sep 14 '09 #1
3 11651
Frinavale
9,735 Recognized Expert Moderator Expert
You need to install Outlook on the server... the Interop class (in your project) is just a wrapper class that allows .NET to access the COM objects in the Outlook assembly. If this assembly (Outlook) is not installed on the server then this will not work.
Sep 14 '09 #2
OuTCasT
374 Contributor
I have installed Outlook on the server. Now i get this response

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

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNE T on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="tr ue"/>, the identity will be the anonymous user (typically IUSR_MACHINENAM E) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties " and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access
Sep 15 '09 #3
Frinavale
9,735 Recognized Expert Moderator Expert
Have you tried to do what the error message is suggesting that you try to do?
Sep 15 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
10805
by: urs | last post by:
Two days ago, I built an ASP.NET 2.0 application and published it on a shared IIS 6 Web server. After publishing, and during the whole day, it worked fine. The server remained untouched since. Today, I wanted to access the home page of the application again with a browser. But instead of the proper page, I just got an ugly message: Server Error in '/' Application.
1
3573
by: ddelaney | last post by:
I've seen this posted before in many places, but have yet to find a real fix. I have a web application on dev server right now, and randomly, hours or days, it returns the expception posted below. If I copy the incHeader.ascx.vb over to the server again, it appears to recompile and works fine, again, for random period of times. Even precompiling is no help. Is there a fix or workaround so this can some stability? Any help at all is...
5
33207
by: BSM | last post by:
Hi, I developed one project in my Remote machine. I used Microsoft Enterprise Library. It is working fine in Remote computer. When I open the project and run in my local computer. It shows the following error. Error 1 Could not load file or assembly 'Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
0
2909
by: Cheryl | last post by:
I am new to C# and I am trying to convert this vba code to C#: Columns("A:A").Select Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _ Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _ :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1),
1
1593
by: =?Utf-8?B?VGVycnkgQWxsZW4=?= | last post by:
When referencing the Microsoft Graph 11.0 Object Library in a C# applicaion using Visual Studio 2005 it uses the path below. C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Graph\12.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Graph.dll I have both Office 2003 and 2007 installed on my machine but wish to only reference the version 11 COM components. Do to my situation I need to use both versions of Office, but the intended...
3
261
by: Brad Isaac | last post by:
Hi, I have a working app that uses interop.outlook.dll to export items to Outlook calendar. I downloaded the Primary Interop Assemblies for Office 2k7 today and still cannot get a working outlook.interop.dll to import. Are there any dll gurus out there who can help me get this up and running with Outlook 2007? I am using VS 2005.
2
12173
by: Bill Nguyen | last post by:
I installed Web Expression to my development PC . A new VS 2005 application build on our terminal server gave me this error msg: *Unable to install or run the application. The application requires that assembly office Version 12.0.0.0 be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator* How can I remove the requirements (or solve the problem) on client PC's / server?
0
2088
by: Luft | last post by:
I'm just starting to work with VSTO and Word 2007 but I've run into a problem when trying to create an add-in. I get the warning: This project references the primary interop assembly for Microsoft Office Word 2007, but this primary interop assembly is not installed. I have installed the interop assembly by running: PrimaryInteropAssembly.exe I also set a project reference to the Microsoft Word 12.0 Object Library but I still get this...
0
9583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8869
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.