while uploading a cloudfile in rackspace cloud using openstack.net i get net.openstack.Core.Exceptions.Response.BadServiceRequestException - openstack

While uploading a file to rackspace cloud using the CreateObjectFromFile method from my local machine, it goes though fine. but when i do it from a client machine i get net.openstack.Core.Exceptions.Response.BadServiceRequestException.
ContainerID: 1644
srcfileName: \\10.5.48.2\XMLGateway\BOOutBox\PJR340131023160359529217.xml
desfileName: 1644_PJR340131023160359529217.xml
cloudFilesProvider.CreateObjectFromFile(inStrContainerID, inStrSrcFilePath, strDesFileName);
I checked for documentation on this exception and i cannot find anything useful.
EDIT:
here is the error stack
net.openstack.Core.Exceptions.Response.BadServiceRequestException: Invalid request body: unable to parse Auth data. Please review XML or JSON formatting.
at net.openstack.Providers.Rackspace.Validators.HttpResponseCodeValidator.Validate(Response response)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.ExecuteRESTRequest[T](CloudIdentity identity, String urlPath, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Boolean isRetry, Boolean isTokenRequest, String token, Int32 retryCount, Int32 retryDelay, Func`7 callback)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.ExecuteRESTRequest[T](CloudIdentity identity, String urlPath, HttpMethod method, Object body, Dictionary`2 queryStringParameter, Boolean isRetry, Boolean isTokenRequest, String token, Int32 retryCount, Int32 retryDelay)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.<>c__DisplayClassc.<GetUserAccess>b__b()
at net.openstack.Core.Caching.UserAccessCache.<>c__DisplayClassc.<Get>b__4(String k)
at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
at net.openstack.Core.Caching.UserAccessCache.Get(String key, Func`1 refreshCallback, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.GeographicalCloudIdentityProvider.GetUserAccess(CloudIdentity identity, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.CloudIdentityProvider.GetUserAccess(CloudIdentity identity, Boolean forceCacheRefresh)
at net.openstack.Providers.Rackspace.ProviderBase`1.GetServiceEndpoint(CloudIdentity identity, String serviceName, String region)
at net.openstack.Providers.Rackspace.ProviderBase`1.GetPublicServiceEndpoint(CloudIdentity identity, String serviceName, String region)
at net.openstack.Providers.Rackspace.CloudFilesProvider.GetServiceEndpointCloudFiles(CloudIdentity identity, String region, Boolean useInternalUrl)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObject(String container, Stream stream, String objectName, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObjectFromFile(String container, String filePath, String objectName, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at ?.?.?(String ?, String ?, String ?, String ?, String ?, String& ?, Boolean& ?, String& ?)
Edit 2:
Ok after updating the dll to the new versions, this is the stacktrace:
Unable to connect to the remote server
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.203.3.30:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.<>c__DisplayClass6.<Stream>b__5(HttpWebRequest req)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.<>c__DisplayClass9.<ExecuteRequest>b__8()
at JSIStudios.SimpleRESTServices.Client.RequestRetryLogic.Execute(Func`1 callback, IEnumerable`1 non200SuccessCodes, Int32 retryCount, Nullable`1 retryDelay)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.ExecuteRequest(Uri url, HttpMethod method, Func`3 responseBuilderCallback, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Func`2 executeCallback)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.Stream(Uri url, HttpMethod method, Func`3 responseBuilderCallback, Stream content, Int32 bufferSize, Int64 maxReadLength, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Action`1 progressUpdated)
at JSIStudios.SimpleRESTServices.Client.RestServiceBase.Stream(Uri url, HttpMethod method, Stream content, Int32 bufferSize, Int64 maxReadLength, Dictionary`2 headers, Dictionary`2 queryStringParameters, RequestSettings settings, Action`1 progressUpdated)
at net.openstack.Providers.Rackspace.ProviderBase`1.StreamRESTRequest(CloudIdentity identity, Uri absoluteUri, HttpMethod method, Stream stream, Int32 chunkSize, Int64 maxReadLength, Dictionary`2 queryStringParameter, Dictionary`2 headers, Boolean isRetry, RequestSettings requestSettings, Action`1 progressUpdated)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObject(String container, Stream stream, String objectName, String contentType, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at net.openstack.Providers.Rackspace.CloudFilesProvider.CreateObjectFromFile(String container, String filePath, String objectName, String contentType, Int32 chunkSize, Dictionary`2 headers, String region, Action`1 progressUpdated, Boolean useInternalUrl, CloudIdentity identity)
at ?.?.?(String ?, String ?, String ?, String ?, String ?, String& ?, Boolean& ?, String& ?
So does have to do with with firewall settings on the client machine?

A newer release of the SDK is available through NuGet. Two of the many changes included in that release are the following:
Removed GeographicalCloudIdentityProvider (a class only used inside the SDK itself, nevertheless this is the part of your stack trace that indicated you were using an old version of the SDK)
Added the ability for ResponseException (the base class of BadServiceRequestException and several others) to include detailed information about the cause of the problem as part of the exception.
(Applies to openstack.net 1.2.x only): Due to a limitation in the SDK dependencies that we are working to resolve ASAP, you'll need to explicitly install one of the SDK dependencies before installing the SDK. The instructions for this are included in the comment marked UPDATE on the following page: openstacknetsdk/openstack.net#203

Related

dbcontext scaffold IN RIDER Cannot parse collation name from annotation: Npgsql:CollationDefinition:public.ru_RU.UTF-8

During dbcontext scaffold in Rider I have this problem, how can I fix it?
System.ArgumentException: Cannot parse collation name from annotation: Npgsql:CollationDefinition:public.ru_RU.UTF-8
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.Deserialize(IAnnotation annotation)
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.GetData()
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.get_LcCollate()
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.SetData(String lcCollate, String lcCtype, String provider, Nullable`1 deterministic)
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.set_LcCtype(String value)
at Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.PostgresCollation.GetOrAddCollation(IMutableAnnotatable annotatable, String schema, String name, String lcCollate, String lcCtype, String provider, Nullable`1 deterministic)
at Npgsql.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.NpgsqlDatabaseModelFactory.GetCollations(NpgsqlConnection connection, DatabaseModel databaseModel, String internalSchemas, IDiagnosticsLogger`1 logger)
at Npgsql.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.NpgsqlDatabaseModelFactory.Create(DbConnection dbConnection, DatabaseModelFactoryOptions options)
at Npgsql.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.NpgsqlDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options)
at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffolder.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions databaseOptions, ModelReverseEngineerOptions modelOptions, ModelCodeGenerationOp
tions codeOptions)
at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable`1 schemas, IEnumera
ble`1 tables, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnume
rable`1 tableFilters, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluarlize)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Cannot parse collation name from annotation: Npgsql:CollationDefinition:public.ru_RU.UTF-8

ASP.NET Core 2.1 Migration keyword not supported userid

When I try to do a migration, I get this error. I am using SQL Server Express.
System.ArgumentException: Keyword not supported: 'userid'. at
System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary2
parsetable, String connectionString, Boolean buildChain, Dictionary2
synonyms, Boolean firstKey) at
System.Data.Common.DbConnectionOptions..ctor(String connectionString,
Dictionary2 synonyms) at
System.Data.SqlClient.SqlConnectionString..ctor(String
connectionString) at
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String
connectionString, DbConnectionOptions previous) at
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey
key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions&
userConnectionOptions) at
System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey
key) at
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at
Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.CreateDbConnection()
at Microsoft.EntityFrameworkCore.Internal.LazyRef1.get_Value() at
Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection()
at
Microsoft.EntityFrameworkCore.Internal.RelationalLoggerExtensions.MigrateUsingConnection(IDiagnosticsLogger`1
diagnostics, IMigrator migrator, IRelationalConnection connection)
at
Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String
targetMigration) at
Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String
targetMigration, String contextType) at
Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_1.<.ctor>b__0()
at
Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action
action) Keyword not supported: 'userid'.
This is my connection string that is located in my appsettings.json file:
Server=.\\SQLEXPRESS;Database=DBNAMEONE;Trusted_Connection=True;MultipleActiveResultSets=true;UserId=USERNAMEONE;Password=PASSWORDONE
I have tried removing the UserId completely from the string but I still get this error. I am unsure of how to continue as on another application, this connection string works properly.

