IM Client Integration with Outlook - outlook

I am trying to understand the procedure of Integration the IM Client with Outlook 2010. The below link is used for this :-
https://msdn.microsoft.com/en-us/library/office/jj900715.aspx
Outlook is able to reach the CreateInstance method of my implementation.
If I have the Lync Client installed than the controls reaches till GetInterfaceMethod, in which I am returning the object of ILyncClient.
There is no progress after this. Following error is showed in the outlook debugs :
MsoIMProviderFactory--HrEnsureDefaultIMAppRegKeys Succeeded opening reg key (HKCU-SOFTWARE\IM Providers)
CMsoIMProviderFactory--HrEnsureDefaultIMAppRegKeys Succeeded querying reg key (HKCU-SOFTWARE\IM Providers-DefaultIMApp-IMapp)
CMsoIMProviderFactory--HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKCU-SOFTWARE\IM Providers\IMapp)
CMsoIMProviderFactory--HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKLM-SOFTWARE\IM Providers\IMapp)
CMsoIMProviderFactory--WhichMessengerInProcessList Using (IMapp) process name for search
CMsoIMProviderFactory--WhichMessengerInProcessList Using (IMapp) process name for search
Guys please give your feedback regarding the same ?????
If I don’t have Lync Client Installed than control never reaches to Authentication Method.
A. Do we need to implement the IMessenger interface also ?
B. If yes then please show some pointers on how to do that ?
Any pointers to resolve this would be helpful.
For building the COM server we are using out of process COM example(CSExeCOMServer). I had tried the same setup with outlook 2013 also. In this too the output remains the same.
Environment :-
Windows 7 Service Pack1 .
Outlook 2010 & 2013.

You would always need Lync installed in you machine since the interfaces which you used in your code are defined by Lync. If you want to remove this dependency then you will have to register your typelibrary (.tlb) in the system. To generate .tlb you need an .idl file which you can explore on net how to get.
If you want to be an IM Provider then you need not implement this IMessenger interface. But if you want to work in Legacy provider way you will have to implement this interfaces(this i had not tried).
And to resolve your issue I would need the code snippet as how you are defining the LyncClient class. Once you share that then I would try to help you.
I was able to make this work in both outlook 2010 & 2013 but then I used C# way of implementing the COM Server.

Related

Windows Process Activation Service (WAS) will not start

IIS 10 will not restart on my PC. When I navigate to localhost, I get a 'localhost refused to connect' message. After looking through the event viewer, it turns out that the issue is that the Windows Process Activation Service (WAS) will not start.
The error message given is:
'The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting corrently. The data field contains the error number.'
When I try to start the service manually from the services app, I get the following:
Has anyone experienced this issue before? Any help would be greatly appreciated, I've been trawling the internet for several days trying to find a solution to no avail.
We've run into this issue several times after recent Windows Updates. In all cases, the following worked (got from a Microsoft support rep):
Run the following from an admin Powershell prompt:
reg delete HKLM\SYSTEM\CurrentControlSet\Services\WAS\Parameters /v GenerateKeys /f
net start w3svc
The keys will be regenerated, then the IIS AppPools can be started
According to your error message, WAS can not access the machine key when start up. Usually, machine keys are used to encrypt sensitive information in config file, WAS will not be able to start if there is no machine key to use.
The easiest and most common method is to try to uninstall and reinstall WAS.
If it still can not start, try to delete the registry entry NanoSet with cmd.
If the above two methods are useless, you can refer to this to delete machine keys, let WAS create new one while starting.
If somebody is still fighting with this issue, please check Event Viewer under System filter and check for any logs related to WAS. In my case I found the following entry:
The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting currently. The data field contains the error number.
So I just started again CNG Key Isolation service and everything is working now.

Internal Server Error- http://localhost:1080/webTours/home.html

Application: http://localhost:1080/webTours/home.html [I intend to use it for Jmeter testing]
Below error is displayed when I am trying to click on "sign up now" link. Kindly help to fix it. Pls note, I have strawberry-perl-5.30.0.1-64bit.msi also installed and path is set to the environment.
Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator, admin#localhost and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error
log.
Thanks.
Probably, you need to do the correlation for the dynamic parameters like sessionID etc.
Record two scripts using tools like fiddler or LR or any other sniffing tool and compare two scripts to find out dynamic variables required. Then correlate them. For correlation, identify the first occurrence of the variable in the response then extract them using post processor and pass them further below/to all the request that requires it.
Hope this helps.
It appears that your Web Tours Sample Application installation is broken, looking into MICRO FOCUS SUPPORTED stanza in the application details you should contact Micro Focus Support or ask the question in Micro Focus Community Forums.
In the meantime you can use http://blazedemo.com/ page and Getting Started with JMeter - A Basic Tutorial as the alternative test application for your JMeter training
If you are not getting internal server error while sign up (or) accessing administration link then follow the below,
a. close the server from the cmd
b. In the Web Tours 1.0 parent folder, find the file .msi file: strawberry-perl-5.10.1.0
c. Double click on strawberry-perl-5.10.1.0 msi file to install
d. Once it is installed, Now re-start the server (Double click on StartServer.bat file) under WebTours sub-folder
e. Now, Go to link http://localhost:1080/webtours/home.html
f. Click on Sign up (or) administration link
g. Hope you are able to access the Web Tours app in local server now. Thanks! :-)

