https://discord.umbraco.com
Join Discord
[Solved] Appsettings settings for Media Blob Storage
c

Craig100

9 months ago
V13.5.2 Trying to convert a site to use Azure Blob Storage with details given by the client's IT team, so having to trust them. Could someone let me know if I've put the right bits in the right holes please, or correct me if I (or their team) have got it wrong. They sent (anonymised of course ;)):- Blob Storage Name: umbracocmsabcd SAS Token: https://umbracocmsabcd.blob.core.windows.net/media?si=coname access&spr=https&sv=2022-11-02&sr=c&sig=abcdefghijklmnopqrstuvwxyz123456789123651236547891 Container Name: media In AppSettings I've done this:-
"Storage": {
      "AzureBlob": {
        "Media": {
          "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=umbracocmsabcd;AccountKey=abcdefghijklmnopqrstuvwxyz123456789123651236547891;EndpointSuffix=core.windows.net",
          "ContainerName": "media"
        }
      }
    }
With the two nuget packages installed and registered in program.cs as instructed in the V13 docs I get the following error when running the site (which crashes):-
System.FormatException: No valid combination of account information found.
   at Azure.Storage.StorageConnectionString.<>c.<Parse>b__67_0(String err)System.FormatException: No valid combination of account information found.
Thanks.
c
k
  • 2
  • 3
  • 125
error CS0246: The type or namespace name could not be found
w

webjaved

about 2 years ago
Hello, I am getting the following error message;
error CS0246: The type or namespace name 'FeaturedItemsRow' could not be found (are you missing a using directive or an assembly reference?)
Here is the featuredItemsRow.cshtml component file. https://prnt.sc/_gBCXnfJaxwi Here is the block selected as part of my page builder block. https://prnt.sc/p_MqFGvF2X_H I'm working on Umbraco Cloud at the moment but will look at getting the project cloned locally now that I have access to do so.
w
j
  • 2
  • 5
  • 125
Solved: app.UseStaticFiles( ... ) - where/when to call?
k

kdx-perbol

about 1 year ago
I need to call
app.UseStaticFiles( ... )
to customize the behavior, but I don't know where/when to put this in
Program.cs
. I'm guessing
.UseUmbraco()
already does this internally? I'm using the Umbraco 13 NuGet project template.
k
d
b
  • 3
  • 9
  • 124
Umbraco 15, deploy on Ubuntu 24, missing Microsoft.AspNetCore.Server.IIS
b

Blago Culjak

10 months ago
This is error when upgraded site from v14 to v 15 upgrading: > Nov 18 17:08:37 vmi1813232.contaboserver.net systemd[1]: Started greencode.service - Green Code service. > Nov 18 17:08:40 server.net greencode[18474]: Unhandled exception. System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Builder.IISServerOptions' from assembly 'Microsoft.AspNetCore.Server.IIS, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. > Nov 18 17:08:40 server.net greencode[18474]: at Umbraco.Extensions.UmbracoBuilderExtensions.AddWebServer(IUmbracoBuilder builder) > Nov 18 17:08:40 server.net greencode[18474]: at Umbraco.Extensions.UmbracoBuilderExtensions.AddBackOffice(IUmbracoBuilder builder, Action`1 configureMvc) > Nov 18 17:08:40 server.net greencode[18474]: at Program.$(String[] args) in /home/github-runner/actions-runner/_work/GreenCode/GreenCode/GreenCode/Program.cs:line 17 Program.cs, line 17:
builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()
    .AddComposers()
    .Build();
Is there some dependency that is forcing us to use IIS everywhere?
b
s
+2
  • 4
  • 10
  • 121
Excluding items from search
t

TigerMan

12 months ago
Hi everyone I have a simple class which retrieves items from Umbraco 13 using examine search and displays them. I was trying to exclude umbracoNaviHide pages by having the below var create = index.searcher.CreateQuery(Indextypes.Content).GroupedNot("umbracoNaviHide", "1") Using this it still returns pages which have been marked as hide. Is there a criteria I need this to meet or anyway to distinguish why this is occurring? Thank you
t
a
j
  • 3
  • 6
  • 121
Custom NPOCO database connection... is this a sane approach?
j

Jason

about 1 year ago
I guess this is only tangentially related to Umbraco but the NPOCO docs are a bit sparse and it's not the most popular library in the world. I'm hoping some other lovely Umbracians have experience with this. I've inherited a project I'm upgrading to v13 which uses NPOCO to connect to a different database to Umbraco. From what I can piece together across GitHub comments and Stack Overflow, it looks like the right way to use it is to instantiate and dispose the database object with every request - and rely on .NET's connection pooling to take care of perf... can anyone confirm if this approach is OK?
csharp
private IDatabase GetDatabase() => 
    new Database(ConnectionString, DatabaseType.SqlServer2012, SqlClientFactory.Instance);

public async Task<IEnumerable<vessel>> GetAll()
{
    using var database = GetDatabase();

    return await database.FetchAsync<vessel>("SELECT * FROM " + TableName + " ORDER BY Vessel");
}

//... other repository methods
j
l
  • 2
  • 1
  • 121
Umbraco 14 how to display custom section's content.
a

Abradolf Lincler

about 1 year ago
Hey so I've created custom section following the documentation, but i can't find anything about putting content in it. This is what i've done. I've also tried creating sectionView and it worked but it's not put in the content of the section I've created. https://cdn.discordapp.com/attachments/1252932290049216564/1252932290225639445/image.png?ex=667403a0&is=6672b220&hm=cbb6958896e391a683d7c16bb22549280c1d30652820739952d5540296487887& https://cdn.discordapp.com/attachments/1252932290049216564/1252932290443612181/image.png?ex=667403a0&is=6672b220&hm=bd2d5a53d2325f3d6b01ff07117ffb94b2370b9f5418300f4fd61a589340765b& https://cdn.discordapp.com/attachments/1252932290049216564/1252932290783219793/image.png?ex=667403a0&is=6672b220&hm=529d7a43c9c76abb754f5ae614af13cb83cfe5db4881cea01e59b98541a42af4&
a
b
  • 2
  • 3
  • 121
How to find the problem block?
m

Matt Wise

about 2 years ago
When saving and publishing (I have far too many content nodes to know which one, as its part of a migration) Is there a way I can debug to find the source of this: Error occurred executing workItem. Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Umbraco.Cms.Core.Models.Blocks.BlockValue'
m
d
  • 2
  • 7
  • 120
How to open media picker from custom property editor (v15.1)
r

rstei

8 months ago
As part of custom property editor, I would like to integrate Umbraco's media picker - to be able to select media items. Is there a context or similar I can use to access this picker?
r
u
  • 2
  • 2
  • 119
[SOLVED] How do I get subsections of a IConfiguration section?
t

TackleMcClean 🏅

over 1 year ago
I am using
IUmbracoBuilder
to do this:
var section = builder.Config.GetSection("PrepopulateUsers")
This returns an
IConfigurationSection
and I need to check its subsections as in the image (those 5 sub sections). How can I get info on those sections? The
IConfigurationSection
has no methods to get those sections from what I can see? https://cdn.discordapp.com/attachments/1220366835116019732/1220366835250368542/image.png?ex=660eae2e&is=65fc392e&hm=b63e8ec933d75b328d64bbea97e32aac900b8429e079b23fb9a0f08a56528aae&
t
r
h
  • 3
  • 4
  • 119
Previous192021Next

Umbraco

A hub and casual space for you to interact with fellow community members and learn more about Umbraco!

Powered by