Flutter web development server, serve JS file with wrong MIME type - firebase-cloud-messaging

I am trying to integrate firebase_messaging package on my web project.
On development server, I am getting error while generating firebase token
The script has an unsupported MIME type ('application/octet-stream').
[firebase_messaging/failed-service-worker-registration] Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:19656/firebase-cloud-messaging-push-scope') with script ('http://localhost:19656/firebase-messaging-sw.js'): The script has an unsupported MIME type ('application/octet-stream'). .
Cause of this error is wrong MIME type of .js file in development server.
But it work find when I release build on IIS.
As JS on IIS are serve with proper MIME type (text/javascript)

Related

I'm developing a DocuSign web application with embedded signing. I get error on createEnvelope on my deployed test site

I'm using DocuSign's .net SDK eSign 5.8.0. I have my application working from Visual Studio 2022. Everything is working fine with embedded signing running locally with my DocuSign development account. I deployed the web application to a test server that is publicly visible. I added the test server url to the application's list of redirect urls. I'm using JWT authentication, from my log files my authentication is good. I'm creating an envelope from a template. My exception is DocuSign.eSign.Client.ApiException: Error calling CreateEnvelope
Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its
name changed, or is temporarily unavailable.
I found the error in my code. My DocuSign baseUri was just demo.docusign.net, instead of demo.docusign.net/restapi

How to integrate prebid.js configuration and sent request to prebid bidders?

I have downloaded prebid js script file from prebid website and made request using that file. while deliver the ad It shows following error.
prebid shows error message :Trying to make a request for bidder that does not exist: rubicon
How to solve this error?
Make sure that you selected Rubicon as a bid adapter when you download prebid.js.
Alternatively if you are building from source, make sure you pass in the paramater.
ie:
gulp build --modules=rubiconBidAdapter

How to resolve 500 Message:An error has occurred while Accessing API from Azure?

I am working with Azure Mobile Services API, my API on the local host running well. I have checked with the help of Swagger UI. but when I publish my API to azure then after that by accessing the API with Swagger I got this error.
500 : {"Message":"An error has occurred."} http://xxxxxxxxxxx.azurewebsites.net/swagger/docs/v1
Now if I type this route http://xxxxxxxxxxx.azurewebsites.net/tables/doctor?ZUMO-API-VERSION=2.0.0
to any table then I got the result,
why not with swagger?
help me to get on the right path.
Please make sure your XML file is available on the same location as you have defined in the swagger UI properties on Azure.
I would highly recommend to generate your swagger xml file
Steps :
Right click on webapi project
Properties => build tab
Output section - in different folder other than bin.
For example : App_Start\\{ProjectName}.xml

Error on adding a service reference to use web-centric WCF service?

I am trying to follow a textbook learning how to create a web-sentric WCF service project. I created the service, and see the corresponding folder under Default Web Site on IIS. I can even browse the folder (localhost/EmployeeService/) and see the contents in the browser. Now I want to make a client, i.e. a simple Console application. When I am trying to add a Service Reference, after I enter the address, I get an error:
There was an error downloading 'http://localhost/EmployeeService/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/EmployeeService/'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
Could you please explain? I saw some questions about the same error, but could not find a solution for myself.
Thanks.
In order to invoke the service, you must point at the service file. Otherwise the web server doesn't know what you're trying to do.
Add the .svc file to your URL to do that, so http://localhost/EmployeeService/YourService.svc.
You can also have it fileless, see How can I host a WCF service without an SVC file in IIS.

Setting IIS to play mpeg dash

I trying to setup a website to play mpeg dash(.mpd) file using IIS 6. I have created a website in IIS and trying to access it via the below web address.
http://xx.xxx.xx.xx/MPEG-DASH/scifi_trailer
But its giving me the below error:
HTTP Error 404.0 - Not Found The resource you are looking for has been
removed, had its name changed, or is temporarily unavailable. Detailed
Error Information Module IIS Web Core Notification MapRequestHandler
Handler StaticFile Error Code 0x80070002 Requested
URL http://xx.xxx.xx.xx:80/MPEG-DASH/scifi_trailer Physical
Path C:\inetpub\wwwroot\MPEG-DASH\scifi_trailer Logon Method Anonymous
Logon User Anonymous
Any help on why i'm facing this issue?
Thanks,
Johm
You need to add in the right mime type into IIS.
See https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr=true
You can find the correct details for the mime type from
http://www.sitepoint.com/web-foundations/mime-types-complete-list/