Microsoft DevelopmentSponsored by ConnectWise

48K

Solutions

32K

Contributors

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

Hi, there is 'using System;' in the beginning of the file.

However  Console. WriteLine doesn't compile and requires System.Console.WriteLine.
Why? How can it be fixed?

Thanks.
0
Introducing Cloud Class® training courses
LVL 12
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

SSRS Report Builder - Export to CSV issue; Double Quotes exist for each record.

We have a report that is scheduled to produce a CSV file.
This file is consumed by another application and requires specific formatting in order to successfully process the file.
The following entry has been configured within the 'rsreportserver.config' file:

<Extension Name="CSV (No Header)" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
                        <OverrideNames>
                              <Name Language="en-AU"> CSV No Header</Name>
                        </OverrideNames>
                        <Configuration>
                              <DeviceInfo>
                                    <NoHeader>true</NoHeader>
                                    <Extension>CSV</Extension>
                                    <Encoding>UTF-8</Encoding>
                                    <Qualifier></Qualifier>
                              </DeviceInfo>
                        </Configuration>
                  </Extension>

The file that is being generated from this contains double quotes at the start and end of each record (see below).
"""FORMAT BATCH IMPORT, STANDARD 1.0"""
"DREF1,DDATE1,DSOURCE,DCLRENTITY,DENTITYPE,LLDGCODE,LACCNBR,LAMOUNT1,LNARR1,LNARR2,LNARR3,LPRESCSTAT,LGSTTYPE,LGSTRATECODE,BIMPNAME,BCLRENTITY"
"180603,06/06/2018,AB,123,A,AB,123456789,-1234.56,Team Journal,21/05/2018 to 03/06/2018,12345,N,I,NA,TEAMJNL,123"

The output we need is shown below:
"""FORMAT BATCH IMPORT, STANDARD 1.0"""
DREF1,DDATE1,DSOURCE,DCLRENTITY,DENTITYPE,LLDGCODE,LACCNBR,LAMOUNT1,LNARR1,LNARR2,LNARR3,LPRESCSTAT,LGSTTYPE,LGSTRATECODE,BIMPNAME,BCLRENTITY
0
Hello. I need to create Offline Media to install OS and apps on some same notebooks. I need to enable Bitlocker. I have read it possible enable BitLocker in Task sequence in MDT tool. But my question is: where is kept the recovery key of Bitlocker if notebook isn’t connected to domain and all process of deployment is done from usb?
 Do you have any suggestions or best practices in this matter.
Thx in advance
0
Dear Experts,

I have an asp.net website that uses identity 2.1 (I'm pretty sure > 2.0 anyways as near as I can tell). It is written in visual basic. I ran into a weird issue the other day where people were logging in and getting this viewstate error:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

So I followed the advice I found in the microsoft article and added a machine key to the web.config file so that no matter what it (hopefully) shouldn't get that error again.

Once the machine key was changed to one that I set now we had issues with anyone with an already existant authorization cookie on their computer, they were unable to login. I believe it's because the machine key that I set no longer matched the one that was used in their cookie. I'm not entirely clear how, but apparently it's part of how it's encrypted. If they clear their cookies, all is well - then they could login.

So one bit of advice I found searching on the web sounded super simple and super-easy. They recommended that you have some sort of set key in your web.config, like a guid or something and then you add it to your cookie also. Then, when you load the cookie, you can check the key and if it doesn't match your server key, somehow you invalidate the cookie.

I basically spent all day trying to figure out …
0
Hi everybody,

I have a question about in-class initialization and thread-safety. I searched a lot in the net about this but wasn't able to figure it out.

I (accidentally) found a IMO nice way to implement somehting like an instance counter using in-class initialization like this:
// sample 1 using a static class member
struct Test1
{
	static int current;
	int num{ current++ };
};

int Test1::current{ 0 };

// sample 2 using singleton desing pattern
struct Test2
{
	static int& current()
	{
		static int curr{ 0 };
		return curr;
	}

	int num{ current()++ };
};

Open in new window

Both methods work fine:
void foo()
{
	for ( int n = 0; n < 5; n++ )
	{
		std::cout << "T1: " << Test1{}.num << " T2: " << Test2{}.num << std::endl;
	}
}

// output is as expected:
// T1: 0 T2: 0
// T1: 1 T2: 1
// T1: 2 T2: 2
// T1: 3 T2: 3
// T1: 4 T2: 4

Open in new window

Now I'm curious if this is thread safe. I know the instantiation of current itself is thread-safe, but I'm not sure what's about the ++ operator call: especially in the second example I would guess the ++ called for the returned reference is not thread safe, but on the other side I think compilers do a lot of complicated things to make statics thread safe, so probably my suspection is wrong.

JFI: I'm not sure since which C++ standard this can be used, I use C++17 (VS 2017), but maybe it works with older versions too.

Does anyone of you know better?

Best regards,

ZOPPO
0
background: had vs2010, 2013, and 2017 community.   Just uninstalled 2010 and 2013 because of issues.  

I have a project with a component that we wrote, in vs2010 & .net 4.0.  I've created a new solution, imported the old projects within the solution.   It now have .net 4.7.1 since 4.0 is not available in the list anymore (and not downloadable apparently).   This component was using the Extensibility Tool (which i've installed on vs2017).