How to get EVERY user token on a PC for SHGetKnownFolderPath?

I'm working on a System Service project with SYSTEM privilege (cleaning utility)... It does not interactive with any user interface.
My goal is to check files in "Desktop" and "AppData" folders for any user that exists on the PC.
I'm using NetUserEnum() to get the user list on the PC. Then I want to get the path of each user's Desktop and AppData with SHGetKnownFolderPath(), but I can't find a way to get each user's access token for SHGetKnownFolderPath(). Without a token defined in SHGetKnownFolderPath(), it returns the path for SYSTEM and not specific users.
Q1. How can I get the token of each user for SHGetKnownFolderPath()?
Q2. If no answer for Q1, is there any documented way to get the desktop & appdata path of each user in the PC?
I understand this can be achieved with dirty way ---> Registry key with some string replacement. However, the Registry key method is undocumented, which may easily break in future updates to Windows.
Edit Update:
#RaymondChen Thanks for pointing out that some user profiles may not exist. Also,
About Q1 : #Remy Lebeau provides a solution with LogonUser/Ex(),login to each user with their credentials,might be the only answer that fits the need of Q1.
About Q2 : There might have no documented way to achieve this. The only method might have to stick with Windows Registry (Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders) , as #Remy Lebeau and #Olaf Hess said. I tried to dig more information on Microsoft Community Forum and I got Microsoft would never allow access other users' profile with their native API for security reason. They do not provide APIs that can possibly violate the security rules. Each user profile can only access by its credentials.
btw, I totally understand that "Cleaning utility" aka "Windows-breaking tool", especially when the tool is not being well codded(ex. compatibility problem). For the sake of avoiding to make it become a totally Windows-Destroyer, I tried to use more documented API as possible.
For Windows Vista with SP1 / Server 2008 and better you can query the existing user profiles using the WMI class Win32_UserProfile. This allows you to retrieve the profile path and check whether it is a local or roaming profile and to get status information. The rest (retrieving the paths to APPDATA, DESKTOP, etc.) is likely going to involve reading values straight from the registry (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders).

WatiN on AppHarbor: COMException, "Server execution failed"

I'm using WatiN in a console application. I set platform to x86, and I added [STAThread] to my Main. I confirmed that the application is actually running in 32-bit mode (which WatiN requires).
WatiN works fine when testing locally, but crashes when running on AppHarbor:
[COMException: Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the
following error: 80080005 Server execution failed (Exception from
HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).]
0007FFB8B2184B3 WatiN_Core!WatiN.Core.IE.CreateNewIEAndGoToUri(System.Uri,
WatiN.Core.Interfaces.IDialogHandler, Boolean)+0x103
How can I get WatiN working on AppHarbor?
To be able to run WatIn it need to have access (as an administrator) to some resources. When you run a COM object it needs to be able to query the registry to find out if Internet Explorer is a COM object in that system and if it is launch it. I don't have first hand experience with AppHarbor but I'm pretty sure they won't allow you to be able to query what COM servers their machines have so they won't provide you with that access.
To be 100% sure about this you should ask them if you can have access to query COM objects on their machines.
When you run it on your local machine that works because either you are logged in as an admin or you are launching the process as an admin.
Hope this helps.

Could not obtain information about Windows NT group / user, error code 0x3a

I am trying to deploy a SQLCLR library to SQL Server 2008 R2. In visual studio I have set up the data connection and it works correctly (I can run queries), but when I try to deploy I get the message "Error: Could not obtain information about Windows NT group / user , error code 0x3a."
This is strange because I have set up the data connection to use SQL server authentication on a different user name.
I receive the same error when I run CREATE ASSEMBLY while logged in to the SQL management studio with the different user name.
To add to the mystery, when I deploy using permission set SAFE everything is fine. However my assembly requires EXTERNAL ACCESS.
What could be the problem with deploying my assembly?
This issue wasted so much time I feel compelled to share the solution so that nobody else falls into the same trap.
Issue was resolved by setting the SQL Server Active Directory Helper service to run on Manual, then rebooting the server.
This issue arose in a different environment for me:
Windows 10 box;
The user Windows complained about was an AZUREAD user;
On my Win10 box there was no SQL Server Active Directory
Helper service, so I couldn't try the original solution posted by
ose.
I was able to work round the issue by removing the AZUREAD user as a SQL Server user while I added the assembly.
In my case that user was not essential to have as a SQL Server user, but I dare say it would be possible to re-add the user back later should this be required.

Resources