Click here to Skip to main content
14,333,606 members
   

Database

 
GeneralRe: SQL Header Detail Last Number Problem (overlap identity saving Details) Pin
Hotaxion14-Oct-18 17:23
memberHotaxion14-Oct-18 17:23 
AnswerRe: SQL Header Detail Last Number Problem (overlap identity saving Details) Pin
CHill6017-Oct-18 5:05
protectorCHill6017-Oct-18 5:05 
GeneralRe: SQL Header Detail Last Number Problem (overlap identity saving Details) Pin
Richard Deeming17-Oct-18 9:04
mveRichard Deeming17-Oct-18 9:04 
QuestionNeed good, easy to manage "mail merge" program, free or not Pin
Charles Wolfe7-Oct-18 21:39
memberCharles Wolfe7-Oct-18 21:39 
AnswerRe: Need good, easy to manage "mail merge" program, free or not Pin
Victor Nijegorodov8-Oct-18 8:32
memberVictor Nijegorodov8-Oct-18 8:32 
GeneralRe: Need good, easy to manage "mail merge" program, free or not Pin
Charles Wolfe9-Oct-18 19:47
memberCharles Wolfe9-Oct-18 19:47 
GeneralRe: Need good, easy to manage "mail merge" program, free or not Pin
CHill6017-Oct-18 8:45
protectorCHill6017-Oct-18 8:45 
QuestionError passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jkirkerx27-Sep-18 12:41
professionaljkirkerx27-Sep-18 12:41 
So I can add and delete Mongo documents but I ran into trouble with updates using HTTPPut.
When I get the record from the controller, the ObjectId in Angular is sort of truncated down to the string. When I pass it back to the controller, the controller complains that it's not a valid MongoDB ObjectID and HTTP 400 me. The response was not a valid ObjectID.

I tried changing my angular model Id to object
public Id: string --- Before
public Id: object --- After
Took the BSON decorators out of the .Net Model, which is the MongoDB model
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public ObjectId Id { get; set; }

Not really sure what direction to go here to keep my mean stack.

HtTP Response
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Vary: Origin
Server: Kestrel
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: <a href="https://localhost:44367">https://localhost:44367</a>
X-Frame-Options: DENY
X-SourceFiles: =?UTF-8?B?RzpcamtpcmtlcnhBbmd1bGFyXGFwaVxwb3J0Zm9saW9zXFVwZGF0ZVBvcnRmb2xpb1w1YmFkNTEyMGM0MzFjYjA1NjQxNTE2NTk=?=
X-Powered-By: ASP.NET
Date: Thu, 27 Sep 2018 23:09:47 GMT

7f
{"Id":["Error converting value \"5bad5120c431cb0564151659\" to type 'MongoDB.Bson.ObjectId'. Path 'Id', line 1, position 32."]}
0
If it ain't broke don't fix it
Discover my world at jkirkerx.com


modified 27-Sep-18 19:11pm.

AnswerRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
Nathan Minier28-Sep-18 1:19
professionalNathan Minier28-Sep-18 1:19 
GeneralRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jkirkerx28-Sep-18 8:02
professionaljkirkerx28-Sep-18 8:02 
GeneralRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jkirkerx28-Sep-18 8:17
professionaljkirkerx28-Sep-18 8:17 
GeneralRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
Nathan Minier28-Sep-18 8:45
professionalNathan Minier28-Sep-18 8:45 
GeneralRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jkirkerx28-Sep-18 12:18
professionaljkirkerx28-Sep-18 12:18 
AnswerRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jschell28-Sep-18 11:25
memberjschell28-Sep-18 11:25 
GeneralRe: Error passing MongoDB ObjectID back to .Net Core 2.1 Controller Pin
jkirkerx28-Sep-18 12:44
professionaljkirkerx28-Sep-18 12:44 
AnswerMessage Closed Pin
21-Oct-18 22:40
memberMember 1402786821-Oct-18 22:40 
QuestionRun correctly from code VB.NET Pin
Computechsoft23-Sep-18 22:07
memberComputechsoft23-Sep-18 22:07 
AnswerRe: Run correctly from code VB.NET Pin
Richard MacCutchan23-Sep-18 22:13
protectorRichard MacCutchan23-Sep-18 22:13 
GeneralRe: Run correctly from code VB.NET Pin
Computechsoft23-Sep-18 22:34
memberComputechsoft23-Sep-18 22:34 
GeneralRe: Run correctly from code VB.NET Pin
Richard MacCutchan23-Sep-18 22:50
protectorRichard MacCutchan23-Sep-18 22:50 
GeneralRe: Run correctly from code VB.NET Pin
Computechsoft23-Sep-18 23:02
memberComputechsoft23-Sep-18 23:02 
GeneralRe: Run correctly from code VB.NET Pin
Richard MacCutchan23-Sep-18 23:11
protectorRichard MacCutchan23-Sep-18 23:11 
GeneralRe: Run correctly from code VB.NET Pin
Richard Deeming24-Sep-18 8:13
mveRichard Deeming24-Sep-18 8:13 
AnswerRe: Run correctly from code VB.NET Pin
thatraja23-Sep-18 23:21
protectorthatraja23-Sep-18 23:21 
QuestionHow to retrieve List content in JSP from Hibernate Query Language Pin
Mr ARUL SUJU D15-Sep-18 12:38
memberMr ARUL SUJU D15-Sep-18 12:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.