i have a console app in c#, which needs to open an outlook session.
when i put it on the server it faild, and it doesn't even throw expetion when the following code done:
Outlook.Application app=new Microsoft.Office.Interop.Outlook.Application();
only when the outlook is open on the sever the code is working , because the app is set to:
app = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application;
is there somthing to do about it?
because i need the outlook to be close
Dania,
Do you have Outlook installed on the server?
Anyway, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Read more about that in the Considerations for server-side Automation of Office article.
Related
I have written a VBScript for Outlook that forwards email which are lying unread in the inbox for more than 30 minutes. When I manually run the vbs file it works perfectly fine, but when I trigger is through Windows Task Scheduler it gets stuck. Seems like it does not hit the Outlook and stops executing at the CreateObject(...) statement.
Could you please let me know how should I go about. I want to schedule it to run the script over Outlook every 30 min.
When I manually run the vbs file it works perfectly fine, but when I trigger is through Windows Task Scheduler it gets stuck.
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
As a workaround you may consider using EWS if you deal with Exchange profiles only, see EWS Managed API, EWS, and web services in Exchange. Or Outlook REST API which is available for Office 365 users, see Get Started with Mail, Calendar, and Contacts REST APIs.
Also you may consider using a low-level API on which Outlook is based on - Extended MAPI. Or just any other third-party wrapper around that API such as Redemption.
There are several tools that help to analyze the users behavior on your website. I would tend to divide them into ones that live on an own platform and which can be accessed through and API (like Google Analytics) and that ones that are to be installed on your own server (like Piwik).
I will launch a new web project soon, which requires such a tool and thus I wonder which one I should use. In my case I need to collect the data on my own server, so I will have to stick with the second type of tools. After playing around a little bit on my beta server I considered Piwik to be pretty nice to personalize, but until now, I had issues to set up piwik on the production server, because it is a windows server and the piwik version that is available at the webapp installer platform of windows server requires a different php version.
Installing Piwik on another - let's say - analytics server, is not an option for me, because I don't want to create all this https traffic, just because I am not able to set it up on my production server. And I also don't want to purchase another https certificate ;-).
I browsed the Windows Webapp Installer Platform in hope of something that just works out of the box in Windows. Similar questions like this also propose Google Analytics or Piwik. But this cannot be it, can it?
So..
Is there a tool which all you Windows Server people use?
Are there other tools that are used frequently?
Or even: Is it somehow possible to set up Piwik on a Windows Server without using The windows Web App Installer? I posted a related question here that focusses on the installation of piwik.
Logparser is a free tool from Microsoft that lets you throw direct SQL queries to the IIS Logs generated on your Web server. You may use it to query basic stats such as:
[1] From what ip-address range I get the maximum queries? (users' country-profile)
[2] What particular pages (aspx/html) are most frequently visited?
[3] At what time of the day, do I get the maximum requests?
I remember using this tool in one of my earlier projects, but the reason was to track down some performance issues. Also, the tool itself is console based, so you need to be familiar with command-line. However, a GUI front-end could be easily developed in a high-level language such as C#, I think there should be already some, that are free to download
I'm trying to add iCal import support to my existing scheduling application which needs to support Windows XP, Vista, and 7. Writing iCal format is easy, but reading it is another story, mostly trying to convert times to local times with the complex TIMEZONE/TZID/RRULE syntax. Ideally Windows would have a native API for this, but I haven't found one.
I know Outlook 2007+ has an OpenSharedItem function that would work. I don't want to require users to have Outlook installed though, since my application "competes" with Outlook. I thought about writing a web service that would use Outlook on my web server to do this, but I know using Outlook OLE/COM objects from a service has issues, so that probably isn't an option either. I do own about 300 Exchange Server licenses, are there any APIs with Exchange that would maybe work better? I do notice when I email iCal files from GoToMeeting.com they say they were created with "Microsoft CDO for Microsoft Exchange", so I have a feeling they are doing something like this to avoid writing the format themselves.
My application is written in C++ using mostly native Win32 API, but I don't mind creating a .NET DLL for this, or even requiring users to have Internet access so I can post the file to my web server and have it return a converted format my app can use easily. My web server runs on Windows though, so anything Unix-based might be dificult. Other than that, I'm pretty open to options.
Update: I did find CDOEX but as I've never used it before, can anyone tell me where to start and if it can in fact do what I need? I don't really see much about iCal in the docs, and I'd need to install Exchange on my dev PC (not crazy about that) to start playing around with this API.
You can try to use Redemption (I am its author) - it allows to explicitly import iCal files using RDOAppointmentItem.Import(..., olICal).
At our company we offer a CRM platform for leasing companies and it includes task management. Some of our clients would like to sync those tasks with outlook so they do not have to switch between applications.
I do not have lots of experience with outlook, so I don't know about its extensibility features.
What options do we have?
Live syncing possible with some uri? (.ics, .xml?)
Writing some kind of extension?
What do you guys suggest is the most simple solution to this problem. Remember it's just syncing simple tasks, nothing more, nothing less.
Thanks!
I guess this depends on how your CRM system works. At my company we develop a webbased CRM system which means that the client can't really access the database outside of the web application. Our customers also wanted the ability to sync appointments with our activity calendar, so what I did was to write a simple web service from which data could be downloaded to the client. I then created an Outlook add-in using VSTO (Visual Studio Tools for Office) that took this data and created/updated Outlook appointments.
But as I said it all depends on how your system works.
We are developing a web-based point-of-sale application, which, while it mostly runs in a browser, also requires integration with hardware devices such as credit card readers. In order to provide hardware integration, we have implemented several simple ActiveX controls in C++ using ATL.
We are not experienced Windows developers, and are having difficulty understanding the installation process and security model for ActiveX controls. Obviously, this is a prerequisite to our users actually being able to run our application. :)
We are trying to determine what are the finest-grained and most restrictive set of permissions required for a typical unprivileged user (non-admin, non-power user) to install and update a particular ActiveX control (as opposed to any ActiveX control) from a signed .cab file served over HTTP as part of a web application. We need to know this for XP (SP2+) & IE6, as well as for more recent OS/browser combinations. We want this information so we can help our IT staff properly configure the machines on which the software will run.
We have done quite a lot of digging on the internet, and have not been able to find adequate documentation. We have also talked with some folks at Microsoft, who also could not provide us with the information we need.
Using the Sysinternals process monitor and some trial and error, we have been able to determine that the following registry permissions are sufficient to enable an unprivileged user to be prompted to install an ActiveX control on XP SP2 / IE6 (i.e. the user will see a the yellow bar at the top of IE saying "This site wants to install some software"):
HKLM\Software\Microsoft\Tracing (key only, create subkey permission)
HKLM\Software\Microsoft\Code Store Database (key only, create subkey permission)
The process of actually installing the control is much more complicated, and we haven't made much progress in sorting it out, beyond a general awareness that the user will need to write to C:\windows\downloaded program files\ and HKLM\Software\Microsoft\Code Store Database\Distribution Units\{guid}
(We are investigating the capability of Vista and Windows 7 to install ActiveX controls as an unprivileged user, but we need to support XP as well. We are also considering adopting AIR 2 as our platform, which provides native code integration, but that also doesn't address our immediate needs.)
It has been many, many, moons since I've had to be concerned with developing ActiveX controls embedded in a web page for a commercial product.
Kudo's to you and your team for doing
things the right way. I've seen too
many commercial, web based,
applications force enterprises to
lower the security requirements of
Internet Explorer because they
couldn't take the time to properly
package their application.
The basic premise that I remember was that you had to implement at least one specific interface, IObjectSafety, add a couple of specific component category ids during component registration, and sign your .cab with a certificate from a trusted CA such as Verisign.
Check out:
Safe Initialization and Scripting for ActiveX Controls
Packaging ActiveX Controls
Non Admin ActiveX Controls
If that doesn't work, try go get a hold of your local Microsoft Developer Evangelist to help point you in the right direction.
If you have a Microsoft Support Contract, then contact your Technical Account Manager (TAM) or Application Developer Consultant (ADC) for additional help.
Good Luck,
Z