I am having trouble in loading a project. Initially this use to work fine until today. (after someone committed some code and i updated my solution)
open the csproj file and change false to true for UseIISExpress.
< UseIISExpress > true < /UseIISExpress >
Related
It seems every time I try and deploy a plugin to Umbraco 9 on Azure App Service I seem to end up with an Angular error where the plugin's controllers don't get registered something like this
Error: [$controller:ctrlreg] http://errors.angularjs.org/1.8.0/$controller/ctrlreg?p0=Our.Iconic.Prevalues.Packages
at umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:32:168
at umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:123:19
at ea (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:105:20)
at p (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:96:476)
at g (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:90:292)
at umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:89:422
at Object.link (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:326:432)
at umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:42:134
at Ca (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:114:361)
at p (umbraco-backoffice-js.js.vd671f7279661e0e87e3549a36c6c11bb1054da05:98:340) '<div ng-include="propertyEditorView">'
When you click on that angular link it just says
The controller with the name 'Our.Iconic.Prevalues.Packages' is not registered.
Everything works perfectly fine on my local environment and when I connect to the Azure App Service all the files are there in the App_Plugins... folder. It even loads some of the other files in the manifest but for some reason the controllers don't get registered. This is not the first plugin where this has happened either. Last time I manually deleted / copied files / redeployed / restarted / stood on one foot and eventually it started working. No idea what fixed it. Now next package added same thing happens again. What am I missing?
Had the same issue and got it to work with the solution provided here:
https://our.umbraco.com/forum/umbraco-9/107740-umbraco-9-cant-register-controller-for-a-custom-dashboard-that-works-locally-but-fails-when-deploy
Just want to add that this section should be added in Umbraco > CMS section of appsettings like so:
"Umbraco": {
"CMS": {
"RuntimeMinification": {
"useInMemoryCache": true,
"cacheBuster": "Timestamp"
}
}
}
So I've come across a problem, what I am trying to do is "Check if the python file is ready to execute" as verbatim by my CS professor. So here I what I have done so far:
-Enabled Directory Browsing
-Added a new Script Map
-Linked the executable to the python executable of my python project
-Changed its directory to a new folder (as instructed)
-Created a New Python File with this code in it:
print("Content-Tytpe: text/html\n");
number1 = 1
while number < 10:
print("Hello Python World! <br>");
number = number+1
-and finally clicked on "Browse .80"
I clicked on "test.py" (the python file) and this showed up:
I researched a couple of fixes in this site and among others and this is what I have tried:
-Checked the permissions in the folder and made added a new permission for Everyone with Full Control Access
-Checked Authentication and Anonymous Authentication and set it to Application Pool Identity, both on the Desktop and the Default Website
-I even went to go as far as resetting my PC to check if some other third party application is affecting it
I am really at the end of my rope here so any help would be greatly appreciated.
Try to refer to the steps below.
In IIS, select your site -> Double click on Authentication -> Select Anonymous authentication-> Right-click on it and select Edit option.
Select a Specific user option. Set IUSR, click OK.
Go to the site folder-> open its properties-> go to Security tab-> Make sure IIS_USRS has Read & execute, List folder contents, Read permissions.
After that try to visit the page again.
If the issue persists, try to check whether you are able to visit any HTML file in that folder or not.
I have a Blazor app that I'm deploying to Azure for some alpha testing. I've managed to do this and I can run the app from the website just fine.
The problem comes when I make changes to the client and server projects and republish them. Whatever browser is running the client will run whatever is already in the browser cache until the browser history is cleared. That means until the history is cleared the app appears broken because the client requests on the old version don't match the new server API - not to mention my client side changes don't get tested.
How can I force a reload of the client when I publish my changes? Do I have to tell the browser not to cache my app (not sure how on blazor) and take the performance hit until my app stabilizes? Or is there a way to force a client reload after the first API call using some middleware or something?
Or am I missing something?
Edit: It may be relevant that I used the PWA template provided in Blazor WebAssembly 3.2.0 Preview 2. I'm still running the app from a browser, but it seems possible that enabling the PWA option changed the behavior of the app even when running it as a regular website.
Since your app is a PWA, you can declare a js file for registration in the navigator.serviceWorker object. This my.js file can contain a const CACHE_VERSION = 1.0. Updating this value should force the client to download the latest files. See Jeremy Likness' blog post for more info.
if you are working on dot net core3.X PWA app, you can add comment in service-worker.published.js so that when browser will compare its cached service worker with updated one, browser will track the changes and load new one.
If anyone looks solution for Azure Pipelines and Azure Static Web App deployment, here is what worked for me:
Added following line on top of service-worker.published.js file.
const CACHE_VERSION = '{#CACHE_VERSION#}'
Added Bash step to *.yaml file, just change your app location accordingly.
- master
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
submodules: true
- bash: 'sed -i ''s/{#CACHE_VERSION#}/$(Build.BuildId)/'' MathApp/wwwroot/service-worker.published.js'
- task: AzureStaticWebApp#0
inputs:
app_location: 'MathApp'
output_location: 'wwwroot'
azure_static_web_apps_api_token: $(deployment_token)
This is an extension to the above solution if you are working with Github actions.
Add following step in .github\workflows\whatever-file-name-you-have.yml
- name: UpdateVersion
uses: datamonsters/replace-action#v2
id: sub
with:enter code here
files: 'Your.App/wwwroot/service-worker.published.js'
replacements: '%%CACHE_VERSION%%=${{ github.run_id }}'
I have used {{ github.run_id }} to get a unique-ish value, but you could opt for any other random string either from https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context or bring your own version.
And the main solution lies in editing service-worker.published.js
const CACHE_VERSION = '%%CACHE_VERSION%%'
const cacheName = `${cacheNamePrefix}${CACHE_VERSION}`;
This answer is intended to complement Ryan Hill's answer:
Blazor automatically updates to the newer version (at least in .NET 5, possibly earlier too). This happens when the application is first closed and restarted in ALL browser tabs including the installed app (which is another browser tab).
The following article helped me a lot:
https://learn.microsoft.com/en-us/aspnet/core/blazor/progressive-web-app?view=aspnetcore-5.0&tabs=visual-studio#installation-and-app-manifest-1
Also helpful:
https://www.eugenechiang.com/2021/05/22/forcing-reload-of-blazor-client-after-publishing-changes/
I finally found an answer for this that helped me. If you do not need PWA, you can remove it and Chrome (and probably other browsers) should stop clinging on to an old client even after deleting cache and fully reloading. Because after having done this my Chrome still reloaded it. For my app I do not need to use this caching feature or to be able to install it as an app.
I found the answer here:
Blazor Chrome caching issues
How to remove PWA:
Delete the following files from wwwroot:
/wwwroot/manifest.json
/wwwroot/service-worker.js
/wwwroot/service-worker.published.js
Delete this line from /wwwroot/index.html
<script>navigator.serviceWorker.register('service-worker.js');</script>
Delete those lines from your csproj file
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
Also... to actually get rid of the app in Chrome, because I had already loaded it this way, I installed it as an app and then uninstalled the app and removed it from Chrome. That finally got me out of this whole loop with Chrome keeping the app and refusing to fully update it in the browser cache / memory / wherever it kept the app
I used to reference a file called OptionRendererController.js, but I deleted the reference and the file. When I grep my app's directory for OptionRenderer, no results appear, and I've made sure to include urlArgs: "buset=" + (new Date()).getTime() to prevent browser caching, and I restart the python server on which I'm running my app, but I still get a 404 error on the deleted OptionRendererController.js file. How can I make sure my app no longer references that file?
It worked after I restarted Chrome.
I am working on meteor framework and trying to upload images in one of my app using the code from the link
https://gist.github.com/3922137
Everything works good , except that it uploads the empty file in my public folder of app .
I checked console and it shows 503 error there after I select a file to upload
Here is the console screenshot
http://img40.imageshack.us/img40/2956/consolewl.jpg
It keeps on looping and the number of errors keeps on adding in console
I am using meteor on windows .
Does anyone has managed to get file uploads work in meteor on windows platform ? and if yes can you please share the code which worked for you .
Thanks
Aman
The reason you are getting a 503 is that when anything in the public folder changes meteor reloads. Because your uploads are going there the server is resetting. Change your code not to save it to public but rather somewhere else and you should see the error go away.