EWS 2016 requested version is Not Supported on Calnedard.bind using 2013_sp1 as Exchange version - vsto

I i was asked too make a Outlook addin with uses the exchange server 2016 to syncronise entry from the database with the entrys from the Appointments in the Outlook Calendar.
Problem now is that had to use the Exhangeversion of 2013_sp1 as ExchangeVersion with as far as i read is should be ok.
But by my colleage the outlook plugin means that "Exchange Server doesn't support the requested version” on the try to start the addin. it comes up by the method CalendarFolder.Bind(m_service, folderId, new PropertySet());
as fas as could read von the stacktrace.
I do not know if it i just a type of authenfication problem or the problem by the versions or how i call them
here my code `
m_service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
m_service.UseDefaultCredentials = true;
// NetworkCredentials
m_service.Url = new Uri(EWSServerUrl);
FolderId folderId = new FolderId(WellKnownFolderName.Calendar);
CalendarFolder calendarESW = CalendarFolder.Bind(m_service, folderId, new PropertySet());`
i would be grateful for a bit of help ;)

The error means that the server that is responding to the request doesn't support the Requested Server version (Auto-discover can be used to check the supported EwsSupportedSchemas https://msdn.microsoft.com/en-us/library/office/jj900154(v=exchg.150).aspx ). Mostly likely this is because the server that is responding is running a lower version of Exchange or CU version than what your requesting. You can easily check this by looking at the ServerVersion that is return in the response you getting eg check https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservicebase.serverinfo(v=exchg.80).aspx or enable tracing and check the trace https://msdn.microsoft.com/en-us/library/office/dd633676(v=exchg.80).aspx

Related

Determine Documentum host name when using Documentum.Interop.DFC C# assembly

I'm working on some rather old C# code that uses Documentum DFC (Documentum.Interop.DFC.dll 6.5.0.18). The Documentum server settings are stored within the dfc.properties file stored on my local machine, for example:
dfc.docbroker.host[0]=xyzserver.xyzdomain.net
dfc.docbroker.port[0]=5432
I would like to be able to determine, and write to a log file, the Documentum "docbroker" host and port number whenever the Documentum COM objects are instantiated. Here's what I have so far:
DfClientX xClient = new DfClientXClass(); // <=== This xClient should have the host in there somewhere... right?
IDfLoginInfo login = xClient.getLoginInfo();
login.setUser( localUserName );
login.setPassword( localUserPassword );
xClient is an interface of type DfClientX, it is instantiated as a COM object.
Looping through all of the properties of the object suggested by this post looks promising.
I've searched on the Documentum boards with no luck so far. I realize this question will be difficult to answer without having access to the Documentum software, but it seems like it should be a rather simple task... perhaps someone with more general COM knowledge can help out?
Thanks in advance!
So after checking out the object in the Visual Studio watch window (not within the "tooltip" watch), I was able to use Intellisense to examine the properties available to the COM object and its properties. Here is how I am now able to determine the host name:
DfClientX xClient = new DfClientXClass();
IDfClient client = xClient.getLocalClient();
const string HOST_ATTRIBUTE = "dfc.docbroker.host";
var hostSetting = xClient.getLocalClient().getClientConfig().getString( HOST_ATTRIBUTE );
Logging.WriteLog( TraceEventType.Verbose, "*** {0} = {1}", HOST_ATTRIBUTE, hostSetting.ToString() );
Maybe this will help somebody else in the future.

Application name is not set. Call Builder#setApplicationName. error

Application: Connecting to BigQuery using BigQuery APIs for Java
Environment: Eclipse, Windows 7
My application was running fine until last night. I've made no changes (except for restarting my computer) and my code is suddenly giving me this error:
Application name is not set. Call Builder#setApplicationName.
Thankfully I had a tar'd version of my workspace from last night. I ran a folder compare and found the local_db.bin file was different. I deleted the existing local_db.bin file and tried to run the program again. And it worked fine!
Any idea why this might have happened?
Hopefully this will help anyone else who stumbles upon this issue.
Try this to set your application name
Drive service = new Drive.Builder(httpTransport, jsonFactory, null)
.setHttpRequestInitializer(credential)
.setApplicationName("Your app name")
.build();
If you are working with only Firebase Dynamic Links without Android or iOS app
Try this.
builder.setApplicationName(firebaseUtil.getApplicationName());
FirebaseUtil is custom class add keys and application name to this class
FirebaseDynamicLinks.Builder builder = new FirebaseDynamicLinks.Builder(
GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), null);
// initialize with api key
FirebaseDynamicLinksRequestInitializer firebaseDynamicLinksRequestInitializer = new FirebaseDynamicLinksRequestInitializer(
firebaseUtil.getFirebaseApiKey());
builder.setFirebaseDynamicLinksRequestInitializer(firebaseDynamicLinksRequestInitializer);
builder.setApplicationName(firebaseUtil.getApplicationName());
// build dynamic links
FirebaseDynamicLinks firebasedynamiclinks = builder.build();
// create Firebase Dynamic Links request
CreateShortDynamicLinkRequest createShortLinkRequest = new CreateShortDynamicLinkRequest();
createShortLinkRequest.setLongDynamicLink(firebaseUtil.getFirebaseUrlPrefix() + "?link=" + urlToShorten);
Suffix suffix = new Suffix();
suffix.setOption(firebaseUtil.getShortSuffixOption());
createShortLinkRequest.setSuffix(suffix);
// request short url
FirebaseDynamicLinks.ShortLinks.Create request = firebasedynamiclinks.shortLinks()
.create(createShortLinkRequest);
CreateShortDynamicLinkResponse createShortDynamicLinkResponse = request.execute();

