The remote name could not be resolved when sending mail using SMTP with Host as IP address
``` MailMessage message = new MailMessage(); message.Subject = "test"; message.Body = "test"; message.To.Add("test@gmail.com"); message.From = new MailAddress("bob@internalhost.com"); SmtpClient smtp ...
- Modified
- 3 Sep at 06:30
Equivalent C# statement for this VB6 operation creating problems
I have this code line in VB: ``` Dim Sqrt As Double Sqrt = Radius ^ 2 - (CenterX - X) ^ 2 ``` The parameters in the statement above are being passed the values below: ``` X= -7.3725025845036161 D...
- Modified
- 28 Sep at 13:28
Custom credentials provider in ServiceStack using Firebase
I want to create a custom credentials provider for service stack that signs in users to Firebase using firebaseauthentication.net library. The problem I have is that after calling the authentication m...
- Modified
- 28 Sep at 13:40
Get CPU temperature in CMD/POWER Shell
In my computer I am trying to get the CPU temperature. Searching on StackOverflow I found this: ``` C:\WINDOWS\system32>wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemper...
- Modified
- 28 Sep at 07:19
Aspnet Core Decimal binding not working on non English Culture
I have an aspnet core app that runs with a non english configuration (spanish): ``` public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { ...
- Modified
- 28 Sep at 03:36
ASP.NET Core deployment to IIS error: Development environment should not be enabled in deployed applications
I followed [this article](https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS) to deploy my ASP.NET MVC Core 1.0 app to local IIS on my Windows 10 t...
- Modified
- 26 Jul at 11:44
Why do I have to encode a string when reading and writing form inputs using jquery?
I am programatically reading data from a text input using standard Jquery like this: ``` var listName = $('#list').val(); ``` and then I am adding a hidden input field into a form before submitting...
- Modified
- 6 Oct at 10:38
Is this a good way to clone an object in ES6?
Googling for "javascript clone object" brings some really weird results, some of them are hopelessly outdated and some are just too complex, isn't it as easy as just: ``` let clone = {...original}; `...
- Modified
- 31 Aug at 07:0
Check to see if year is leap year
Currently I am getting a RunTime error. My goal is to test whether or not the current year, using DateTime.Now.Year() is a leap year or not. I think the issue is that I am not properly converting year...
redirect after a fetch post call
I am creating an social login page with an Access Management (AM) server. When user click on the login button then I make a fetch http post call to AM server. AM server generates a HTTP 301 redirect r...
- Modified
- 5 Feb at 09:36
Install specific branch from github using Npm
I would like to install bootstrap-loader from github in my project using npm Currently they are maintaining two version of this project which are comaptible with webpack version 1 and 2. I would lik...
- Modified
- 23 Aug at 21:43
How to inject WCF service client in ASP.Net core?
I have WCF service that I need to access from ASP.NET Core. I have installed [WCF Connected Preview](https://visualstudiogallery.msdn.microsoft.com/c3b3666e-a928-4136-9346-22e30c949c08) and created pr...
- Modified
- 16 Dec at 15:42
Remotely connect to .net core self hosted web api
I have a simple .net core web api with one action: ``` [Route("[action]")] public class APIController : Controller { // GET api/values [HttpGet] public string Ping() { return ...
- Modified
- 21 Aug at 11:31
ServiceStack.Text JsonSerializer - SerializeToString fails whit DateTime.Max
I'm using ServiceStack.Text JsonSerializer on a web application using c#. The problem is that for an specific functionality I need to serialize date values into a json but currently is failing when th...
- Modified
- 27 Sep at 17:20
Get ServiceStack session in MVC.Net attribute
I'm using MVC.Net and servicestack with AuthFeature ``` Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { new Credent...
- Modified
- 27 Sep at 16:1
JwtSecurityToken doesn't expire when it should
I am currently using the JwtSecurityToken class in System.IdentityModels.Tokens namespace. I create a token using the following: ``` DateTime expires = DateTime.UtcNow.AddSeconds(10); JwtSecurityTok...
how to filter out a null value from spark dataframe
I created a dataframe in spark with the following schema: ``` root |-- user_id: long (nullable = false) |-- event_id: long (nullable = false) |-- invited: integer (nullable = false) |-- day_diff:...
- Modified
- 15 Sep at 10:7
'composer' is not recognized as an internal or external command in windows server
I am using windows server 2008 os. i download [composer setup.exe](https://getcomposer.org/download/) and install to my PC . when I try `composer install` . I getting an error: > 'composer' is not re...
- Modified
- 3 Dec at 20:16
SessionBag missing in servicestack version 4.5.0
I am new to servicestack and using servicestack version 4.5.0. With reference to the [ServiceStack 'session' missing?](https://stackoverflow.com/questions/31363927/servicestack-session-missing) ? wit...
- Modified
- 20 Jun at 09:12
Converting a string to JSON in C#
I'm trying to use [Simple JSON](http://wiki.unity3d.com/index.php/SimpleJSON) to convert this string to JSON : ``` "{\"objects\":[{\"id\":1,\"title\":\"Book\",\"position_x\":0,\"position_y\":0,\"posi...
- Modified
- 27 Sep at 11:9
how to get publish version?
I would like to show the publish version of my desktop application. I am trying to do it with this code: ``` _appVersion.Content = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version...
- Modified
- 27 Sep at 10:52
What is the difference between json.load() and json.loads() functions
In Python, what is the difference between `json.load()` and `json.loads()`? I guess that the function must be used with a file object (I need thus to use a context manager) while the function take ...
- Modified
- 28 Oct at 17:45
IDbAsyncQueryProvider in EntityFrameworkCore
I'm using XUNIT to test in a dot net core application. I need to test a service that is internally making an async query on a DbSet in my datacontext. [I've seen here](https://msdn.microsoft.com/en-...
- Modified
- 30 Sep at 12:31
Visual studio code - keyboard shortcuts - expand/collapse all
Trying to find the equivalent to + + in Intellij that collapses/expands all functions.
- Modified
- 2 Sep at 09:59
Why is System.Net.Http.HttpMethod a class, not an enum?
`HttpStatusCode` is implemented as an `enum`, with each possible value assigned to its corresponding HTTP status code (e.g. `(int)HttpStatusCode.Ok == 200`). However, `HttpMethod` is [implemented as a...
- Modified
- 19 Jan at 19:20