I have problems for consuming web service in Silverlight - c#

my problem is as follows:
When I use my web service, it displays the following error in Silverlight:
"System.Collections.Generic.KeyNotFoundException was unhandled by user code
Message="The given key was not present in the dictionary."
I'm new to c # and Silverlight, and don't really know what to do. I can not find a solution on Google.
Thank you very much in advance.

Friends found the problem was not using the namespace "System.ServiceModel"
link where I explained some of this here link text

Related

C# Google Pay for Passes transit ticket loading error

We're trying to integrate with Google Pay for Passes to add transit tickets to Google Pay, using C# and the "skinny" flow as described here:
"Skinny" JWT variation
We're also using the C# example as provided here: google-pay/passes-rest-samples
The REST calls for transit all succeed and the JWT token is generated, however when trying to add the ticket to Google Pay by using the link "https://pay.google.com/gp/v/save/{jwt_generated}" it just fails with a generic error saying "Something went wrong. Please try again later.". We've tried by just using the link directly, by adding a JS button on a website and even tried loading from a native android application, they all come back with the same error. When using JS button, the error callback returns "SERVICE_ERROR" with no further details. On google console we can see the transit class status as APPROVED.
Any details on what we might be missing would be helpful as it's not clear where the problem is originating from.
There isn't enough information to help you out here. But the best course of action is to request support with the following URL: https://support.google.com/pay/merchants/contact/instore_merchants
The team should be able to look into your specific issues.
I had same issue using passes-rest-samples.
I've missed changing SERVICE_ACCOUNT_EMAIL_ADDRESS in Config.cs, so resolved it by changing it to right service account.
this.SERVICE_ACCOUNT_EMAIL_ADDRESS = "ServiceAccountEmail#developer.gserviceaccount.com"; // CHANGEME

Adding a Web Service for ReportExecution2005 - Resource cannot be found C#

I'm trying to add the ReportExecution2005 Web Service into my project to allow me to execute reports from within my program.
We do this in other programs that are written in VB.net however, these programs have a namespace added for ReportingService that's around 3000 lines of code as the company has always struggled with adding the ReportExecution web service. Before I begin converting this code from VB.net to C# I thought I'd try again in getting it working the proper way.
I'm currently going to the Add Web Reference page, and putting the following:
http://reportserver/Reports/ReportExecution2005.asmx
This is returning a 404 error saying the resource can't be found. I've checked the URL over and over and got colleagues too. So I'm not really sure what else the issue could be.
Is there something that needs adding onto our report server for me to be able to add the web reference?
If anyone has had this issue before how did you solve it?
Any tips appreciated.

Nancy.ViewEngines.ViewNotFoundException: Unable to locate view 'index.php'

I am making a project where I need to host a simple website. Nancy seems to be a really easy and straightforward library. Only a couple minutes in and I've got a problem no one has addressed online. How do I host an "index.php" file with Nancy?
I'm hosting a *.php file because I need the php script to run on startup, is this even possible with Nancy?
So far all I've got is a "MainModule" class derived from "NancyModule" and it says Get["/"] = p => View["index.php"];. When I navigate to the page however, in my Firefox browser it gives me the error
Nancy.ViewEngines.ViewNotFoundException: Unable to locate view 'index.php
how do I fix this with Nancy or is there any other http web hosting libraries for C# I could use?
After further research I found that Recaptcha has an explicit way to use it. This way allowed me to instead of getting the response through PHP I can get it using Javascript.
var code=document.createElement('p');
code.innerHTML=grecaptcha.getResponse(widgetId1);
document.body.appendChild(code);
I put this code in the action of the form, so when the Recaptcha is solved it will display the response as a paragraph and then it would be obtained using an HtmlParser such as HtmlAgilityPack for C#.

getting "invalid quoted string" while updating calendar event

I am using Google calendar API with my ASP.NET application, and it was working fine till morning but suddenly I was getting lots of exception from Google calender
“The specified value is not a valid quoted string”
I am not sure if Google has changed any service from their end. Please help in this regards, it is really creating problem on server. Currently I am using the Google calendar V3 having DLL version as 1.6.0.67 and I want to update my code for their new DLL and not getting proper documentation for this. Please hep if any both knows about the documentation.
It should work now. There was a problem in the Calendar API and how it set the etag property. I'm working on a change (https://codereview.appspot.com/96320045/) to make the library more robust and avoid throwing errors in this case.

ERROR: Attempted to write schema for bad QName

I'm trying to import a Java axis web service into C# to be used in my application; however, it is giving me the following error: Attempted to write schema for bad QName
Any idea what this could be? I've imported schema before no problem, but this one won't budge.
Also, it's important to note that whenever I click the link to the WSDL file for this web service I get an HTTP 500 error. Whenever I click any other WSDL web service link in the group it goes right to the WSDL schema page. Obviously these two incidents are connected... I'm just not sure how.
Any thoughts are appreciated.
Thank you.
The HTTP 500 error is your problem. If you can get a local copy of the wsdl/schemas you should be able to bring them into your c# application. If you cannot browse to the WSDL c# is not going to be able to suck in the wsdl/schemas and generate the appropriate client code.

Categories

Resources