.net

c# System.Data.SqlClient.SqlException: Snix_Connect in macOS

∥☆過路亽.° 提交于 2021-02-08 08:18:12
问题 I am writing an asp.net 5 app with ef 7 to work with sql server. It's all okay when the app is running under windows. When I tried running it under macOS and when i need to interact with the database the following exception appeared: Unhandled Exception: System.Data.SqlClient.SqlException (0x80131904): Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) Snix_Connect (provider: SNI_PN7, error: 25 - SNI_ERROR_25) ---> System.Net.Sockets.SocketException (0x80004005): The socket is not

Changing Printer Trays During Print Job

空扰寡人 提交于 2021-02-08 08:12:22
问题 Is there a way to switch printer trays during a print job? I've been asked to put together a pick/pack slip program. They want the inventory pick slip to be printed on a sheet of colored paper, the pack slips to be on white paper, and they want it properly collated (pick, pack, pack, pack, pack; pick, pack, pack, pack, pack; ...). I found some other threads on setting default trays, but didn't find anything on alternating trays during the job. Maybe I'm not searching on the right thing. Don't

Create a material .NET Connector SAP

橙三吉。 提交于 2021-02-08 08:08:59
问题 Please tell me somebody out there has done this. I am trying to interface with SAP via .NET Connector 3.0. I can read data fine with the remote function calls, but I cannot figure out how to write anything, creating or editing a material for example. Through some research I have determined that BAPI_MATERIAL_SAVEDATA is the rfc I need to be using, but cannot for the life of me figure out how. Here's what I'm trying: function = destination.Repository.CreateFunction("BAPI_MATERIAL_SAVEDATA");

Azure Blob Storage successful requests show as failed requests in Application Insights

本小妞迷上赌 提交于 2021-02-08 07:59:24
问题 The following container exists and hence returns failed request code 409 var container = blobClient.GetContainerReference("my-container"); container.CreateIfNotExists(); I do a check to make sure the Blob reference doesn't exist before creating. This returns a 404 response code with a bool. if(container.GetBlockBlobReference("this-file-could-exist").Exists()) { In the first example I expect the container to exist, in the second expect the file not to exist. But in both cases I do a check to

Build .Net Web application based on environment

拥有回忆 提交于 2021-02-08 07:54:47
问题 There are 3 environments through which my .Net web application goes namely Development, Release and Production with each having their own config and project setting files. Assuming that the setting and config files for different environments are in one system, I want to create a small script or an application where the developer just mentions the environment type and the related setting and config files get loaded and then the application builds. Can anyone guide me on this? 回答1: You can

Looping through all items in ListBox?

拜拜、爱过 提交于 2021-02-08 07:54:31
问题 I have a list box which is populated by this code: lstOutcome.Items.Add(lstMap.SelectedItem.Text); In the listbox lstOutcome, I need to be able to loop through the listbox and be able to take the value of the first,second, etc, list items. The reason I need to loop through each line and grab the value of that line is so I can use whatever value was in that line for populating something else. For example, in my list box I have: 1 2 3 I need to be able to loop through the listbox on button

Looping through all items in ListBox?

ぃ、小莉子 提交于 2021-02-08 07:53:49
问题 I have a list box which is populated by this code: lstOutcome.Items.Add(lstMap.SelectedItem.Text); In the listbox lstOutcome, I need to be able to loop through the listbox and be able to take the value of the first,second, etc, list items. The reason I need to loop through each line and grab the value of that line is so I can use whatever value was in that line for populating something else. For example, in my list box I have: 1 2 3 I need to be able to loop through the listbox on button

Identify active slide in C#

泄露秘密 提交于 2021-02-08 07:48:23
问题 I would like to know which is the current slide viewed by the user in PowerPoint (in edition not presentation). I used an SlideChange event with var new Index = Application.ActiveWindow.View.Slide.SlideIndex . The problem is when the cursor on the thumbnail panel on the left is not on a slide but between two. In that case, I have an error View (unknown member) : Invalid request. No slide is currently in view. which is normal because there is no view pointed. Unfortunately SlideChange event is

Where is the implementation of “_Memmove” in the core library souce code

ぐ巨炮叔叔 提交于 2021-02-08 07:29:34
问题 I'm looking at System.buffer.cs on the Microsoft reference source, and I see this code starting at line 508: #if WIN64 private unsafe static void _Memmove(byte* dest, byte* src, ulong len) #else private unsafe static void _Memmove(byte* dest, byte* src, uint len) #endif { __Memmove(dest, src, len); } [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)] [SuppressUnmanagedCodeSecurity] [SecurityCritical] [ResourceExposure(ResourceScope.None)] [ReliabilityContract(Consistency

best way to reference an object before it is assigned?

和自甴很熟 提交于 2021-02-08 07:28:30
问题 for me coding is a lot about clarity and overview. Therefore i would love to call objects that aren't already assigned in the constructor of a class. Sounds like an stupid idea so here an example (might be stupid anyway): // this doesn't work but looks clear SomeClass a = new SomeClass(b, c); SomeClass b = new SomeClass(a, c); SomeClass c = new SomeClass(a, b); // this functions but has bad overview: SomeClass a = new SomeClass(null, null); SomeClass b = new SomeClass(a, null); SomeClass c =