[Route("{type}/{library}/{version}/{file?}/{renew?}")]
public ActionResult Index(EFileType type,
string library,
string version,
string file = null,
ECacheType renew = ECacheType.cache)
{
// code...
}
https://stackoverflow.com/questions/24678045/routing-optional-parameters-in-asp-net-mvc-5
iis Webdeploy Bereitstellen mit zip
Beachte: select model nur String
selbst wenn das ngModel eines selectes eine Nummer hat, wenn als option value ziffern in “ angebeben sind. ist der typeof des models ein string
takeUntil – IntervalObservable, Subject angular 11 not avaivable
https://stackoverflow.com/questions/42490265/rxjs-takeuntil-angular-components-ngondestroy
You could leverage a ReplaySubject for that:
EDIT: Different since RxJS 6.x: Note the use of the pipe() method.
class myComponent {
private destroyed$: ReplaySubject<boolean> = new ReplaySubject(1);
constructor(
private serviceA: ServiceA,
private serviceB: ServiceB,
private serviceC: ServiceC) {}
ngOnInit() {
this.serviceA
.pipe(takeUntil(this.destroyed$))
.subscribe(...);
this.serviceB
.pipe(takeUntil(this.destroyed$))
.subscribe(...);
this.serviceC
.pipe(takeUntil(this.destroyed$))
.subscribe(...);
}
ngOnDestroy() {
this.destroyed$.next(true);
this.destroyed$.complete();
}
}
let timer = IntervalObservable.create(60000);
this.subscription = timer.subscribe(
=======>
import {interval} from 'rxjs';
import {takeWhile} from 'rxjs/operators';
....
interval(60000).pipe(takeWhile(()=>this.alive).subscribe(
https://stackoverflow.com/questions/51688768/migration-from-rxjs-5-to-6-intervalobservable
angular mit jquery ui zu verbinden
Ein gangbarer Weg ist offensichtilch:
npm install jquery-ui-dist mit "node_modules/jquery-ui-dist/jquery-ui.css", und "node_modules/jquery-ui-dist/jquery-ui.js",
Speichernutzung IIS
https://www.bursky.net/index.php/2013/03/managing-iis-server-memory-usage/
mysql command whith dot net framework
this.dbconnect.Database.ExecuteSqlCommand("UPDATE documents SET isStandard=false WHERE documents.customerId='"+this.customerId+"' AND documents.DocumentType_Id != 26 /*FISFILE*/");
works in MyCloud - > DocumentsController 95
https://www.programmersought.com/article/20833428075/
log4net and configSource
https://stackoverflow.com/questions/445976/log4net-config-in-external-file-does-not-work
Do you have the following attribute in your AssemblyInfo.cs file:
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)]
and code like this at the start of each class that requires logging functionality:
private static readonly ILog log =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
I have a blog post containing this and other info here.
Einheitliches environment in einem Projekt
auf ein environment zugreifen und dann in der angular.json
"production": {
"fileReplacements": [
{
"replace": "/src/environments/environment.ts",
"with": "/src/environments/environment.prod.ts"
}
],
genaue try catch exception
durch mehrere catch- blocks können (zuerst) speziellere Exceptions behandelt werden , eine geauere auswahl kann durch when erzielt werden.
WebClient wc = null;
try
{
wc = new WebClient(); //downloading a web page
var resultData = wc.DownloadString("http://google.com");
}
catch (WebException ex) when (ex.Status == WebExceptionStatus.ProtocolError)
{
//code specifically for a WebException ProtocolError
}
catch (WebException ex) when ((ex.Response as HttpWebResponse)?.StatusCode == HttpStatusCode.NotFound)
{
//code specifically for a WebException NotFound
}
catch (WebException ex) when ((ex.Response as HttpWebResponse)?.StatusCode == HttpStatusCode.InternalServerError)
{
//code specifically for a WebException InternalServerError
}
finally
{
//call this if exception occurs or not
wc?.Dispose();
}