But i still have some errors, all related to this component:

CS0616	ProvideToolboxControlAttribute' is not an attribute class
CS0641	Attribute 'AttributeUsage' is only valid on classes derived from System.Attribute

Open in new window


Note: within this file, beside System and System.Globalization, all the other "Using" are greyed out, like if they where not used.  

Anyone can help?  These classes are deprecated? (AttributeUsage?)  How can i solve this issue?

Thanks
ProvideToolboxControlAttribute.cs
0
I setup main site on the IIS as an application and add virtual directories to it. My question is how do I address the MVC applications that would be published to the virtual directory. I try to use standard MVC addressing but it doesn't work.
Example
My site is http://server/main.
My virtual directory is vd1.
If I place index.html in vd1 the address of http://server/main/vd1/index.html works.
If I publish MVC application to vd1 the address http://server/main/vd1/home doesn't work
0
Whenever I perform a search within a document in Visual Studio it always highlights this characters below, besides the word I searched for, which makes it very hard to find what I was searching for:
 <%
%>

How can I disable highlighting those characters ?
0
Hi
I need your help . I think there is possible to use something in Visual Studio Net (2017, C#) to calculate FFT, FIR and IIR filters.  I remember I read it somewhere but
I don't remember what was it.
Do you know what can I use for very fast process?
Looking forward for your suggestions.
0
Hello Experts,

I have a problem with deploy a desktop application in a  client machine without installing crystal reports or visual studio.

I searched on the internet and i find a lot of suggestion , but i can't find the correct way ( i can't find the files of runtime for crystal reports)

Thank you.

Regards,
0
Cloud Class® Course: Ruby Fundamentals
LVL 12
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Testing for dataset changes on form closing in WinForms 2015.

   
    If DS.HasChanges Then
            ChangesMade = True
             'Call Option to save code
        End If
        For Each dr As DataRow In DS.Tables("tCARDS").Rows
            If dr.RowState <> DataRowState.Unchanged Then
                ChangesMade = True

            End If
            If dr.HasVersion(DataRowVersion.Proposed) Then
                ChangesMade = True
            End If
        Next

Open in new window

The trouble is that when the user moves between datarows using a datagridview or bindingnavigator the Dataset is marked as changed.  It also shows the rowstate as being modified when it isn't.  The user isn't changing anything just navigating amongst records.  I'd like to figure out how to check for any true changes rather then getting the false positive?

Any ideas?


Thanks
0
I've been trying to fix this for days now. Using Xamarin and Visual Studio, I deleted the asset catalogs/media folder then I used app icon set creator to create the icons. I then went into info.plist under visual assets and hit add catalog, then dragged the icons into the slots.

No matter how many times I try this I get the same error.

Since this is xamarin, I was told I have to create an IPA file and upload using ApplicationUploader.  The file uploads but then I get an email from Apple with a build file error shown above.

Does anyone know how to fix this?

thanks!!!!

Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle

Open in new window

