Clearing Site Data Breaks Mapping - IndexedDB isn't handling a closed connection - here-api

Repro Steps:
Load a Map
In Chrome dev tools, visit the Application tab and click "Clear site data"
Return to your map and scroll or pan
Exception thrown and map becomes unresponsive to input
Failed to execute 'transaction' on 'IDBDatabase'...
Looks like the team isn't catching errors in IndexedDB. As a consumer of the library, we can't reliably catch this error either because JavaScript global error handlers don't get error information for scripts loaded from another domain.

Please use Maps API for JavaScript 3.1 instead of 3.0. The new version 3.1 doesn't have this flaw.
See please on Migration to 3.1 and Examples

Related

VS 2022: Breakpoint will not currently be hit. No symbols have been loaded for this document

I have a VS 2022 solution with a WPF client and ASP.NET backend and when I put breakpoints in the backend web services they have the yellow tag with a message:
Breakpoint will not currently be hit. No symbols have been loaded for
this document.
I run the solution with the WPF project set as the start project, but, if I test this by setting the web project as the start project - the symbols will load, but of-course this is useless as the wpf app is not running.
A little history: This solution was running on my old dev PC (same version of everything) and all worked as expected, but when loading all solutions onto my new PC, this problem started up. I have googled this and found a ton of posts about it and have tried everything, but nothing has worked yet.
I can run the solution and attach to the process and then debug, but since I will be debugging 100s and 100s of times, those extra steps are a real pain and I have been able to debug asp.net projects from wpf for many years up to now.
Can someone please recommend some additional steps I can take to solve this problem?
FYI, I Have been through everything from this link:
How do I remedy "The breakpoint will not currently be hit. No symbols have been loaded for this document." warning?
Thanks.
Common method:
In VS, go to Tools --> Options --> Debugging --> General, and then cancel the checks in front of [Enable "Only My Code"] and [Require source files to exactly match the original version].
But this method you may have tried.
Ultimate method:
When the breakpoints clicked by the mouse are invalid, you can perform the following operations in vs:
Debug --> delete all breakpoints
Debug --> New Breakpoint --> Function Breakpoint, and then enter the name of the function to add a breakpoint

Unable to add reference to third party WCF Service using Visual Studio

I recently received an updated integration document from a third party web services provider. One of the changes indicated that there are updated services that are located at a new URL.
I proceeded to delete my existing reference in my .NET 3.5 console application (VS2012) and attempted to add a new one pointing to the updated URL but was unable to do so due to the following error and die disabled "Add" button:
I subsequently tried to restore the reference to the old URL (which worked a mere month ago when I initially added it) but that to gave the same error.
I did a bit of googling and found the following posts that were not very encouraging:
Can't add Service Reference
Mixing Add Service Reference and WCF Web HTTP (a.k.a. REST) endpoint does not work
Don’t use “Add Service Reference”!
The first link simply repeated my problem statement. The second suggested there is no hope for me and the third is of no relevance since I do not control the server side component.
I was hoping someone with some more WCF experience possibly point me in the right direction. I suppose my question is twofold:
1: Is this something I am doing wrong on my side or can it be a problem with configuration on the third party server?
2: Is there any way I can reasonably add a reference to those services in my project without using "Add Reference" in VS, using the WSDL which I am able to download?
Edit: Just to calrify, the URL resolves and I can see the service controls and descriptions in both my browser and the VS window where you attempt to resolve the WS but the ".../$metadata" part in the error message above is not part of the original URL I entered. original URL which resolves fine is http://service.somewhere/service234/thing and the error refers to http://service.somewhere/service234/thing/_vti_bin/ListData.svc/$metadata

Error coming up when trying to open up file browser

Currently on my website i am trying to get it so that a user can upload an image from their local images. I have followed a tutorial, but when i debug it and try to open up my images folder i get this error message:
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
Please can someone help me here, i have read a few posts; but seen as this is my first time doing this; i dont really understand them.
Thanks for any response!
You are trying to use Windows Forms functionality in a ASP.NET Web Page. Line 140:
FileDialog fldlg = new OpenFileDialog();
Windows Forms is desktop technology. You can't mix that with a ASP.NET web app. You can use the FileUploadControl to enable file uploads in your web application:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx

ASP.net MVC4 WebAPI JSON Medium Trust

