I am sending object from ASP.NET WebAPI:
It is really strange, but there is no this object at client Angular 4:
I cannot understand where is the MP_ShipmentLines object? What can be a reason? How can I solve it?
I've assigned 'CarCount' at client side. There is no additional processing and this is the same object.
I will tell you some debuging tricks, hope to solve your problem:
1- check address that you requesting to in browser url, it must show you a json you can check your json at jsononlineditor.org, it will show you is your api works fine or not
2- print your resived data where you subscribe your request check this cause some problem like this is related to mapping json to your object
Leave part of your code here to others can give you better answers, till now we only know you have problem and there is no idea why. and it wouldn't be angular or .NET problem.
Related
I'm currently working on a connection to a cloud test environment (xyz.atlassian.net). So far I managed to authenticate a user but when I try to do some "silly" stuff like setting a priority on a Task issue the API call will fail with a 400 Bad request. I understand that the field Priority is not available for issue type Task but indeed for the type Bug.
My question is how would I know which fields can be set before I create the issue? I found some help in the REST reference where they say one could evaluate the result of:
/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields
That indeed gives me a JSON containing a lot of data regarding issue types and their fields but I'm having a hard time parsing that. It looked like the records there would match the definition of IssueFieldEditMetadata but the serializer just can't seem to create an instance from the JSON.
Since there's a central Jira class within the root namespace with several service getters I'd expect to see some service that would provide something like GetFieldsForIssueType(string issueTypeKey) but I haven't found anything similar.
Am I doing it the wrong way? I'm pretty new to REST and Jira in general, so please correct me if I messed things up in this post. Always happy to learn ;-)
Best, Killian
I'm using Abp.io for .net backend and angular for frontend, I've the backend up and running and works pretty ok on swagger.
However when I generate proxies for the backend with the command "abp generate-proxy" it throws me an error saying "cannot read property replace of undefined" and that's bout it, I've no clue where to look for errors.
Note I've generated proxies before and I know how they look inside an angular project but after adding more endpoints I keep getting this error, I've also attached a screen shot just in case you want to have a look at it.
I would really appreciate some help, thanks guys.
I also received this error. I believe this occurs if there are no models/services to generate. After adding my first model and CrudService the error never re-appeared.
I figured it out. First there was a JSON serialize in startup file that was causing that error and the frontend project's API address was targeting to the live instead of the local one.
I have tried the C# sample at https://learn.microsoft.com/en-us/azure/azure-monitor/platform/data-collector-api butI always get an error response back. Has anyone been able to get this sample to work? I have double and triply checked the workstation id and the secret key but still cannot call the API sucessfully.
Yes, as Doris Lv mentioned, displaying the error would certainly help to understand the issue better.
In additional to it what I could observe in general is, the C# example provided for the Azure Monitor Data Collector API uses ASCII encoding while other parts of the page reference UTF8 so try to tweak your code with UTF8 and see if it resolves your error.
Hi I am trying to create a store locator and I am trying to get the user to input their location manually and then convert that into latitude and longitude without use of googles API due to the restrictions of it T&C and I have come across this piece of code will this do what I need it to do and if it doesn't is there a way I can use this to get what I want.
This code is c# and and i got it from this link http://code.google.com/p/geocoding-net/
IGeoCoder geoCoder = new GoogleGeoCoder("my-api-key");
Address[] addresses = geoCoder.GeoCode("123 Main St");
The reasons why I ask is because I don't have much experience within C# I just need someone to maybe point me in the right direction I just a little help from someone to you need to look into this or an example to work off I don't mind learning new code I'm just not sure what I'm looking for to get this to work.
Looking at your 2 previous questions1and 2 you have PHP available. This means you will probably have MySQL available as well.
You can use the zipcode/postcode of the user along with a database of these codes. These databases are available for most contries either free or for a fee.
This code doesn't do what I needed it to do because you still need to use someones API which is not what I wanted but it does work if you use googles API or someone elses API. im just wondering if anybody knows how to do this manually using javascript or c# or ajax without having to use an api to get it to work
I am using WebClient to download a JSON file everytime my WP7 application loads. I am loading all the details in one shot and that too from a server endpoint serving this JSON. The obvious problem I faced was the caching. It was always loading the stale copy. But I tackled this issue by adding a dummy URL paramater at the end.
However, the JSON changes very rarely. So I still need to utilize the caching technique that the WebClient automatically uses. To do this I initially request a call to the server's JSON version something like, http://myserver/JSONVersion. This JSONVersion gets updated any time JSON is updated.
Once I get it, i append it to my url http://myserver/myjson.json?v=(JSONVERSION). This has solved my entire problem. However, I feel this is very ugly and has unnecessary excess code+logic floating around. I am hoping the HTTP Cache headers have a work around similar to the one that I am having. If so, please let me know.
Apparently I found no better solution than the one I currently have.