I need to validate SSL certificate of a website in my UWP app, and I am following the method described at this URL: https://learn.microsoft.com/en-us/windows/uwp/security/intro-to-secure-windows-app-development, but there is no TransportInformation property available under RequestMessage class in my IDE, and the intellisense complains about it too. I'm using VS2017, .NetCore 5.3.3, target Version 15063 min version 10586. Please help!
Make sure you're using Windows.Web.Http.HttpRequestMessage and not System.Net.Http.HttpRequestMessage. TransportInformation is a member of the Windows.Web version only.
You can use Visual Studio's object browser to help find which class a property is in. Browse "My Solution", search for TransportInformation, and the Object Browser will point you to Windows.Web.Http.HttpRequestMessage.
Related
I am trying to open Browser with a link inside my test method (application is launched prior to that). I installed Xamarin essentials Nuget, and per my current understanding I am not able to use this package outside xamarin project. I found some solutions (see below, using Mock object) but this does not seem to work.
var mockLaunch = new Mock();
IBrowser open = mockLaunch.Object;
open.OpenAsync("https://i389l.app.link/JFsYo6d1Y37", BrowserLaunchMode.SystemPreferred);
Does anyone have solution how to open browser (using real Android device) inside my test method? Thank you.
I am learning to develop cross platform mobile applications using Xamarin.Forms and Visual Studio 2017. Input field Entry has a CursorPosition property in the documentation. But when I try to use it I get the error "Property not found". What am I doing wrong? thank
The CursorPosition property has been introduced in Xamairn.Forms 3.2. Prior to that you need to write your own CustomRenderer. Check the version and upgrade accordingly.
I am trying to create a Xamarin.Android Component to send to the Xamarin Component Store, and I need to bundle my Colors.xml with it, so it is accessible to everyone using my component. I am setting the build action for the Colors.xml tp "AndroidResource".
So I created an Android sample application, when I add a reference to my library project's dll, I am able to use the colors defined, my project compiles and it runs, but I get no intellisense on Xamarin Studio. So that would be a bad thing for anyone using my library, as they would not be able to even see that the colors are available to use. You can see in this picture the colors defined are not available in the suggestions box.
If I add the Colors.xml directly into my project, I get Intellisense support, like this:
Is there a way to achieve the same result above when adding just the dll reference? Did I do something wrong or Xamarin.Android/Xamarin Studio doesn't support this kind of scenario?
EDIT: To be clear, I know this is a problem with Intellisense not being able to pick up the values, but is there anything I can do to make it work?
I tried to look through all the tutorials for RAML and I was pretty excited.
I found most of the online resources available but I could not understand why, when i set up everything and the flows are generated, then i run it locally as a mule application, when i point to localhost:8081/api/console/ i get a huuuuuuuge json response, but not the UI described for example here.
Yes i also faced the same issue with Any Point Studio. It is not at all displaying in the API KIT Console present in Any Point Studio. But to feel good and to see the output i have just tried it with Google Chrome Browser and i got the expected User Interface as i was expecting from API KIT Console. Hope this issue will be fixed from next release onwards.
Here is the URL i used to see it on Browser : http://localhost:8081/remote-vending/api/console/
Here is my output from Google Chrome browser for the API KIT Tutorial
My GUI didn't show in the Anytime studio tab: APIkit Consoles, one way to fix this:
make sure you have started your application
right click for the context menu
select encoding
click auto-select
I have had the same problem and resolved it by removing invalid whitespace. One of the example files I was including had an invalid trailing space.
The way I found out;
Open the Network panel in the Developer Toolbar in your browser
Go to http://localhost:8081/api/console/
Find the response for a request to '/api' with the request header 'Accept:application/raml+yaml'.
This response should contain the fully compiled RAML, where all include files have been included.
Copy this entire content into a new RAML-file in Anypoint Platform API Designer or some other YAML editor with error reporting.
It highlighted the invalid whitespace immediately for me.
It should work Out of the box.
It could be a bug of an earlier version.
Could you check the behaviour in more recent releases?
Changing my default browser from Firefox to Chrome resolved the issue for me.
I am starting to learn web development using Microsoft WebMatrix 3. I'm using the book Introducing Microsoft WebMatrix, which targets an earlier version, but a lot of things are the same. I'm getting compilation errors when I attempt to use the Microsoft ASP.NET Web Helpers Library, though, and I don't know why or how to troubleshoot the issue. Specifically, I am getting compiler error CS0103 when attempting to use the Video object or the LinkShare object. I've been searching the Internet for days, and I can't find anyone that has had the same issue and resolved it.
Steps to Reproduce the Error
Run WebMatrix 3.
On the Quick Start page, click New, then Template Gallery.
Select Empty Site, and click Next. A new site named "Empty Site" is created.
Open the Default.cshtml page for editing.
Based on the tutorial Displaying Video in an ASP.NET Web Pages (Razor) Site, add the following to the body of the page:
#Video.MediaPlayer(path: "myvideo.wmv",
width: "400",
height: "600",
autoStart: true,
playCount: 2,
uiMode: "full",
stretchToFit: true,
enableContextMenu: true,
mute: false,
volume: 75)
Run the site. An error page appears in the browser with the following statement:
"Compiler Error Message: CS0103: The name 'Video' does not exist in the current context"
Fair enough. I'll use NuGet to obtain the Microsoft Web Helper Library.
Back in the WebMatrix window, click NuGet.
Select the WebMatrix Package Source.
The following error message appears:
The schema version of 'Microsoft.AspNet.WebPages' is incompatible with version 2.5.40416.9020 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
Click OK to ignore the error and continue. I tried going to that website and following the instructions, but I already have the latest version of NuGet for WebMatrix.
Type Web Helpers in the search box and press Enter.
Select "ASP.NET Web Helpers Library" and click Install. Confirm the installation and accept the EULA.
The same error regarding the schema version of 'Microsoft.AspNet.WebPages' appears. Click OK to ignore the error.
Click Close to exit the NuGet Gallery, and click OK to close any remaining error windows.
Run the site. The same error message as before appears.
This demonstrates the error with the Video object, and I am also receiving the same error when I attempt to use the LinkShare object.
Environment Information
OS: Windows 8.1 Pro with Media Center Version 6.3 (Build 9600)
Browser: Internet Explorer 11.0.9600.16476; Update Versions: 11.0.2 (KB2898785)
WebMatrix Version 3.0 Version Information:
WebMatrix: 7.1.1932.0
IIS Express: 8.0.8418.0
.NET Framework: 4.0.30319.34003 built by: FX45W81RTMGDR
Web Deploy: 7.1.1762.0
Web Platform Installer: 7.1.40719.0
ASP.NET Web Pages: 2.0.20715.0
Project Information
The following packages are shown under Empty Site → App_Data → packages:
Microsoft.AspNet.Razor.2.0.20715.0
Microsoft.AspNet.WebPages.2.0.20710.0
Microsoft.AspNet.WebPages.Data.2.0.20710.0
Microsoft.AspNet.WebPages.WebData.2.0.20710.0
Microsoft.Web.Infrastructure.1.0.0.0
microsoft-web-helpers.2.1.20710.2 ← added by NuGet
The following DLLs are shown under Empty Site → bin:
Microsoft.Web.Helpers.dll ← added by NuGet
Microsoft.Web.Infrastructure.dll
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
WebMatrix.Data.dll
WebMatrix.WebData.dll
Summary
I'm getting the CS0103 compiler error when attempting to use the Video object or the LinkShare object from the ASP.NET Web Helpers library. It's clear that the compiler is not locating definitions for the objects I am trying to use, but I do not know why, and as a WebMatrix beginner, I don't know how to figure out why. In Visual Studio, this error would indicate that I am probably missing a reference in the project, but everything seems to be present in the project in WebMatrix, and nothing seems to be missing from the command line shown on the error page.