0
We currently use Visual Studio 2008 v9.0.  When one user opens a proc on Monday (but does not check it out as they have no intention at that time to make changes) if another user checks out the proc on Tuesday , makes changes and checks it in.  There is nothing to stop the first user from making changes to the proc as he/she  has it in front of him (fro  Monday) and overwrite the changes that user 2 made on Tues.
Is there a way to prevent this - e.g. automatically refresh, or not allow changes checked in if not using the latest file or the problem seems to be that if you have a proc open, you can directly make changes and it will then get flagged as checked out, perhaps if this could be disabled so that the only way to check out a proc would be to reopen from scratch
0
When I manually move an email to a #folder I want a popup asking me if I want to create a rule called #folder to always move mails from its #sender to the #folder.
0
I created a custom ContextMenuStrip at runtime on an overrided RichTextBox control (to enable Cancel, Cut, Copy and Paste basic functions on my overrided RichTextBox) - since the RichTextBox doesn't implement this out-of-the-box.
At runtime, I do get my ContextMenuStrip popping up when I right click on my overrided RichTextBox and the menus work well, BUT when I move the mouse over the ContextMenuStrip, I don't see the selection tracker over the menus. Why so? And how can I fix this?

       
        private void CreateContextMenuStrip()
        {
            _cms = new ContextMenuStrip();
            _cms.Items.Add(new ToolStripLabel("Annuler", null, false, cms_Clicked, "mnuCancel"));
            _cms.Items.Add(new ToolStripSeparator());
            _cms.Items.Add(new ToolStripLabel("Couper", null, false, cms_Clicked, "mnuCut"));
            _cms.Items.Add(new ToolStripLabel("Copier", null, false, cms_Clicked, "mnuCopy"));
            _cms.Items.Add(new ToolStripLabel("Coller", null, false, cms_Clicked, "mnuPaste"));
            _cms.Items.Add(new ToolStripSeparator());
            _cms.Items.Add(new ToolStripLabel("Tout sélectionner", null, false, cms_Clicked, "mnuSelectAll"));
            _cms.Items["mnuSelectAll"].Width = 150;
            _cms.Opening += new CancelEventHandler(cms_Opening);
            this.ContextMenuStrip = _cms;
        }

        private void cms_Opening(object sender, CancelEventArgs e)
        {
            // check to see if we can 

Open in new window

0
Hi,

I'm in the process of developing an eBay application in Microsoft Access 2016. So far my project has been fine and the API calls I have made have been successful but I have now come to a stumbling block that I need some help with.

The API calls I have used so far are all for single listings so this is easy and I just pass the XML through an HTTP request. I want to make this much more efficient and use eBay's File Transfer API where I can send more than 1 call at a time but I'm really struggling on trying to understand how to build the call.

The data has to be sent as Binary Base64 which I have a converter to do this. I can build the XML that needs to be sent but I just don't understand how to send the XML from a string as apposed to a physical file.

I've read loads on the internet about having to create it as a multipart request with boundaries but really not sure how to start building that. I can provide code if need be so you can see where I am at.

I hope this makes sense.
0
I have developed a form in Fastfield forms. I am trying to use Zapier to send the Fastfield form as a text message after the form is filled out.  The text message is being sent, but the form with the information is not in the form. the question that I have is: Does Zapier interface with Fastfield?
Help is greatly appreciated.
0
Hello,

I'm working on a project. Need to work in 2 shifts.
9am to 5pm, and 9pm to 5am.

How do I make and manage calendars?

San
0
My company run Exchange server 2016 and Outlook 2016
Some users have have many (hunderds) of folder in their inbox keeped updated manually. I want to automatically create rules to keep their structure updated.

Let me expain with an exemple:

(inbox) exemple@mycompany.com
- Folder Clients
> Sub folder A
>> mail from exemple1@a.com
>> mail from exemple2@a.com
>> mail from exemple1@a.com
> Sub folder B
>> mail from exemple1@b.com
> Sub foldder C
- Folder suppliers


Selecting a folder I want to automatically create rules for all subfolders. In this exemple selecting the root I want to create those rules:
1) move mail from exemple1@a.com or exemple2@a.com to folder clients/A
2) move mail from exemple1@b.com to folder clients/B
1
Cloud Class® Course: Microsoft Windows 7 Basic
LVL 12
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

I have the following code which successfully opens a hyperlink in internet explorer from an email in Outlook.

My next question is how do I interact with the webpage?

For example I would like to select option 83 from ID "ctl00_cph_MAIN_ddlHCLaction" which is a dropdown.

