Pact-Net Provider Testing - Fundamental question - pact-net

I have a fundamental question. I cannot figure out how to get the MockServer to log (like outlined in this inquiryPactNet - HttpPost Test Fails with 500 internal server error ). If I had that information I may be able to determine my problem. How was that enabled?
I am running Net 6, using the Pact-Net NuGet libraries and PactBuilderV3
I am running into the same issue as the above question link. I cannot Post or GET with a body in my consumer tests.

Related

UMBRACO 10 HTTP Error 500.30 - ASP.NET Core app failed to start

I am trying to deploy my Website with umbraco 10, I always get the following error:
HTTP Error 500.30 - ASP.NET Core app failed to start
The website works correctly locally, however when deploying the app I get the same error...
Details:
DB SQL Server
Azure WebApp .Net6
What i have tried
I have followed the instructions: https://our.umbraco.com/documentation/Fundamentals/Setup/Server-Setup/azure-web-apps
I have created a project from scratch, thinking that the problem was some package, but still the same error.
This is how my umbraco 10 application looks once deployed from VS to an appservice (Azure)
The first thing I would do is check the logs on the the environment where you have deployed the code. That should give you a better idea what is actually going wrong as the error you are getting is very generic and not that helpful.
I have seen issues where the media folder is missing and that is something to check.
When I have issues in Azure, I also look at the files via the Azure Portal and check the connection string and any other configurations files to ensure they look correct. It could be the deployment has screwed up some values.
Have a look at this post which may provide some further details - https://our.umbraco.com/forum/using-umbraco-and-getting-started/108288-getting-http-error-50030-after-successful-publishing-to-azure

Anypoint Platform application name missing (flowVars._clientName)

I am facing a weird problem today, when running my MuleSoft application locally from my AnypointStudio and firing a request from postman, I am getting 403 error. When debugging I found out that the application is checking for flowVars._clientName, however it is missing. According to this documentation, actually yes flowVars._clientName is expected.
https://help.mulesoft.com/s/article/How-to-get-the-client-application-name-in-a-flow-based-on-the-client-id-and-client-secret.
So my application fails with 403 error. Seems that other environments are working perfectly fine.
And yes it is using Client Id enforcement.
Any clues?
Without more details it looks like the issue is inside the logic of your application. The KB article that you referenced is a how to in case you need to obtain the client name. It doesn't say that you have to use for authentication. You don't describe how the application does authentication/authorization. Is it in a flow? Or in a policy? If it is the standard Client ID enforcement policy, the expressions to evaluate client id and secret can be configured, but I don't think the default is not #[flowVars._clientName] nor #[flowVars._clientId].
Note that Exchange is basically a repository of APIs and other artifacts. It doesn't authenticate anything at execution time. Unless your application is trying to use it somehow, but I can't think of a reason for that.
The issue was resolved only by re-downloading Anypoint Studio and mule runtime. Very weird, it was happening only for one application, not for the others. Creating a new workspace did not help, deleting the application and re-cloning and installing did not help, even recloning in a new directory did not help. Only using a new Anypoint Studio and runtime installation resolved it (even with the old code base) ...

How do I configure NServiceBus (v6.2) using AzureServiceBusTransport to not create topology

Does anyone know how to configure NServiceBus (v6.2) using the AzureServiceBusTransport to not attempt to create namespaces?
I'd like to configure NServiceBus the use a connection string which only has permissions to send (the queue's should already be there and if not an error is more appropriate than creation) but whenever I configure it this way I get the following error:
Pre start-up check failed: Configured to create topology, but have no manage rights for the following namespace(s): xxxxxxxxxxxxxx
This error message suggests the functionality is configurable but having looked through the code and the documentation for the mechanism I can't find it.
Many thanks
Adam
Looks like I answered my own question - a bug was raised against the AzureServiceBusTransport and subsequently fixed a little while ago:
https://github.com/Particular/NServiceBus.AzureServiceBus/issues/528
As the bug says upgrading to version 7.1.8 or 7.2.3 and not enabling installers fixes the issue.

Thread: 505.50 when using custom rewrite provider (the one from samples)

