I am trying to use .NET 3.5 app on Visual Studio 2008, running Mono 2.10.2 and Apache (with mod-mono) to perform a PayPal payment. I am using the PayPal sandbox, and the solution works perfectly when I debug or run locally. When running on the server with Mono, it times out after the following lines:
PayPalAPIAASoapBinding ws = PayPalUtils.BuildPayPalWebservice();
SetExpressCheckoutResponseType resp = ws.SetExpressCheckout(req);
with the following error:
System.Net.WebException: The request timed out at System.Net.HttpWebRequest.GetRequestStream () [0x0005f] in /usr/src/redhat/BUILD/mono-2.10.2/mcs/class/System/System.Net/HttpWebRequest.cs:752 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String method_name, System.Object[] parameters) [0x00069] in /usr/src/redhat/BUILD/mono-2.10.2/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapHttpClientProtocol.cs:367
I have run the ssl import for https://www.sandbox.paypal.com, and I have run mozroots import to bring in all ssl certs from Mozilla.
Any ideas or suggestions would be welcome!
Related
I'm Currently working in Automation test scripts in visual studio for IE browser version 11 using c#.
My test cases not able to run continuously one after the other.It working fine for only one test case, when it trying to attempt 2nd test cases encountering error
Specification:
IE browser ver 11
Selenium.WebDriver.IEDriver
C# (visual studio)
Error:
A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:57525/session//url. The status of the exception was UnknownError, and the message was: No connection could be made because the target machine actively refused it No connection could be made because the target machine actively refused it'
var ieoptions = new InternetExplorerOptions();
ieoptions.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
ieoptions.EnsureCleanSession = true;
builder.RegisterType<InternetExplorerDriver>()
.WithParameter(new TypedParameter(typeof(string), "."))
.WithParameter(new TypedParameter(typeof(InternetExplorerOptions), ieoptions))
.AsImplementedInterfaces()
.InstancePerLifetimeScope();
Note: The same code and approach working for other drivers like Chrome, Chromium and Firefox
Relatively new to the windows ecosystem. After following the windows documentation on setting up a background application on iot and google's quickstart for C#, I am receiving this error that I cannot seem to solve:
System.IO.IOException: 'Error loading native library "C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\BackgroundAppFirestoreOne-uwpVS.Debug_ARM.usernoname\grpc_csharp_ext.x86.dll". '
Stack Trace:
System.IO.IOException
HResult=0x80131620
Message=Error loading native library "C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\BackgroundAppFirestoreOne-uwpVS.Debug_ARM.usernoname\grpc_csharp_ext.x86.dll".
Source=Grpc.Core
StackTrace:
at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives)
at Grpc.Core.Internal.NativeExtension.LoadUnmanagedLibrary()
at Grpc.Core.Internal.NativeExtension.LoadNativeMethods()
at Grpc.Core.Internal.NativeExtension..ctor()
at Grpc.Core.Internal.NativeExtension.Get()
at Grpc.Core.GrpcEnvironment.GrpcNativeInit()
at Grpc.Core.GrpcEnvironment..ctor()
at Grpc.Core.GrpcEnvironment.AddRef()
at Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable`1 options)
at Grpc.Core.Channel..ctor(String host, Int32 port, ChannelCredentials credentials, IEnumerable`1 options)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint, IEnumerable`1 channelOptions, ChannelCredentials credentials)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint, IEnumerable`1 channelOptions)
at Google.Cloud.Firestore.FirestoreDb.Create(String projectId, FirestoreClient client)
at BackgroundAppFirestoreOne.StartupTask.<Run>d__4.MoveNext() in C:\Users\usernoname\source\repos\BackgroundAppFirestoreOne\StartupTask.cs:line 95
The file is in the directory and does have the necessary permissions.
My environment:
Developing on Windows 10 with Visual Studios 2019 Enterprise
Deploying to a Dragonboard 410c with Windows 10 iot Core
Google.Cloud.Firestore NuGet referenced
I've tried:
Adding the gRPC.core as this suggested, as a NuGet package reference in VS2019, this did not solve the issue.
And I don't have any non-English characters as this suggests.
This error occurs when attempting to execute FirestoreDb db = FirestoreDb.Create(project);
(see line 44 of sample)
Does anyone know what this could be / what I could try to rectify?
I did not encount the exception with Google.Cloud.Firestore 1.1.0 on Windows IoT Core 17763. Could you please check the package version and OS version. BTW, it is not recommended to use the package in background app, since at the moment you can't register a headless app that uses filetypeAssociation, so that the app can not access the credential file(.json).
Update:
Just tried the official example https://github.com/aspnet/AspNetCore.Docs/tree/master/aspnetcore/fundamentals/servers/httpsys/samples/3.x/SampleApp and it doesn't work.
Brower message:
This site can’t provide a secure connection
localhost sent an invalid response.
Output:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\xxx\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
warn: Microsoft.AspNetCore.Server.HttpSys.MessagePump[0]
Overriding address(es) 'https://localhost:5001, http://localhost:5000'. Binding to endpoints added to UrlPrefixes instead.
info: Microsoft.AspNetCore.Server.HttpSys.HttpSysListener[0]
Start
info: Microsoft.AspNetCore.Server.HttpSys.HttpSysListener[0]
Listening on prefix: http://localhost:5005/
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5005/
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\xxx\Downloads\AspNetCore.Docs-master\AspNetCore.Docs-master\aspnetcore\fundamentals\servers\httpsys\samples\3.x\SampleApp
I created a new Blazor application with Windows Authentication. (Visual Studio 2019 V16.4.0, .Net Core 3.1).
Now Windows Authentication works (the top right corner of the web page shows "Hello Domain\Username!") when running with IIS Express in Visual Studio. But Windows Authentication is not working when running as Kestrel application.
I followed the steps in the following link to make Windows Authentication work with Http.Sys. (BTW, I tried [Kestrel/Negotiate][1] but no luck)
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-3.1
Basically, it just adds the call of webBuilder.UseHttpSys() in CreateHostBuilder() in Program.cs.
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseHttpSys(options =>
{
options.AllowSynchronousIO = true;
options.Authentication.Schemes = AuthenticationSchemes.None;
options.Authentication.AllowAnonymous = true;
options.MaxConnections = null;
options.MaxRequestBodySize = 30000000;
// options.UrlPrefixes.Add("http://*:5005");
});
webBuilder.UseStartup<Startup>();
});
However, running the application will get an error page with message of
This site can’t be reached
The connection was reset.
or
This site can’t provide a secure connection
localhost sent an invalid response.
Edge's error messages are:
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
IE error message:
Can’t connect securely to this page
This might be because the site uses outdated or unsafe TLS security settings. If this keeps happening, try contacting the website’s owner.
The solution is to relocate your certs, and do a bunch of manual configuration that doesn't seem like it should be necessary: I was following the Configure Windows Server section of the http.sys example fairly closely, but ran into issues with the netsh http sslcert commands. The problem is with where dotnet dev-certs https --trust installs the certificate! In What is the default location for certificates created using "dotnet dev-certs https" it's pointed out that that tool installs certificates in the current user's certificate store, not the local computer store. I had to add both certificate stores to mmc and copy the localhost cert over into Certificates (Local Computer)\Personal\Certificates, at which point the sslcert command completed, and when I ran the test application, it was successfully able to connect with TLS.
I am having an application in which I am calling an external webservice.
There is a PFX file provided by the provider.
We are attaching the PFX file using X509Certificate2.
The application runs from Visual studio IIS express. But when pointed to IIS. It will start throwing 403 Forbidden error in the same Machine.
We have added the authentication Headers and Network credentials. But in IIS it will not work. The same exact copy works in Visual Studio.
This used to work before from IIS too. But, recently it stopped and it is not running again. Providers say they haven't changed anything.
NOTE: We have another REST service running in the same machine inside the same IIS without any errors. Both service is having similar codes and fiddler also is giving similar requests from Visual studio and IIS
Full error what I get
System.Net.WebException: The request failed with HTTP status 403: Forbidden. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean, asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at
Production.CompanyInfoWebService.getCompany(wsNumberRequest compInfoRequest) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\test\9b73ec26\5a34d414\App_WebReferences._jpe17z6.0.cs:line 477
at _Default.ButtonFetch_Click(Object sender, EventArgs e) in d:\TestWebsites\app_test\Default.aspx.cs:line 61
I am getting the following error when running my tests via teamcity. I am trying to fire up chrome and run tests on a build agent which is a windows server 2008 machine. When the tests are run, multiple instances of chromedriver are fired up (i can see them in task manager) which eventually maxes out CPU/Memory. The browser is not started at all. I then get tests failing with the below error:
System.InvalidOperationException: unknown error: version info not a dictionary
(Driver info: chromedriver=2.7.236900,platform=Windows NT 6.1 SP1 x86_64)
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 1012
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 846
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs:line 814
My setup looks like this:
var options = new ChromeOptions();
options.AddArgument("--start-maximized");
_driver = new ChromeDriver(#"C:\chromedriver", options);
I have looked around for solutions and people have generally got it to work by updating Chrome and chrome driver. I updated my setup to be the below but i still get the same issue
I am using Chrome version 29
Chromedriver version 2.7 and have also tried 2.8
My .Net binding are version 2.3.3
Specflow version 1.91
Works absolutely fine on my local machine though.
Try stopping all the build agent services then start the build agent from the bat file in the teamcity buildagent folder. Then run the tests and see if that works. If it works I tell you how to set it up like my teamcity server (my chrome driver works).