I have tried
oIE.document.GetElementbyID("ctl00_cph_MAIN_ddlHCLaction").value = 83

Open in new window

but I get the error

'Run-time error '-2147467259 (80004005)': method 'document' of object 'IWebBrowser2' failed.'

Sub macro()

Dim regex
    Set objOL = CreateObject("Outlook.Application")
    Set NewMail = objOL.ActiveExplorer.Selection.Item(1)
    NewMail.Display
    res = NewMail.Body
    
    Set regex = CreateObject("VBScript.RegExp")

    With regex
        .Global = False
        .MultiLine = False
        .IgnoreCase = True
        .Pattern = "HYPERLINK ""([^""]+?)""Click here to access enquiry"
    End With
    Set mtches = regex.Execute(res)
        If mtches.Count > 0 Then
            strHL = mtches(0).submatches(0)
            Set oIE = New InternetExplorerMedium
            oIE.navigate strHL, CLng(2048)
            oIE.Visible = True
        End If
End Sub

Open in new window

0
Hi All,
I am trying to get service configuration information for SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO. my code as below

void DoQuerySvc()
{
    SC_HANDLE schSCManager;
    SC_HANDLE schService;
      DT_String  szSvcName = Server.GetProductName(); // get the service name
    LPQUERY_SERVICE_CONFIG lpsc;
      LPSERVICE_REQUIRED_PRIVILEGES_INFO lpsd;
    DWORD dwBytesNeeded = 0, dwError = 0;
      DWORD cbBufSize = 0;

    // Get a handle to the SCM database.

    schSCManager = OpenSCManager(
        NULL,                    // local computer
        NULL,                    // ServicesActive database
        SC_MANAGER_ALL_ACCESS);  // full access rights

    if (NULL == schSCManager)
    {
        printf("OpenSCManager failed (%d)\n", GetLastError());
        return;
    }

    // Get a handle to the service.

    schService = OpenService(
        schSCManager,          // SCM database
        szSvcName,             // name of service
        SERVICE_QUERY_CONFIG); // need query config access

    if (schService == NULL)
    {
        printf("OpenService failed (%d)\n", GetLastError());
        CloseServiceHandle(schSCManager);
        return;
    }

    // Get the configuration information.

   
       if( !QueryServiceConfig2W(
        schService,
        SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO,
        NULL,
        0,
        &dwBytesNeeded))
    {
        dwError = GetLastError();
        if( …
0
I have many (hunderds) of folder in my inbox. I divide clients in 1 folder for any region and then 1 folder for any client. I keep this structure updated manually over ther years.

I want to automatically create rules to keep this structure updated. Something like: for any unique sender address in a folder create a rule to move the the actual folder.

> Exchange server 2016
> Outlook 2016


How can I do so?
0
I have one scenario in Sync Framework 2.1

Suppose we have one customer table which has two column PId,Name and order table which has two column Pid ,customerid. Customerid is foreign key of customer table. we have another table orderitem which has two column PId,OrderId. Orderid is foreign key of order table.

I have inserted two records in customer table PId name 1 Ram 2 shyam

in order table

PId customerId 3 1 4 2

In orderitem table

PId Order 5 3 6 4

in sync framework I want to upload only Ram data which has id=1 and its foreign key related tables data.
0
Need exercises on the Big O Notation

I have engineering optimization on various software projects in the past, but need to pass a test which will evaluate my skills solving the Big O Notation.

I will need to code in C# with arrays, data sets and the like as a way to show I can optimize code.

Any exercises I could play around with?

Thanks.
0
We are using vmware Horizon 7 linked clones, running windows 10 build 16299.

The user default printer in a view session always defaults to the local default printer of the connecting laptop.  If a view user changes the default printer, it is not retained in the next logon.

I can't tell if the view agent is doing this, or windows?  How can i override it, so the user's choice of default printer can be retained?

I have tried various fixes in GPO and registry, including...
HKLM\Software\ThinPrint\TPAutoConnect\DisableSettingOfDefPrinter=1
HKLM\SOFTWARE\ThinPrint\TPAutoConnect\UserDrivenDefaultPrinter=1

I do not want to disable local client printers completely.

Thanks
0

Microsoft DevelopmentSponsored by ConnectWise

48K

Solutions

32K

Contributors

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.