I'd like to know how to troubleshoot IIS URL Rewrite module and custom rewrite providers?
I am trying to do a POC on the URL Rewrite Module for our app. Our mappings are all in the database so I thought using the provider that comes as a sample. Got everything installed and configured, as instructed. Created the stored procedure as well. Now when I hit the alias URL I receive HTTP Error 500.50 - URL Rewrite Module Error. Here are the details about the error:
Module RewriteModule
Notification BeginRequest
Handler ExtensionlessUrlHandler-Integrated-4.0
Error Code 0x80070585
In SQL Profiler I see no calls to my stored procedure. The app pool is running under my account (admin rights). No errors in the event logs.
Are there any logs I could look into for more information on what's happening?
I got it working after two days of digging. The samples are good but not good enough: simply using supplied DLLs with supplied config entries doesn't work (for many reasons).
What I ended up doing was getting rid of the DLLs from samples and creating my own provider using the source code from samples and information from this article: Developing a Custom Rewrite Provider for URL Rewrite Module. Then IIS started loading my provider. But in order to make it work correctly I had to get deep understanding of module's config system.
So my answer to my own question -- don't relay on samples alone, they don't work out of the box. Instead, RTFM :) The best place to start is here: URL Rewrite Module Configuration Reference

WCF Services not working from Silverlight Application after Deploying

Okay I have seen some very similar questions here but none seem to be answered to my liking. I have created a Silverlight application that calls a couple of services to populate various comboboxes from the database. I got this working without too much trouble on my local machine.
So now I want to deploy it to our webserver. It was relatively straight forward to get ISS7 to load the Silverlight application. However, none of my services seem to be working properly, in that the comboboxes are empty. In IE I get the following error:
Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at MyTestPage.ViewModel.MyService.GetInfoCompletedEventArgs.get_Result()
at MyTestPage.ViewModel.MainPageViewModel.b__2(Object s, GetInfoCompletedEventArgs ea)
at MyTestPage.ViewModel.MyService.MyServiceClient.OnGetInfoCompleted(Object state)
Line: 1
Char: 1
Code: 0
URI: http://www.mywebsite.com/MyTestPage.aspx
My problem is that this error only occurs when deploying on the webserver and I have no clue how to debug this problem. The error says to check the InnerException but I haven't found an answer yet (after hours of searching) that tells me how I should do this.
I have tried browsing to the services and I am able to do so using the domain name i.e. http://test.myserver.com/Services/MyService.svc. However when logged onto the server and using http://localhost:3456/Services/MyService.svc - which is the path in the ServicesReferences.ClientConfig file - It cannot be found.
Some answers here seem to suggest using a clientaccesspolicy.xml file but I don't understand why this should be necessary if the services are hosted on the same server as the application - they aren't required when debugging on my local machine. Despite my reservations I have tried adding a clientaccesspolicy.xml file to the root of the application but this still doesn't make any difference.
So I have a couple of questions:
1) How do I get access to the InnerException when I am running the application on the webserver? Is there a specific log file I can view or turn on?
2) If, for some reason, I am trying to access the service in a cross domain fashion (even though they are located on the same server) how do I configure the application so that this isn't required?
UPDATE:
Ok, I was able to get the tracing to work. I can now see the trace details on the page when it loads but it doesn't really tell me anything useful. I have also added the option to write the details to the disk. Initially this file wasn't being written and I couldn't understand why. Then I noticed that refreshing my silverlight application was not triggering a write to the log. It was only when I manually browsed to the services that the log file was updated. This seems to indicate to me that my silverlight application is not hitting the services at all (for some reason). I tried cutting out the View Model object and hitting the service directly from the xaml code behind file but this didn't make any difference either.
At this point after spending more than two days trying to figure this out, I am thinking about starting again from scratch.
For my mind it shouldn't be this difficult to deploy something that works on a development machine to a webserver.
I pretty much gave up on my initial approach. I had another go following along from this video http://www.silverlight.net/learn/videos/all/net-ria-services-intro/. It uses Domain services instead of the WCF Services and it was actually fairly straight forward to get it going on the webserver. The example is two years old now so maybe there are better ways to do this now (I am open to suggestions) but at least it worked within an hour of trying it (compared to 2.5 days and getting nowhere).