Is it necessary that Data Source of connection string must match the system name

This is my first post to this precious website. I am a new learner of vb.net. I am working on a simple purchase project, where i got some errors. But the first thing is which baffled me is:
This is my connection string at module level, on the developed machine.
Public strCn As String = "Data Source = (local); Initial Catalog = PSys; Integrated Security = false; User ID = sa; Password = 123;"
Is it mandatory that Data Source must be the original name of the System Name. I mean If i use (local) or using ( . ), so will it work or not? Because when i copy my project to any other system for further development so every time i need to change the Data source, otherwise i get the error that: "Network-related or instance-specific error occurred......."
Kindly guide me that what i need to do.
When you are developing an application which uses a database server such as MsSQL it is not wise to install the server along with your application in every pc which is installed to. For example what are you going to do if a customer has a local network with 10 computers? Are you going to install SQL server in all 10 of them? And if so what if they need to share data?
So your best approach (based on common practice by other applications) will be to allow the user to install the SQL server where he wants and let him configure your application and point it to the server's location. If you follow that path then the configuration of your application can be in the setup application or in the application itself.
Now about the development phase, I had a similar situation in which I needed to develop the same application in two different computers. What I did was to install the SQL server in both of them with a named instance "sqlexpress" then in the application I used the
Data.SqlClient.SqlConnectionStringBuilder
class to build the connection string. I did something like this:
Public Function getDevConnectionString() As String
Dim csb As New Data.SqlClient.SqlConnectionStringBuilder(My.Settings.dbConnectionString) '<-My original cs in app settings
csb.DataSource = My.Computer.Name & "\sqlexpress"
Return csb.ConnectionString
End Function
Whenever I need a connection string I simply call getDevConnectionString() which returns the connection string based on the computer name plus the sql server instance name. For example:
Dim cs As String
#If DEBUG Then
cs = getDevConnectionString()
#Else
cs = getReleaseConnectionString()
#End If
where getReleaseConnectionString() is the function that returns your connection string configured by the customer.
Hope this point you the right direction...

WebSharingAppDemo-CEProviderEndToEnd Queries peerProvider for NeedsScope before any files are batched to the server. This seems out of order?

I'm building an application based on the WebSharingAppDemo-CEProviderEndToEnd. When I deploy the server portion on a server, the code gives the error "The path is not valid. Check the directory for the database." during the call to NeedsScope() in the CeWebSyncService.cs file.
Obviously the server can't access the client's sdf but what is supposed to happen to make this work? The app uses batching to send the data and the batches have to be marshalled across to the temp directory but this problem is occurring before any files have been batched over. There is nothing for the server to look at to determine whether the peerProivider needs scope. What am I missing?
public bool NeedsScope()
{
Log("NeedsSchema: {0}", this.peerProvider.Connection.ConnectionString);
SqlCeSyncScopeProvisioning prov = new SqlCeSyncScopeProvisioning();
return !prov.ScopeExists(this.peerProvider.ScopeName, (SqlCeConnection)this.peerProvider.Connection);
}
I noticed that the sample was making use of a proxy to speak w/ the CE file but a provider (not a proxy) to speak w/ the sql server.
I switched it so there is a proxy to reach the SQL server and a provider to access the CE file.
That seems to work for me.
stats = synchronizationHelper.SynchronizeProviders(srcProvider, destinationProxy);
vs.
SyncOperationStatistics stats = syncHelper.SynchronizeProviders(srcProxy, destinationProvider);

"The directory name is invalid" error on Process.Start?

I am writing a launcher program, and when I go to start the process I get the "The directory name is invalid" error. Here is the code that is launching the process:
Const DEBUG_ROOT = _
"Z:\Kiosk_JC\KioskSignIn.root\KioskSignIn\KioskSignIn\KioskSignIn\bin\Debug"
Dim oKiosk As New System.Diagnostics.Process
oKiosk.StartInfo.UserName = oEnc.Decrypt(Username)
oKiosk.StartInfo.Password = oEnc.DecryptSecure(Password)
oKiosk.StartInfo.Domain = oEnc.Decrypt(Domain)
''// The AddBS function appends a '\' to the passed string if it is not present
oKiosk.StartInfo.WorkingDirectory = AddBS(DEBUG_ROOT)
oKiosk.StartInfo.FileName = "KioskSignIn.exe"
oKiosk.StartInfo.UseShellExecute = False
Dim proc As Process = Nothing
proc = System.Diagnostics.Process.Start(oKiosk.StartInfo)
I saw on another question here that I needed to set the WorkingDirectory (before I started searching I was getting the error). Even though I have this property set, I am still getting the error. Any thoughts?
More info
I should also note that my Z:\ is a on my network. I have a function that resolves a path to UNC. When I ran this function on DEBUG_ROOT, I get the same error.
I tried moving the application to c:\kiosk. Same result. I am logged in as the user I am impersonating, so I have access to all shares and files.
Here is the link, for some reason the URL formating wants to consume all the text after the link is designated:
Referred Post
Mapped drives are per-user. You are likely starting the process with a different user.
Sounds like the process can't see the Z: drive or doesn't have security access. What user context does the app run under? Perhaps the Z: drive is not available in that context.
I got the same error as you do. most likely the user you use to run the process does not have access to specified resource (exe file)
try to move your exe to some other location and/or give your user access rights to the file.