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 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.
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.
Step 1 : right click to generate
Step 2 : setting
Step 3 : error message
Step 4 : my Model
how to settle this ? i cant generate create form
So far even if you try to add say, another view for an existing controller and an existing action, say ManageController.AddPhoneNumber with the existing view model - AddPhoneNumberViewModel, still the same exception is thrown despite there is already a view for the very same action and controller, using the very same view model.
No need to upload any more screenshots, or anything else, the problem seems to be in the VS 2017 code generator (a scaffolding view issue), and hopefully will be addressed in some of the following updates.
So be patient and use the copy/paste approach, you'll need to redesign your form anyway. Apparently, this is not a solution to your (my) problem, it only says - "you did nothing wrong, it's a VS bug, wait for an update".
I have faced this and similar issues relating to scaffolding a number of times, and my goto solution works pretty much every time - including for this specific issue.
Right click Solution file
Select "Rebuild Solution"
...And then try your action again.
This has worked for me many times in VS2017 and VS2019 - including today with the latest VS 2019.
It seems the scaffolding is being tripped up by something that is already built, for reasons unknown.
I also had the same problem, make sure there are no issues in your controller, I had unfinished code that caused the error, once I commented it out it created the view without any problems.
I got the same issue and I solved it by downgrading the C# version from 7.2 to 7.1 from the project file
which shows an error.
I remembered that I applied some VS code hints which upgraded the C# version. the code hint was to add the paramaters name in the methods calls like
later I tried to add a view and it showed the above problem. after so many hours of searching and reaching to nothing, I started to remember the C# version change
I downgraded the C# version and removed the paramaters names then I added the view successfully.
btw the error has no relation with the model which is a great mislead.
I also had this issue, if you have created or modified the class (being used to scaffold with) and haven't completed a build yet, build the project first and then try again.
.NET is unable to scaffold any classes that haven't been built yet.
I sincerely don't know what happened, reverting to an old version of code fixes it.
Things I tried that didn't work
Rebuild
Clean / delete bin obj folders
use a different model
use a different template
upgrade visual studio
make sure there are no compile errors.
Things I know isn't the problem
Model classes that inherit other classes
Things I suspect is a problem but haven't tested.
generic methods with same parameters only differing by generics constraint
I can provide the code and details if interested.
I had same issue with you, but I manage to solved the problem with following method:
build project (will see build failed).
Solve the project until successfully build the project.
then, add/generate View again. (should be able to auto-generate the View)
Probably is a long time since this issue was posted here, but I got the same problem using the VS2019 (16.9.2) and/or dotnet-aspnet-codegenerator from command line.
After hours and days searching, no of the solutions mentioned above worked for me, and I ended up by find the reason.
The reason behind this was that I was starting first by implementing my Controller which is calling a Web API to get or post data asynchronously. So almost methods were made async.
To solve the problem, I had to scaffold first the controller and keep the default implementation. Then the scaffolding of the views completed successfully.
I can't figure out how to get actual 500 errors to be written into the response body. All I get is the Nancy 500 error page with JavaScript button to show the error. Since this is all happening behind the scenes via an iOS application I can't view the error, and in fact Nancy does not render the error to the div at all.
Is there some wonky self-hosting configuration to just let the runtime stacktrace get inserted into the response? (Obviously just while we are debugging).
In normal ASP it would be easy to limit debugging to localhost. Anyway, I feel kind of blind coding in Nancy and only being able to debug with Visual Studio. All the responses come from within a standard route handler/ controller module.
I'd like to avoid having to sprinkle everything with try catches and just let things fail and get real errors when things fail.
Implement your own IStatusCodeHandler and handle 500 return codes. If you need to, you can also override the OnError pipeline to get access to the actual exception (you can read about this in the documentation).
Detailed information, on the error page, is shown when built in debug mode. For some reason it does not appear to show it for you. What you could do is force it to always be enabled by setting in code:
StaticConfiguration.DisableErrorTraces = false