System.IO.IOException: operation did not complete successfully because the file contains a virus

I am using below code, sometimes I face the exception
System.IO.IOException: operation did not complete successfully because the file contains a virus
string name = Request.Form["__VIEWSTATE_KEY"];
object state = null;
string fileName = string.Format("{0}\\{1}.dat", Environment.GetEnvironmentVariable("TEMP"), name );
StreamReader reader = null;
try
{
reader = new StreamReader(fileName);
state = (new LosFormatter()).Deserialize(reader);
}
catch (FileNotFoundException)
{
state = null;
}
Exception Detail:
System.IO.IOException: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks)
at PageBase.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I don't think Defender is to blame. Unsafe is unsafe. Defender may have been set to guard against the use of this deserializer. Microsoft has labeled LosFormatter as unsafe in 2019, because it allows too much freedom in the type specified,
https://learn.microsoft.com/en-us/visualstudio/code-quality/ca2305?view=vs-2019
Windows Defender Advanced Threat Protection can cause .NET file operations to fail with this exception. This might not be false positive, so first scan your system, but then you can exclude your build directory.
Excluding Build directories can also speed up your build times considerably, but be aware of the risk and make sure you trust the code you're building.

CertificateUnknown error when connecting to Heroku Postgres database

So I am in the middle of migrating from SQL Server to PostgreSQL, and I am building a temporary solution for the migration period to allow my ASP.NET app to connect to my Heroku Postgres database and make use of Entity Framework etc.
So far I have managed to connect to the database from pgAdmin III for windows with no problems, but when connecting from ASP.NET app, I get this error:
CertificateUnknown: Server certificate was not accepted. Chain status: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
. The specified hostname was not present in the certificate.
I am still fairly new to heroku, but it does not make sense why I can connect from pgAdmin with the same settings as my ASP.NET app but it doesn't work in the app itself.
Full stack trace:
[ClientAlertException: CertificateUnknown: Server certificate was not accepted. Chain status: A certificate chain processed, but
terminated in a root certificate which is not trusted by the trust
provider. . The specified hostname was not present in the
certificate.]
TlsClientStream.TlsClientStream.SendAlertFatal(AlertDescription
description, String message) +44
TlsClientStream.TlsClientStream.ParseCertificateMessage(Byte[] buf,
Int32& pos) +1359
TlsClientStream.TlsClientStream.TraverseHandshakeMessages() +415
TlsClientStream.TlsClientStream.GetInitialHandshakeMessages(Boolean
allowApplicationData) +336
TlsClientStream.TlsClientStream.PerformInitialHandshake(String
hostName, X509CertificateCollection clientCertificates,
RemoteCertificateValidationCallback
remoteCertificateValidationCallback, Boolean
checkCertificateRevocation) +198
[IOException: TlsClientStream.ClientAlertException:
CertificateUnknown: Server certificate was not accepted. Chain status:
A certificate chain processed, but terminated in a root certificate
which is not trusted by the trust provider. . The specified hostname
was not present in the certificate. at
TlsClientStream.TlsClientStream.SendAlertFatal(AlertDescription
description, String message) at
TlsClientStream.TlsClientStream.ParseCertificateMessage(Byte[] buf,
Int32& pos) at
TlsClientStream.TlsClientStream.TraverseHandshakeMessages() at
TlsClientStream.TlsClientStream.GetInitialHandshakeMessages(Boolean
allowApplicationData) at
TlsClientStream.TlsClientStream.PerformInitialHandshake(String
hostName, X509CertificateCollection clientCertificates,
RemoteCertificateValidationCallback
remoteCertificateValidationCallback, Boolean
checkCertificateRevocation)]
TlsClientStream.TlsClientStream.PerformInitialHandshake(String
hostName, X509CertificateCollection clientCertificates,
RemoteCertificateValidationCallback
remoteCertificateValidationCallback, Boolean
checkCertificateRevocation) +289
Npgsql.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout) +1372
Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout) +314
Npgsql.NpgsqlConnection.OpenInternal() +461
Npgsql.NpgsqlConnection.Open() +4
Npgsql.NpgsqlServices.UsingPostgresDBConnection(NpgsqlConnection
connection, Action`1 action) +162
Npgsql.NpgsqlServices.GetDbProviderManifestToken(DbConnection
connection) +99
System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection
connection) +87
[ProviderIncompatibleException: The provider did not return a
ProviderManifestToken string.]
System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection
connection) +271
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices
providerServices, DbConnection connection) +27
[ProviderIncompatibleException: An error occurred accessing the
database. This usually means that the connection to the database
failed. Check that the connection string is correct and that the
appropriate DbContext constructor is being used to specify it or find
it in the application's config file. See
http://go.microsoft.com/fwlink/?LinkId=386386 for information on
DbContext and connections. See the inner exception for details of the
failure.]
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices
providerServices, DbConnection connection) +89
System.Data.Entity.Infrastructure.<>c__DisplayClass1.b__0(Tuple3
k) +31
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey
key, Func2 valueFactory) +62
System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection
connection) +251
System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection
connection, DbProviderManifest& providerManifest) +56
System.Data.Entity.DbModelBuilder.Build(DbConnection
providerConnection) +43
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext
internalContext) +62
System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) +123
System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
+627 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type
entityType) +18
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +53
System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext()
+15 System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider()
+38 System.Linq.Queryable.Where(IQueryable1 source, Expression1 predicate) +83
Saleboat.Logic.MeetingLogic.CheckMeetingFilter.OnActionExecuting(ActionExecutingContext
filterContext) in C:\Users\Michael\Documents\Visual Studio
2013\Projects\Saleboat\project-saleboat\Saleboat\Logic\MeetingLogic\CheckMeetingFilter.cs:22
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32
filterIndex) +176
System.Web.Mvc.Async.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32
filterIndex) +644
System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback
asyncCallback, Object asyncState) +58
System.Web.Mvc.Async.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback
callback, Object callbackState) +14
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback
callback, Object state, Int32 timeout) +128
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext
controllerContext, IList1 filters, ActionDescriptor actionDescriptor,
IDictionary2 parameters, AsyncCallback callback, Object state) +197
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback
asyncCallback, Object asyncState) +743
System.Web.Mvc.Async.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback
callback, Object callbackState) +14
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback
callback, Object state, Int32 timeout) +128
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext
controllerContext, String actionName, AsyncCallback callback, Object
state) +343
System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback
asyncCallback, Object asyncState, ExecuteCoreState innerState) +25
System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback
callback, Object callbackState) +30
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback
callback, Object state, Int32 timeout) +128
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback,
Object state) +465
System.Web.Mvc.Controller.<BeginExecute>b__14(AsyncCallback
asyncCallback, Object callbackState, Controller controller) +18
System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback
callback, Object callbackState) +20
System.Web.Mvc.Async.WrappedAsyncResultBase1.Begin(AsyncCallback
callback, Object state, Int32 timeout) +128
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext,
AsyncCallback callback, Object state) +374
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext
requestContext, AsyncCallback callback, Object state) +16
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback
asyncCallback, Object asyncState, ProcessRequestState innerState) +52
System.Web.Mvc.Async.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback
callback, Object callbackState) +30
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback
callback, Object state, Int32 timeout) +128
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase
httpContext, AsyncCallback callback, Object state) +384
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext,
AsyncCallback callback, Object state) +48
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext
context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+103 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
With Npgsql 3.1.5 try to use "Trust Server Certificate=true" in connection string.
Example connection string:
Server=[servername];Port=[port];User Id=[username];Password=[password];Database=[databasename];sslmode=Require;Trust Server Certificate=true

Could not connect to remote server in webservices

Help, I am getting this error when trying to connect to a webservice
System.Net.WebException: Unable to connect to the remote server
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it xx.xxx.XXX.XXX:80 at
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at
System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at
System.Net.HttpWebRequest.GetRequestStream() at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at WebServiceCloudRole.JoomlaService.servicewsdl.saveUserRegistration(String name, String lastname, String contactno, String username, String email, String organizationname, String organizationurl, String address1, String address2, String city, String state, String country, String postalcode, String srole, String sothrole, String startdate, String expirydate, String skucode, String productid, String paymentstatus, String subscriptiontype, String amountpaid, String licenseref, String userregistertype, String token) at WebServiceCloudRole.WebServiceCloud1.CreatePrimaryCaregiverRole(String sFirstName, String sLastName, String sMailTo, String sRole, String sOtherRole, String Credential)

Resources