So, I've been playing with ASP.net MVC4 and the new WebAPI the past few days. One of the first things I always do when starting a new app is throw <trust level="Medium" /> into my Web.config so I can be sure my app will run on most hosts.
Usually, if I use the stock Microsoft stuff everything works without a problem. But tonight I was having problems following Brad Wilson's Webstack of Love presentation. All of my AJAX calls were returning a Server 500 error. However, when I would hit the WebAPI directly in the browser, it would return everything in XML format.
So I assume the serialization to JSON withing the WebAPI controller is what is causing the issue. My question is how to work around this?
It bothers me that Microsoft teaches shared hosts to play it safe and lock things down to Medium Trust, then creates new web technology that won't work in Medium Trust. Maybe everything will be fine when it is a final release and the binaries are installed in the GAC? It can take months for shared hosts to upgrade to the latest and greatest.
It seems like the biggest problem is usually Reflection--90%+ of the stuff I've tried that won't run on Medium Trust is due to this (For instance, I'd love to use AutoMapper instead of hand-coding ViewModel => Entity mappings). Is there a way to confine Reflection to the assemblies within an app so it can become part of the Medium Trust feature set and make this problem a thing of the past?
I set up Failed Request Tracing on IIS when I found that the Application_Error event wasn't even firing in my Global.asax. This is the exception being thrown. Not sure how to get any more details.
Warning -MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName ManagedPipelineHandler
Notification 128
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 0
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode The operation completed successfully. (0x0)
Link to sample project displaying the issue. Also enclosed in the base "Test" directory are screenshots of my fiddler tests: XML-fiddle.png & JSON-fiddle.png.
Web API works just fine in medium trust. Also, since RC version, it 's not deployed to GAC anymore. You can just xcopy Web API dlls onto the server and reference them (or simply just publish your project from VS or git publish it if your host support it, like Azure).
You mention web stack of love. Well, it is SignalR that doesn't work in medium trust mode. See here - according to David Folwer, it won't anytime soon https://github.com/SignalR/SignalR/issues/364
Finally, if you are getting error 500s always add this to Global.asax
GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
to receive verbose errors.
My problem had to do with the serializing of Entities with circular relationships (in this case Countries => States, State => Country). The JSON serializer was unable to handle this which led to a 500 error when requesting JSON.
I often use Entities directly for mocking things up and getting a prototype. I always planned on using distinct View Models anyway, but I wanted to understand what was going on and why it was failing.
Kiran Challa's answer in my ASP.net forums question helped me get the error that was occuring: "The RelationshipManager object could not be serialized. This type of object cannot be serialized when the RelationshipManager belongs to an entity object that does not implement IEntityWithRelationships."
That then led me to the Serializing Circular References with JSON.Net and Entity Framework on johnnycode.com.

Getting an "Unable to load WSDL" error

I'm getting this error when I try to load the WSDL for my Asp.Net WebService.
faultCode "Server.Error.Request"
faultDetail "Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://myurl/web/Service.asmx?WSDL)"
faultString "HTTP request error"
here is the code:
service = new WebService();
service.addEventListener("fault", onServiceFault);
service.addEventListener(LoadEvent.LOAD, onWSDLLoaded);
service.loadWSDL(url);
I've done a ton of googling and found several possible solutions but it does not appear to be any of them. I'll go through what I've tried.
I can open the link in a browser IE and FF.
There's no user signed certificate required
My crossdomain is setup correctly
Here's the really interesting part, it works if I compile and run with Flex SDK 3.2 but I was trying to integrate AIR 2.5 for some features that are required and so I updated to Flex 3.5 w/ AIR 2.5 on top. If I build with this SDK it does not work.
I've used an HTTP traffic montior(Fiddler) to looked at the requests and noticed that with the 3.5 SDK it does not ever send out the request. So it must be something in the flex side, because it's obviously never getting to my service.
Does anyone have any other suggestions on what to try or is anyone else having this problem?
I'm having the exact same problem with Flex 4.0/AIR 2.5 when the .air is installed on a Windows OS. On Mac OS it works perfectly fine. When running/debugging from code, it works perfectly fine. The code is set up to do a .loadWSDL() on a webservice that is behind a valid SSL certificate.
Downgrading to AIR 2.0 fixes it.
Any suggestions here would be great. Thanks to the original poster for articulating this problem.
UPDATE: Turns out it's an AIR 2.5 problem with setting the Flex Framework files to be RSLs. I have helped Adobe track it down and they have recreated it now: http://forums.adobe.com/message/3345972#3345972

Resources