Go Premium for a chance to win a PS4. Enter to Win


Microsoft Development





Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.

Share tech news, updates, or what's on your mind.

Sign up to Post

With a lot of help, I have written a small c# app that will paste the contents of the clipboard to a specified folder.  Sadly, however, when I put the .exe file onto my RDP - it doesn't work (I'm guessing because it's looking at the RDP clipboard).  Any pointers (or nuget suggestions), would be greatly appreciated - here's the code that I've been working with:

using System;
using System.IO;
using System.Windows.Forms;

namespace TSPaste2
    class Program
        //Getting destination foler
        String[] args = Environment.GetCommandLineArgs();

        static void Main(string[] args)
            //Setting Destination foler
            string DestFolder = args[0];

            if (Clipboard.ContainsFileDropList())
                //copy to folder as set in the Command line
                foreach (string source in Clipboard.GetFileDropList())
                    string Dest = DestFolder + "\\" + Path.GetFileName(source);
                    File.Copy(source, Dest);

Open in new window

New feature and membership benefit!
LVL 11
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.


I have a program on Windows 10 that just does not want to uninstall. Any ideas? (I rather not post the name of the program in case anyone is wondering).
Can you please tell me why I am getting this error?
System.Data.Entity.Core.EntityCommandExecutionException was unhandled by user code
  Message=An error occurred while executing the command definition. See the inner exception for details.
       at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__2()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass3.<GetResults>b__1()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
       at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()

Open in new window

I am trying to understand this article:


and how they fulfill the WebAPI mentioned under the heading:

"Create Web API"

I see they stat with an empty C# Controller, but can not find what exactly they mean by WebAPI.

I am not understanding what is meant by the term.

Please explain.

I am a Senior .NET Full Stack Developer but want to have a sharper eye on the new technologies that are coming and the current technologies which are passing into the dustbin of history. What on-line industry publications are good for this?

I am refreshing my memory about the various things which can cause a long response time on .NET MVC web pages and the tools to fix them.

A badly written stored procedure is the most obvious and this kind of bug can be uncovered first by looking at the Network tab of the browser and when the response time's too high, you may need to debug into the code to the point where the stored procedure is executed. You can also use SSMS to execute and fix it until the overall execution time becomes acceptable.

What other things can cause slow response and what methods uncover the problem?


I am looking for a VB script that would allow to type full name or users name in a search box that would run against certain LDAP groups (43 groups) to confirm if the user exists. If the user exists the output should be display on the screen and save in CSV file.

These 43 groups exists in AD (LDAP).

Thank you, M
I need to refresh my use of writing unit tests with Visual Studio and hope to download some simple program with a handful of working unit tests I can inspect.

I know that strings are immutable and that C# offers the StringBuilder class which allows you to manipulate the string without constantly re-creating that string.

What other features of C# are there for large strings? Just the class name is fine.

I am trying to get ready for a coding test and would like to have a list of C# looping constructs on the top of my mind.

I can think of:

- For loop (indexing and arrays)
- Foreach (items in a list)
- While
- Do while

and some reserved words which relate are:


what did I miss?

And how about LINQ?

Are there explicit loops possible?

Free Tool: Path Explorer
LVL 11
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

I have not done unit testing for a little while and expect a test upcoming to verify I can quickly write unit tests.

Suggestions of the thing I should be practicing?

Unit tests generate their own mock data, but I doubt a test would include me setting up a mocking framework. I think hard coded lists of objects would be the ideal method, on a coding test.

