Electron.NET "Failed to load resource: net::ERR_CONNECTION_REFUSED" - electron

I mainly developed this app using IIS Express for testing (Faster to start than Electron). Now when I try and run it in Electron.NET using electronize start, almost all of my server-side resources are refusing my connection. I've tried looking around for the cause of this but I've not found anything.
Any suggestions?
One of the resources I'm trying to access
background-image: url("https://localhost:5001/Home/MissingTexture");
Another resource
GET https://localhost:44338/lib/jquery/dist/jquery.js net::ERR_CONNECTION_REFUSED

Related

Android Picasso not loading from LAN url

My simple web server is Python3 SimpleHTTPRequestHandler and
it works just fine. It runs in a LAN machine's picture folder and I have tested it
using a browser and entering a test URL such as:
http://192.168.1.111:8000/2020-02-09/test.jpg
However, that same URL will not load by Picasso.
It will load local pictures via the "file://".
As test, I have tested an internet URL and it also loads successfully.
So I have narrowed down the problem to the LAN address.
I have tried the android:networkSecurityConfig solution but it did not work.
I'm running out of ideas at this point and about to ditch Picasso and
load the images via ftp but did not want to get into managing efficient memory
management. Please advise...
I spoke a bit too soon!
I tried to bypass Picasso and use an asyncTask based on java.net.URL(lanUrl)
and saw the error in the debug window:
java.io.IOException: Cleartext HTTP traffic to 192.168.1.150 not permitted
So, that got me to
Cleartext http traffic not permitted and revisit the networkSecurityConfig solution.
Using the accepted answer, the error is now gone and Picasso loads successfully. I only wish it had produced that error message!
Thanks goes to Shafi Muhammed.

importScripts in service worker

I am trying to use IndexedDB through Jakes Archibald's promise-based IDB lib by importScripts but as soon as I select "offline" through Chrome Dev Tools I am getting An unknown error occurred when fetching the script. A funny thing that's happening is that even if shut down my localhost server my app works fine (I have the browser cache disabled through Chrome Dev Tools) on my service worker installed browser but on another, of course, it doesn't.
I've looked into these https://www.w3.org/TR/service-workers/#importscripts, https://github.com/w3c/ServiceWorker/issues/106 resources but I didn't find an fix to my problem.
Any help/explanation would be greatly appreciated.
The problem is likely to be that you've not cached the idb.js file so that the service worker can access it when your app is offline.
Try adding it using cache.add (or cache.addAll if you are caching multiple files) inside your install callback.
Here is a library that i created. It makes using IndexedDB a whole lot easier! completely client-side, no dependencies!
https://github.com/ryanwaite28/promise-db

Google Colaboratory ServiceWorker Error On Chrome

Whenever I open a Colaboratory Document I always get the same error message:
NotSupportedError: Failed to register a ServiceWorker: The user denied permission to use Service Worker.
This is happening on chrome and my browser allows for ServiceWorkers (chrome://serviceworker-internals/), what's going on? Because the thing is all the code still runs.
Colab's output frames use service workers to support some functionality such as displaying richer graphs (Altair and Plot.ly).
The error message indicates that third-party cookies are disabled in your browser, this will prevent the browser service workers from working. The option should be configured under chrome://settings/content/cookies.
I tried white-listing in chrome link (chrome://settings/content/cookies) the following:
https://[*.]googleusercontent.com:443
[*.]colab.research.google.com
Here it was the best approach, better than simply liberatin the 3rd part cookies
Seems to work so on.
Usually there are two causes for this error:
1- you didn't allow cookies on colab domain, so you need to change you browser settings
2- you are using an adblocker

The network path was not found eroor after publishing mvc app

I have been deploying and publishing my application for quite a bit now and everytime it worked fine.
Now I published it again (no error, warnings, ..) and updated my SQL database tables like I do everytime but I get the error: [Win32Exception (0x80004005): The network path was not found]. No suggestion where the code fails or what so ever, only the error.
My connectionstrings in Web.config are adjusted to the SQL server.
I searched the web for this one, but found no working solution.
Does some one have experience with this error?

Can't resolve "UnauthorizedAccessException" with MVC 2 application running under IIS7

We use MVC controllers that access System.File.IO in our application and they work fine in localhost (IIS 6.0-based Cassini). Deploying to IIS7, we have problems getting the controllers to work because they throw UnauthorizedAccessExceptions.
We have done the following to try to resolve the issue:
- Set NETWORK SERVICE and IUSR accounts to have permission on the files and folders in question
- Ensured the App Pool is running under NETWORK SERVICE and loading the user profile
- Application is running under full trust
- We tried adding impersonation to web.config and giving NETWORK SERVICE write permissions (which was not a great idea because that's not what we want to do)
Now, we alternate between getting UnauthorizedAccessException and an IIS7 404 page that suggests the routes are being ignored completely (for example we serve "/favicon.ico" via a controller when the physical file actually lives at /content/images/favicon.ico). We used ProcessMonitor to try to track down the issue but weren't successful.
UPDATE:
This issue is intermittent. We had a brief few minutes where everything worked without making any configuration changes. We're running on EC2, so this could be related to a distributed file system. We're also using a separate drive to store all web site data, we're not using inetpub/wwwroot.
UPDATE 2:
The site works without incident under IIS 7.5, with no configuration changes needed but this is likely due to running with the new AppPoolIdentity. Otherwise it's an identical deployment. Unfortunately we can't run R2 on this EC2 instance.
One of the ways to identifying the cause is using Procmon tool from Sysinternals
Procmon will show the reason for unable to open the file , it will also show who is holding the file.
The issue turned out to be the controller factory we were using not handling file requests properly.

Resources