Is there a JSON schema for Serilog? - json

We exclusively use appsettings.json (and environment specific versions) to configure Serilog. I'd love to have intellisense when configuring Serilog in those files.
Does anybody know if they have a schema or if someone has created one and shared it?

Related

How do I host and edit a JSON file separate from my GitHub repository?

I'm building a Discord bot and am trying to host it with Heroku and GitHub. I intend to store user data in a JSON file but cannot figure out how to edit the JSON file because I cannot edit it while it is in the repository. I am hoping there is a way to do it through Heroku, without using a separate website.
Note: I know how you would normally edit the JSON file, but because it is in a GitHub Repository it doesn't work the normal way.
Don't use a file as a database. Use a database as a database.
This is generally good advice, but especially important on Heroku where the ephemeral filesystem prevents changes to files from persisting long-term.
Heroku Postgres is a relatively easy way to get started. Its base plan is free.
I believe GitLab allows you to edit files in place, and they have a free tier like Github. As mentioned by Chris, this is generally not recommended, but it may work for your needs.
https://about.gitlab.com/

Please tell me how to open 4d database?

I trying to open (using 4d v12) the database with the extension .4dc (in addition there are files with extensions .4dd and .4dr).
The result is an error: You cannot convert compiled database.
Perhaps this is an old version of the database, but I could not find anything that could convert it to a newer version.
My goal is to obtain information from the database. But the problem is that I'm not good at 4d. And I don't know how to open the .4DC as part of an application.
Please help me if you know how to do it.
The .4DC is the compiled structure file. It contains the code of all of your methods and defines the structures (tables, fields) in your database. The .4DD is the actual data file. It contains the values that are stored in the database. The .4DR is the resource file.
You can't edit or convert a .4DC because it is compiled. What you need is the .4DB. It does the same thing as the .4DC (contains methods and db structure), but you can upgrade it and open it interpreted so you can edit the methods and change the database structure.
You can open the .4DC as part of an application, but you won't be able to upgrade it or edit any methods. If you are opening it with the 4D IDE you'll need the same version as created the .4DC in the first place.
You might also try the 4D knowledgebase for more info: http://kb.4d.com or read the documentation: http://doc.4d.com/Home/home.en.html
Good luck!
the .4DC is the application, it's only used to run it. As said it's compile in machine language (0 and 1) so it won't help you out. It's good to use the application, that's it.
the .4DD is the actual database behind the application.
So if you want to access only datas, you should look to this .4DD
There are also ODBC drivers that exists for 4D.

Connection string not found when trying to query database under SubSonic

I get this error no matter what version of SubSonic I use. When I query the database for data, it errors out, saying it can not connect to the database.
However, it is able to generate the .cs classes(ActiveRecord, Context, etc) when told to do so.
Any help is appreciated.
Thanks folks...
My guess is that you have your SubSonic generated classes in a separate project from where your main application is (in another project in the same solution). Your main application project references the project containg the SubSonic generated classes.
If this is the case, your main application project must also contain the connection string in a config file, similarly to what your other project has. You might also need to copy over some of the other SubSonic related items from your other project's config file as well.

Where to find Entlib xsd file?

Does this file exists? I'm tired of the 'Could not find schema information for attribute' messages.
Thanks
One does exist for Entlib 5.0 - it gets installed as part of Entlib 5. Since the Entlib elements don't have XML namespaces, you'll need to explicitly turn it on in VS though (right click on the config file, select "Properties", click on the "Schemas" field, and you'll be able to turn on the schema validation.)
It won't work on everything - Entlib has a highly customizable configuration schema and not everything is representable in XSD, but it's about as good as you're going to get.
There is no EntLib XSD file. Producing one is tricky as config is dynamic. See discussion here.
http://entlib.codeplex.com/Thread/View.aspx?ThreadId=10712

Where do you store your misc project settings?

Some projects have properties have miscellaneous settings such as: "AllowPayments", "ShowSideBar", "SectionTitle". Really things that don't necessarily fit in to other objects.
How do you guys store these kinds of values? ApplicationSettings? Flat File? Database table?
How do you access them? Static object with properties? DB call?
Would either of these change if you were in a load balanced environment where you would have to synchronize the files across multiple servers?
Environment
ASP.NET 2.0
For me it depends on the context the setting is. If it relates to the data and the domain, i store in the database, if it relates the the application i store in the web.config.
App.Config, or a custom xml configuration file and config service. Key value pair mappings keeps things very simple.
Since you didn't tell which environment you use:
In .NET applications, I use the ApplicationSettings system from Visual Studio. This way you can configure the settings with default values in the designer, and a strongly-typed class to access the values is generated. I usually add a second ApplicationSettings element with the name Persistent in addition to the default Settings, with anything the user configures to go in the Settings object and anything I just save (i.e. window position) to the Persistent object.
This goes for desktop applications.