I assume the object wold be written already for me (it's going to be a 15 minutes test only)

I would create an instance of the object, review the parameter list for that method being tested...

I could create multiple sets of test data. Would a switch statement be appropriate for this kind of knock em out unit test? I could iterate through and handle a handful of test conditions...

Assertions are key.

Once it fails, the unit test fails. I need to be sure the specific test condition which failed the assertion is visible in the console.

Am I approaching this test the right way?


I use Visual Studio Code on Windows to code Angular, with a Node server running and Chrome as the browser.

Is there a way to set breakpoints?

I assume Chrome breakpoints work the same as with Javascript, with no issue.

I also know that Visual Studio debugs Javascript (with breakpoints) for the old Internet Explorer.

What are my options for setting breakpoints easily with Angular? I do not find Chrome easy since I need to find the file, find the line number, etc. I much prefer using Visual Studio since it's more like a WYSIWYG type of setting breakpoints.


Is there a modern browser which works with Visual Studio the way VS once suppoted Internet Explorer?

I have the following script but when trying to send from another account/shared mailbox the script will not run but works fine from the default email account

Any pointers where I've gone wrong?

Public Sub SendDrafts()
Dim lDraftItem As Long
Dim myOutlook As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder
'Send all items in the "Drafts" folder that have a "To" address filled in.
'Setup Outlook
Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders
'Set Draft Folder. This will need modification based on where it's being run.
Set myDraftsFolder = myFolders("Credit Control").Folders("Drafts")
'Loop through all Draft Items
For lDraftItem = myDraftsFolder.Items.Count To 1 Step -1
'Check for "To" address and only send if "To" is filled in.
If Len(Trim(myDraftsFolder.Items.Item(lDraftItem).To)) > 0 Then
'Send Item
End If
Next lDraftItem
Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing
End Sub

Open in new window


This macro was working perfectly fine until upgrade to O365 now gets an error when executing.  An Oracle client is already installed and working for other applications.

Run-time Error '-2147467259 (80004005)':

image of error message
ElseIf LoginEnvCred.ComboBox1.Value = "UAT2" Then
'On Error GoTo AdoError
'---- Replace below highlighted names with the corresponding values
strCon = "Driver={Microsoft ODBC for Oracle}; " & _
"(HOST = XXX.XXX.XXX.XXX)(PORT=1521))" & _
"(CONNECT_DATA=(SERVICE_NAME=mbet02r_oltp)));uid = " & User_env & "; pwd = " & Pass_env & ";"
'---  Open   the above connection string.

con.Open (strCon)

Open in new window

How to do Windows 10 Microsoft Visual Studio 2010 Multihreading (but not .net and not MFC) in C++03.
I don't have 3rd party tools like openMP, etc. Just have native Microsoft API (I hope).

I searched around and found an answer to the following 3 questions (included in my post below):
When I search online, I found this:
Multithreading with C and Win32

But I am in a 64-bit environment.

a. Is there a Microsoft 64-bit (non .NET) multithreading capability? If not, then I will proceed with 32-bit API. But the applications being developed are 64-bit.

b. Is it OK to use Win32 in the 64-bit application?

c. If it is OK, are there any performance penalties or any other downsides in doing this?

If you explain things to me, and use POSIX terminology and their Microsoft equivalent, that would help. I have done Linux multithreading. I am brand new to Microsoft development (other than using VIsual Studio 2010 for relatively simple single-threaded programs).

Unfortunately, I cannot use C++11 or Boost because they will not be installed for awhile (anywhere between 6-90 months is my best guestimate).

I am unable to install anything to enhance my development. (I know - this sucks.)

1. I would appreciate if you could provide good learning examples and help me with some questions on the basics if they arise.

Here are some links that I have just  quickly …
I need to sharpen up my T-SQL and hope for an online practice site where I can query against a database local to the practice site, and choose to view and edit a library of existing queries.

Does this exist?

Please explain, from a C#.NET perspective, how those three go together?

I'm new to TFS. I have been using it for version control.  I wanted to take advantage of the bug/feature tracking, but it seems I can only create anew bug or feature for the entire "Repository Area"?

For example, I have repository $/Test   and under $/Test i have $/Test/MainProject   and $/Test/projectXYZ and $/Test/ProjectABC

All projects are part of the same main application, that is, projectXYZ is a class module for MainProject.

If I go to create a new bug task in TFS, it only allows me to select "$/Test" area.  I can't seem to find a way to tie the bug to a specific sub-folder in the repository, that is, a specific area of code?

Am I doing something completely wrong here?

(ps) I am not using Git for my repository, but TFS itself.
Hi Team,

Requirement :   I want to roll up the measure values(Qty/Amt) from Week-->to Month-->to Quarter-->to Year.

Issue : measure values are not rolling up.

Methodology Used :

Used roll up function in sql server and pushing the aggregated values in to temp table(#) . Then pushing the values from temp table  in to respective physical tables based on the column values (Fiscal_Year/Fiscal_Month/Fiscal_Quarter/Fiscal_Week).

Reason to use this method :  
Underlying table( mba_related_sales_by_day ) has billions of records . Henceforth can't afford to do repeated aggregations from Year table  to Quarter table  to Month table  to week table  as this consume lot of time . In order to reduce the timelines of the ETL processing ,used this method.

Please correct my code and help me  with the solution. Will appreciate your help in this regard.

Here is the code used in stored procedure.

IF OBJECT_ID('tempdb..#tmp_mba_related_sales_agg') IS NOT NULL
	DROP table #tmp_mba_related_sales_agg;

Create table #tmp_mba_related_sales_agg
datasource_id int null,
calendar_day smalldatetime,
fiscal_year int null,
fiscal_quarter nvarchar(100) null,
fiscal_month nvarchar(100) null,
fiscal_week nvarchar(100) null,
business_unit_id nvarchar(100) not null,
sales_item_hierarchy_level int not null,
sales_item_id int not null,
related_sales_item_hierarchy_level int not null,

Open in new window

Free Tool: Subnet Calculator
LVL 11
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Morning techs,

I work for a large Computer Aided Dispatch software support company.  We supply the HW and SW that runs in Police and Fire Departments all over the world.  

At my Tier, the Tier one we basically gather logs and screenshots from the dispatchers computers to escalate tickets to the Engineers.  There is an error report functionality but the DISPATCHER (whom you know is extremely busy) must MANUALLY run it themselves at time of event.  

Are there any *light* tools out there that can be installed onto the dispatchers computers that would log error reports automatically?

Computers are running Win 7 with just the dispatching SW

Thank you,
I just started checking out MimiKatz and all that it can do. My question is simple (and complex to answer), what are some methods that can prevent/secure any cleartext passwords stored in memory and prevent an attacker from being able to retrieve those?

it seems that MS only release SQL server data tools for VS 2015 so that we can admin and develop even SSIS project within VS 2015, how about VS 2017?

it seems we don't have this option to develop SSIS package inside VS2017, am I right?
I am a C#.NET developer but have not yet touched Core. I am in the midst of a job changes and have some time, which I could put int learning the basics of .NET Core.

Is that a good idea?

I do not se many member in the few .NET Code topic areas, unless I am missing the bigger TA's.

I am currently looking for a way to detect if the "Pause Printing" option in the "See What's Printing" window is checked in Windows.

I've searched high and low, and looked into the Win32 native printing API (winspool) to see if there was such a detection available, but to no avail.

Is there anyone who has experience with a successful implementation of this detection?

I'm looking for a solution in either C/C++, or C#.
need custom osd rename L-CITY-serial
L for laptop So for desktop +select city -7 serial computer

I already design that in powershell but it works in local client machine it doesn't work via sccm tasksqence. maybe need to know some tasksqence variables to do this . mdt , udi sccm

Microsoft Development





Most development for the Microsoft platform is done utilizing the technologies supported by the.NET framework. Other development is done using Visual Basic for Applications (VBA) for programs like Access, Excel, Word and Outlook, with PowerShell for scripting, or with SQL for large databases.