I have a problem when try to connect to MS CRM v9
I used this code to connect:
Uri organizationUri = new Uri(OrgUrl);
AuthenticationCredentials authCredentials = new AuthenticationCredentials();
authCredentials.ClientCredentials.UserName.UserName = UserName;
authCredentials.ClientCredentials.UserName.Password = Password;
OrganizationServiceProxy organizationProxy = new OrganizationServiceProxy(organizationUri, null, authCredentials.ClientCredentials, null);
organizationProxy.EnableProxyTypes();`
var _service = organizationProxy;
This is the Exception message
HResult=-2146233079 Message=Metadata contains a reference that
cannot be resolved:
'https://myOrg.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9'.
InnerException:
HResult=-2146233079
Message=The underlying connection was closed: An unexpected error occurred on a send.
InnerException:
HResult=-2146232800
Message=Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
InnerException:
ErrorCode=10054
HResult=-2147467259
Message=An existing connection was forcibly closed by the remote host
Did anyone face this problem before. PS: this code is running before in the same project
It looks like you need to update your SDK references to the new 9.0 SDK references. There isn't a single download any more for the SDK, instead you have to use NuGet (https://blogs.msdn.microsoft.com/crm/2017/11/01/whats-new-for-customer-engagement-developer-documentation-in-version-9-0/)
No more monolithic SDK download
Probably the greatest single change is that we are no longer providing a single download package for all the documentation, tools and sample code. Going forward, instead of shipping a single package with everything in it, we will offer an a-la-carte approach so that you can download the individual things as you need them.
Get the assemblies and tools you need. SDK assemblies and tools will be distributed only via NuGet. We will provide a script that will allow you to download the assemblies and tools from NuGet. See Where to find the NuGet SDK packages and Download tools from NuGet.
Self-serve offline content generation. The new learn.microsoft.com site will allow you to download a PDF for any of our content areas so that you can read and search the documentation while offline.
Sample code availability. All our sample code will be available on msdn.microsoft.com or on GitHub. The code.msdn.microsoft.com site is designed for sample code and provides a good experience as well as providing us better metrics on usage.
Download only the pieces you need. Various assets we have included in the download package will be available as individual downloads. This way, if one of the assets needs to be updated we can just update it without releasing the entire SDK package.
https://www.nuget.org/profiles/crmsdk has a list of all the SDK DLLs you might need. Specifically https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/ includes the Connector which is what I think you actually need.
You can add it to your project using the following command in your NuGet console
Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly -Version 9.0.0.7
If you don't need a specific version you can just use
Install-Package Microsoft.CrmSdk.XrmTooling.CoreAssembly
I generally use CrmServiceClient in the Xrm.Tooling.Connector namespace, with a connection string.
var svc = new CrmServiceClient(connectionString);
Please note that CrmServiceClient has a boolean property called IsReady, which is a good way to check if it's in a proper state.
Here are example connection strings for the various environment types. These are hardcoded examples, but you can also add them to the App.Config as shown in my answer here.
CRM 2016 and Dynamics 365 online:
var connectionString = "Url=https://dev26.crm.dynamics.com; Username=user#dev26.onmicrosoft.com; Password=Pass; AuthType=Office365";
On-premise with integrated security:
var connectionString="Url=http://myserver/AdventureWorksCycle;";
On-premise with credentials:
var connectionString="Url=http://myserver/AdventureWorksCycle; Domain=mydomain; Username=administrator; Password=password; AuthType=AD;";
On-premise IFD before CRM 2016:
var connectionString="Url=https://contoso.litware.com; Username=someone#litware.com; Password=password; AuthType=IFD;";
On-premise IFD for CRM 2016 and later (v8.0+)
var connectionString="ServiceUri=https://contoso.litware.com/contoso; Domain=contoso; Username=contoso\administrator; Password=password; AuthType=IFD; LoginPrompt=Never;";`
Related
I'm trying to log in using AWS Cognito by running the app after building it in Unity.
I couldn't log in properly, and when I tried debugging, I found the phrase "The type initializer for Amazon.AWSConfigs' thread an exception."
This error occurs when executing the following code:
Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient provider =
new Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient(new Amazon.Runtime.AnonymousAWSCredentials(), regionTable[REGION]);
The app itself is built normally, but there seems to be a problem with logging in using AWS.
(I found this error in the PC and oculus environment.)
Some of the answers told me to modify the Config file. But I couldn't find the Config file. The location of this file was also unknown.
I found this answer "https://github.com/aws/aws-sdk-net/issues/310" but I couldn't apply this for me.
I found this Document "https://docs.unity3d.com/kr/2021.1/Manual/upm-config.html#upmconfig" but the Config file didn't exist in this path. My environment is Mac.
additionally,
I use AWS SDK called aws-sdk-net45-3.7.193.0.
UnityInitializer.AttachToGameObject(this.gameObject);
Amazon.AWSConfigs.HttpClient = Amazon.AWSConfigs.HttpClientOption.UnityWebRequest;
In this code, my Project Cannot understand UnityInitializer, HttpClient, and HttpClientOption.
What else changes are needed in order to mitigate the above issue.
I solved this problem.
The problem was that I was using IL2CPP as Script backend.
Simply using Script backend as Mono is one way. But my project had to use IL2CPP.
In order to use IL2CPP and use the Unity project using AWS Cognito, it is recommended that you:
Use .NetStandard2.0.
Use AWS SDK that is compatible with .NetStandard 2.0.
I used Unity 2020.3.19f version to use .NetStandard 2.0.
If you are using a URP project and there is an error in URP due to downgrade of Unity version, it is recommended that you act as follows.
Enter the Package folder for that project
Open Manifest.json and Package-lock.json files
Change the Render Pipeline version to 10.8.1 (for 2020.3.19f1 version. I didn't experiment with other versions.)
Reference found to resolve this issue.
https://forum.unity.com/threads/issue-with-system-configuration-configurationmanager-get_appsettings-on-ios.1026877/#post-6656764
https://docs.aws.amazon.com/ko_kr/mobile/sdkforunity/developerguide/aws-unity-sdk.pdf
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal#10.8/manual/index.html
I am trying to edit a SSIS package from code using ManagedDTS dlls (and others) and I need to access one of the connections defined in the package in order to re-map the columns in one of the source components. The problem is that this connection is created with a custom connection manager and it is therefore not recognized, when the package is loaded.
The code should be something like this:
Application app = new Application();
Package package = app.LoadPackage("packagepath", null);
var customConnection = package.Connections["customConnectionManager"];
Where the customConnection is the connection that I am looking for.
I am able to create a new package with this type of connection but as soon the package is saved and reloaded, I don't have access to it.
The custom connection manager is in GAC and can be normally used in VS SSDT. When I make a new package in add the connection "customConnectionManager" is works as intended.
Is there a way to access connections in the SSIS packages that are made with custom connection managers?
Thanks in advance!
I have a server that utilizes AWS SES to send notification emails, but I keep recieving the following message:
An unhandled exception of type 'Amazon.Runtime.AmazonServiceException'
occurred in AWSSDK.dll
Additional information: Unable to find credentials
I have a credentials file fully accessible by the server's user and I use the following to tell the AWS SDK where the file is located and the profile name:
AWSConfigs.AWSProfileName = "example-user";
AWSConfigs.AWSProfilesLocation = Environment.CurrentDirectory + "/example-dir/credentials";
..however crashes at the following line with the error message:
AmazonSimpleEmailServiceClient client = new AmazonSimpleEmailServiceClient(REGION);
I checked out this answer on Amazon.Runtime.AmazonServiceException: Unable to find credentials which suggests that profiles should be in the application's configuration file, like so:
<appSettings>
<add key="AWSProfilesLocation" value="C:\awsfile\credentials" />
<add key="AWSRegion" value="us-east-1" />
</appSettings>
...this results in the exact same error.
What am I doing wrong? The AWSConfigs.* code has been working for around six months now without issue, this started happening when my project took a hiatus and I restored it from its Git repository. I cannot remember which version of Visual Studio I used before but I'm currently using 2015 (update 3).
I did however get this to work by adding the credentials as system environment variables, but this isn't a permanent solution for security reasons.
If I download earlier commits, build them and run them, I get the exact same error. I'm thinking this is either something to do with the version of Visual Studio I'm using, but can't think of any reasons why this could be.
The AWS SDK and .NET versions have always been the same so it shouldn't be incompatibility (2.3.55.2 for the AWS SDK and .NET 4.6.1).
If you are running applications on an Amazon EC2 instance and those applications require AWS credentials, the best-practice advice is:
Never put credentials in your code
Assign an IAM Role to the instance and the SDK will automatically use those credentials
Even when you're running an application on a non-EC2 instance, avoid putting credentials in code. Instead, put them in environment variables or configuration files.
See: Configuring AWS Credentials for .Net applications
I have an issue with my code that connect to TFS/VSTS and writes work items from it.
public FormSearchWorkItems(WorkItemStore workItemStore, string projectName)
{
InitializeComponent();
WorkingItem = new WorkingItem();
pickWorkItemsControl = new PickWorkItemsControl(workItemStore, false);
}
It worked well with TFS using old version of Microsoft.TeamFoundation.Client (12.0.0.0), but after an update to the newest Microsoft.TeamFoundation.Client (15.0.0.0), there is an expection for PickWorkItemsControl throwed:
An unhandled exception of type 'System.MissingMethodException' occurred in Microsoft.TeamFoundation.WorkItemTracking.Controls.dll
Additional information: Method not found: Void Microsoft.TeamFoundation.Client.ComboTree.SetSelectedText(System.String).
So the problem is that there is missing SetSelectedText(System.string) method in the newest version of Microsoft.TeamFoundation.Client.dll
Does anyone know the workaround of this problem please?
The method Microsoft.TeamFoundation.Client.ComboTree.SetSelectedText is not exist in the 15.0.0 version.
You can install latest version of Microsoft.TeamFoundationServer.ExtendedClient package, and then build again. This package contains all the reference you used. And you can develop the similar method by yourself.
Integrate with Microsoft Team Foundation Server and Visual Studio Team
Services from desktop-based Windows applications. Work with and manage
version control, work items, and build, and other resources from your
client application.
I am using VS2010 Express and trying to create a new connection with the help of server explorer. i selected the server name and windows authentication.
After it i mentioned the name of database to be connected with and tested connection successfully but as i click on ok it shows me error
"Unable to find requested .Net framework data provider.It may not be installed"
i have all the required dll's in my reference of project such as system.data,system.data.entity but still it is giving error somebody please help me.
It's probably your config file...Check your config files for self terminating nodes.