Posts

Showing posts with the label web-config

Can I set some Web.config values from variable defined on another .config file?

Image
Clash Royale CLAN TAG #URR8PPP Can I set some Web.config values from variable defined on another .config file? Let saying I'm settings a connection string for my Web.Release.config : Web.Release.config <connectionStrings xdt:Transform="Replace"> <add name="ProjectEntities" connectionString="Data Source=url;Initial Catalog=catalog;User Id=userid;Password=password;" /> </connectionStrings> Is there a way to use (for this case) url , catalog , user and password as variables defined on another .config file? url catalog user password Such as creating Web.CustomPasswords.config and store the variables (names as before): Web.CustomPasswords.config <appSettings> <add key="url" value="http://mydb.server.net" /> <add key="catalog" value="MyDbName" /> <add key="userid" value="markzzz" /> <add key="password" value="12345" /> ...

Hide non default URL port

Image
Clash Royale CLAN TAG #URR8PPP Hide non default URL port How to hide non default URL port number for IIS and ASP : example: https://myweb.com:4797 - To be > https://myweb.com Writing port number with URL difficult for users and not secure also to show it in the web search bar ? 1 Answer 1 You can give binding to your site on https://myweb.com:4797 NOTE : You can choose binding type https, on my computer was disabled so it is not seen in picture. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

NLog works fine on windows .Net Core application but not on Linux

Image
Clash Royale CLAN TAG #URR8PPP NLog works fine on windows .Net Core application but not on Linux I've got this nlog.config file in my .Net Core console application: nlog.config <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" internalLogLevel="Error" internalLogFile="c:tempIBTestinternal-nlog.txt"> <targets> <target xsi:type="File" name="allfile" fileName="c:tempIBTestnlog-all-${shortdate}.log" layout="${longdate}|${event-properties:item=EventId.Id}|${logger}|${uppercase:${level}}|${message} ${exception}" /> <target xsi:type="File" name="ownFile-web" fileName="c:tempIBTestnlog-own-${shortdate}.log" layout="${longdate}|${event-p...