That error wasn't thrown by a managed component. There are some strange and confusing situations when you get an "Out of Memory" error message but such an error did not happen. Actually, it was a different problem in the non-managed component.
Hence look for things which the functioning programs have in common, things which the crashing programs have in common, and the differences between the groups. E.g. bit-ness, user context (service, interactive, admin, ...) etc.
Hi, I have written an OData 4.0 WebAPI.
As anyone answering this question probably knows, $InLineCount=AllPages has now been replaced with $Count=True.
For backward compatibility purposes, I need to continue to support $inLineCount=AllPages as an option, I have tried for two days to override the validation of this, but I always get a message "The query parameter '$inlinecount' is not supported.".. I created a custom QueryOption validator, tried a CustomMessageHandler in the Configuration.MessageHandlers to no avail.
Would anyone know if/where the URL could possibly be overridden before getting to the OData code. The validation of the $inLineCount value, seems to occur to early for me to override. I would simply like to replace $inLineCount=AllPages with $count=true when the request arrives.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
I didn't see anything detailing specifically OData, so I thought it would fit in C#.
I don't think it's really a code specific question however, more of a question of Method. Here's my code below though. When an OData GET is called, this method fires, but even though I set a custom validator, the oData code is kicking out my request before it gets there, because "$inlineCount" is an unsupported method. My goal is to thow $inlineCount out of the REQUEST URL myself before it ever gets here. But I don't know when/where the request is getting blocked.
I'm new here hope you guys can give me a suggestions/answers to my questions.
I have an aspx page which has two dropdownlist the first dropdownlist populates school level and the second dropdownlist populate available section depending on the selected school level. I had enabled already the EnableViewState to TRUE from the page and to my master page. Below is my code.
On my Page Load event I populate the school level, I have this condition
on my first dropdownlist selectedindexchanged event I have this code
now every time i select a value in my second dropdownlist it always return to the first index or first value. how can i retain the selected value on my second dropdownlist? I'm having burned a lot of time for this screnario.. please help me.
Sorry, not enough code to fully answer but try this. I am running from memory now so I might be off a bit. I had a similar problem but found that I was forcing the second dropdown back to the first object. IIRC I also a selectedindex change event on the second dropdown and that was where my problem was.
If this doesn't help drop in more of the code.
Jack of all trades, master of none, though often times better than master of one.
Thanks for your replies.. i tried your suggestion by storing the selectedindex of my second dropdownlist into session. i put a breakpoint on Loading event to see if the selectedindex value was stored but unfortunately it was not stored,it always stored the first value of my second dropdownlist.. here are some of my codes below
protected void ddlLevel_SelectedIndexChanged(object sender, EventArgs e)
_getSection(); //-- this will populate the section in my ddlSection which values are
ex. DataTextField DataValueField
Autopostback of my DDL's is set to True and EnableViewState from my masterpage is also set into True.
Every time i select the second or third item in my ddlSection it always give me the first index I can't understand???...Im sure that there is no event calling my _getSection function only in the ddlLevel. by the way Im using Masterpage but there is no code i have in my masterpage. Please let me know what's happening on this scenario?
thanks for the reply @Member9245431 but my objective is to get the seletedvalue of my second dropdwonlist(ddlSection) which i can't get the selected item. every time i put a breakpoint on my Loading event of my page the selectedindex in my ddlSection always reset that's why im still getting the first index which i selected is the second or third item. im sure that there's no one in my function that populates my ddlSection trigger at any event only in my first dropdwonlist(ddlLevel)which fires only on selectedindexchanged event. I burned a lot of time on this issue of mine.
'usually' the format of data on the clipboard is not tagged to a specific application - but the type of the data - eg html, image .. you can luckily create your own data format (and maybe then you name it according to your application name)
I started to learn how to write mvc tests from the following site http://www.asp.net/mvc/tutorials/older-versions/contact-manager/iteration-5-create-unit-tests-cs"
However when running the test I keep getting a object not set to instance exception
That's one of the easiest errors to track down. One of the objects you're using is null. It's that simple.
Use the debugger to find out which one. You're getting this error because you're code is assuming that every property and method you're calling is returning an object. One or more of them returned null.
Step through the code line by line in the debugger and hover the mouse over each and every variable to see what it's value is.
You can set the development environment (Visual Studio) to break where the exception was originally throw (if it's re-thrown) by changing the following setting: "Debug->Exceptions..." and check the Thrown column for "Common Language Runtime Exceptions".