We running 2 web .net project on same Pc and connecting to same Mongod server .
first and second project connect to same database.
First project with authorization connection string working fine without connection issue
but Second project with same authorization string giving Auth mechanism not specified error
if I specified any auth mechanism then it giving
Unsupported MongoAuthenticationMechanism SCRAM-SHA-1 error
This is happen only for second project , not issue with first project
I am sure that
both mongod server and shell version match
same connection string for both
but why it giving issue for second project only. what would be possible project level issue? any idea.
Please help for this
Resolved this issue, MongoDb DLL issue which is different for both projected. Used one which is working for both.
Related
So I am getting the rather common HTTP Error 502.5 - Process Failure now that I've hosted my project on a server VM running Windows Server 2016. While troubleshooting, I've attempted most of the solutions proposed for the same error:
ASP.NET Core 1.0 on IIS error 502.5.
Nothing else helped, so I'm looking at the answer that received the most upvotes. This mentions running the following command to receive a more meaningful message describing the error:
C:\fullpath\dotnet C:\fullpath\PROJECT.dll
I am honestly not sure how to execute that. What I did was navigate to the published project's containing folder on the server through the cmd, and issue the command like so:
dotnet .\My_Project Integration.dll
But the console prints this in response:
No executable found matching command "dotnet-.\My_Project"
Notice how the DLL is titled 'My_Project Integration.dll, however the word 'Integration' is absent from the console response. I do not know whether the underscore is to blame here, but any help is appreciated getting the command to run.
And of course, if you know of a solution to the actual 502.5, that is welcome as well.
You've likely got this issue: https://github.com/aspnet/Home/issues/1931. The ASP.NET Core IIS Module reads the Web.config to determine what to execute to run the app.
You said running dotnet ".\My_Project Integration.dll" worked successfully and enabling stdout showed the same issue of the path being truncated after the space.
Two options:
Remove the space from your project (this would be the easiest option)
Update your Web.config
If you do #2, your Web.config needs to have something like this for the arguments attribute:
arguments='".\My_Project Integration.dll"'
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'm getting the following error over and over, despite all attempts to resolve the issue.
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid
The main issue seems to connect to the EF over several projects in 1 solution.
Here's what I've already tried:
copied the connection string to the executing project in de web.config file
added references to the mysql providers
changed connection string names to the container name
Still get stuck at the construction of my ObjectContext where I get the error above.
public EcomContainer() :
base(#"name=ConString", "EcomContainer")
{
Configure();
}
I'm using the Devart mysql dotnet connector, EF6
My testunit is a regular C# console app which works fine with EF
but a new project with a web app such as a wep api or mvc application not.
If anyone would have some experience with this, I welcome any tips.
Thanks
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type
'System.Web.UI.WebControls.TextBoxMode' from its string representation
'DateTimeLocal' for the 'TextMode' property.
Source Error:
I set my Textbox TextMode=DateTimeLocal and ran my project and it runs well. When I tried to deploy my application to IIS and visit the webpage i would get the error above. IIS has .Net 4.0.30319. Is there a reason why i get it on localhost (on my computer) and not the server (iss)? how do i fix this?
There are only three members in the TextBoxMode Enumeration for ASP.NET 4.0:
SingleLine: Represents single-line entry mode.
MultiLine: Represents multiline entry mode.
Password: Represents password entry mode.
There are a considerable amount more, including DateTimeLocal in TextBoxMode Enumeration for ASP.NET 4.5.
Your localhost is running ASP.NET 4.5, and apparently your server is not... ensure you have ASP.NET 4.5 installed on your server.
UPDATE: for people who can't upgrade to ASP.NET 4.5, you can likely just set the type="datetime-local" for the TextBox as an alternative.
Install asp.net 4.5 on server and works!
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.