I have a native WinRT app that using Azure Mobile for its backend. It works great so long as it can reach the service. If the internet is disconnected, any queries will crash the app with no warning or place to catch the exception, as the crash happens in an async call. Here's the minimum code I've found that reproduces the issue:
azure::mobile::client c(L"https://MYSERVICE.azure-mobile.net/", L"MYKEY");
azure::mobile::table table(c, L"MYTABLE");
table.read(); // Adding any .then continuation also leads to exception
And here's the exception:
Unhandled exception at 0x018DCFF6 (msvcr120d_app.dll) in : An invalid parameter was passed to a function that considers invalid parameters fatal.
If I'm supposed to detect connectivity using the azure mobile API before making any queries, I can't find any way to do that. I don't think simply checking internet connectivity is a sufficient answer, and I would also think pinging the service manually before making any queries is a unnecessarily obtuse way to detect an error. It seems like the query results are supposed to come back empty if there was an error, but the code never gets that far. Am I missing something?
Update: It seems the app will also crash if I successfully connect to the service but the table hasn't been created. Again, there is no ability to detect this scenario using the API that I can find.
Related
We are in a restful environment and details of our environment looks like following:
WebAPI2, Docker, .net Core. Now, there is a weird problem with the service. It is a self-hosted service It actually run fine all the time except if it is sitting idle for a long time then the first call to the service fails with Http 400
Not sure if this is related or not but I do see similar behavior when I Postman to the service from the browser and make the first call, it fails with HTTP 500(A little different than what we see from web Client which returns 400)
But the bottom line remains same that the first call fails all the times
Now, the thing is that all the subsequent requests are all OK except the first one. Which makes me think that it must me something to do with idle sitting service but I do not know which component in the stack in cause it. also, How to stop it from behaving this way. Can I be because it is a self-hosted service?
I'm at my wits end with this super descriptive "Access denied" error. Here's the rundown so far. Please keep in mind there is A LOT of information, so I may leave some out by accident.
I am writing a time provider for the w32time service, this is NOT sysadmin stuff, it's not fixed by registering /unregistering the service
I suspect my dll is not configured correctly in such a way to produce the "Access Denied" error
Here's what I've done to try and figure out what's wrong with my dll:
-Ran it through depends and all required callback functions are exposed (TimeProvOpen, TimeProvClose, TimeProvCmd)
All permissions of the dll and it's whole directory hierarchy are read/write/modify now
Put some logging in the dll - nothing logs, meaning TimeProvOpen doesn't even get called!
I am most definitely administrator
I'm not sure what else to do. I enabled debug logs for the Windows Time Service and it is no more descriptive. Just says:
Starting 'mytimeprovider', dll: 'path'
Logging error: Time Provider 'mytimeprovider' failed to start due to the following error: Access is denied (0x80070005)
What else should I be looking for? What can cause access denied, even when permissions are good, and callback functions are exposed?
Unless you are a fabricator of some atomic time sync device with your computer why go through all this trouble ?.
I mean w32tm.exe can already sync with the tcp time protocol with other ip based time servers on the internet. the protocol is adjusting computer clock time depending on time gap, and can ignore to large gaps (or you can disable that). Just beter just be an ip based time source so you dont need to change the service itself (well i cannt imagine why someone would)
For your device, simply you could let it talk over tcp/ip in the same protocol as used by w32tm.exe service. You probaply could do that with an arduino, or pic, disbanding the whole windows OS and have a smaller clock device to sell.
BTW this service can keep track on multiple time services so its not so easy to fool.
Or wrap around time.exe to simply set the time
So my dll depends on a another static library built by an associate. As far as I can tell, my permissions issues are coming from there. When the other library is excluded, my dll is able to be loaded by the w32time service. I'm still trying to figure out how to include that other dll without errors.
At least it wasn't my fault, yay!
I am attempting to replace an old web service that is going away with an updated one, however whenever I call the function I want to use, it is caught with the exception message "There has been an internal system error within the web service"
Is this possibly because of data I'm sending it or is this an issue with the web service itself? Out is there even a way to tell?
I'm working on an online reservation system (the details aren't really relevant to my issue). It's mostly developped in C# with framework 4.0. I have a DB which contains, among other things, the products and the availability of these products. The DB is accessed by a web service, the latter being queried by a web application, which in turn sends the information to be displayed to the browser. Nothing too fancy in term of architecture, but I don't have much experience with that kind of system. This projet is quite old; it's been in development for a few years and I just hopped in six months ago, having no web programming experience before.
I'm currently experiencing concurrency problems. If I open two browsers window (any browser), enter the same query in both windows and post on both pages as fast as humanly possible, I get unhandled exception in my web service. One of the client gets the data, the other receives an error. EDIT : Also, I tested using two different computers simultaneously, and I still could get the unhandled exception.
I was able to trace the problem back to a cache system that was implemented almost a year ago. There's is no locking mecanism, and the cache uses a Dictionary (which is not thread-safe). A few Stack Overflow questions helped me in pinpointing the problem and how I should correct it (this one and that one for example).
That being said, I'm trying to reproduce the problem without having to manually click in two browser windows and hoping to get the right timing to access the same cache simultaneously. The reason I'm trying to do that is that I don't like implementing a solution that should work when I can't reliably prove it actually worked. Also, there's a lot of places where the cache has been (badly) implemented, and I'm not sure I can test all those places by "guessing" the right timing manually.
So, I downloaded Apache JMeter, and using Fiddler2 hooked up to my two browsers, I could find all the HTTP requests I needed to create a Test Plan that sends exactly the same requests.
But to my dismay, JMeter couldn't reproduce the problem, even if I set my Thread Group to create 40 concurrent users! Each one of them receives the data correctly, and none triggers the unhandled exception I am getting by doing it manually. I know it's not a cookie issue, nor a difference in user-agent, as I tested with multiple browsers and with disabled cookies. As the HTTP requests were created directly from Fiddler2, it shouldn't be an issue with hidden fields or URL rewriting, and there's no dynamic field names or content involved. I know Fiddler2 has a "replay" function, but even that couldn't reproduce the problem. This baffles me to no end.
So, my questions are : why can't I reproduce the problem with JMeter? Is there a better tool than JMeter (which is quite complete for a free software) to do that? What are the browsers doing that Jmeter doesn't do (apart from rendering the page, which is really not the issue here)?
Any thought would be much appreciated!
When you say 2 Windows are you sure they use 2 sessions, depending on the browser and the way you open the second window you won't get 2 sessions.
Are you sure you reproduced all the trafic between browser and server ?
If you have more than 1 request then you should Check if it's not 2 parallel Ajax requests from the browser , if so you must know That Without some custom scripting jmeter does not reproduce those 2 parallel request for same session(except for resources download), That might be your issue .
Regards
Philippe M.
http://www.ubik-ingenierie.com
I need a little help solving an issue regarding .NET web services. I have a desktop application that consumes my main web service. One of the methods gets some report data, but in order to do that, web service (A) calls a method in web service (B). Depending what parameters I pass into "A"s method, it either works or fails. If I pass in a filter, the dataset is pretty small, when I don't pass in a filter obviously the dataset is very large. Additionally, if I run web service "A" in debug mode and point my desktop app to the local version (meanwhile B is on our production server), it works wether I filter the data or not. The error I get is a 502 Bad Gateway on production, and a 502 - Web server received an invalid response while acting as a gateway or proxy server.
We have a web farm with some ARR's, so I went into the web farm's ARR, and found "Proxy" settings and adjusted the timeout to 1200 seconds (whereas my app usually fails within 20-30 seconds) and I'm still receive this error. The HTTP version is in "Pass through" mode with the "keep alive" checkbox checked.
We have no issues using a windows service consuming a web service or anything like that, just when one web service consumes another web service.
Addition,
I'm not using any sessions in my web service methods, and I believe the webmethod I call in web service "B" does have a cacheduration value set of 5 minutes.
I'm scratching my head on this for my lack of knowledge of IIS 7, and many other things. If anyone has any ideas or can point me in the right direction I would certainly appreciate it.
I thought I'd come here and answer this question in case anyone else ran into the same issue. This issue was not server related at all. It was code related. In my code I had a datatable (c#), and was doing a datatable.select(....) where I would pass in a filter with many "OR"'s. Ex. Filter = 'x' OR 'y' OR 'z' etc etc. I had around 100 of these, which caused the datatable.select method to produce a stackoverflow exception. I changed the code to do an "IN (x,y,z)" and it works fine now. Hope this helps someone.