Questions tagged [.net]

The .NET framework is a software framework designed mainly for the Microsoft Windows operating system. It includes an implementation of the Base Class Library, Common Language Runtime (commonly referred to as CLR), Common Type System (commonly referred to as CTS) and Dynamic Language Runtime. It ...

0
votes
0answers
4 views

Why does my code complain about marshalled interface in VS2017 but not in VS2013 when intiation COMSecurity

In my current project we have a COMInterface that we intialize in the beginning of the Code. It worked fine in VS2010 and VS2013 and we haven't made any changes. I can compile and run the code from ...
0
votes
0answers
5 views

Strange behavour with SqlParameter

Using .Net 4.5.2 I have the following example code... var cmd = new SqlCommand(); cmd.Parameters.Add(new SqlParameter("@CONTENTHYPERLINK", SqlDbType.VarChar, 50)); cmd.Parameters["@contentHyperlink"]....
1
vote
0answers
32 views

System.IO.FileNotFoundException when calling Command but reference exist

In my ResultGenerator class I am calling a command to perform a bulk insertion, the issue arises when I try to hit the command, it catches this error: Message = "Could not load file or assembly '...
0
votes
0answers
10 views

Is it possible to use a new SDK-style .csproj file for a UWP project?

Has anyone successfully created a .csproj file for a UWP project that uses the new SDK-style .csproj format? I drew inspiration from this question about WPF, and that got me 90% of the way there. ...
0
votes
0answers
7 views

C# - NHibernate: evicting an entity and then getting it

I'm trying to understand how NHibernate works. To do so I've created a small test, given below. But the test is failing on the marked line and I don't understand why. What am I misunderstanding? To ...
0
votes
1answer
11 views

manipulating data for Highcharts graph using javascript

I'm trying to plot a scatter plot using the Highcharts library. I get some results from my database and format them in front end level using javascript (transformGraph2Data function in the following ...
0
votes
0answers
15 views

“The type initializer for 'System.TimeZoneInfo' threw an exception” message when launching visual studio

While trying to launch visual studio I keep getting this message: The type initializer for 'System.TimeZoneInfo' threw an exception I tried uninstalling VS, but unfortunately it didn't help. I ...
1
vote
1answer
11 views

What is the difference between UseHttpsRedirection and UseHsts

I don't quite get the difference between UseHsts and UseHttpsRedirection in the configure section of the startup file in .net core. Could anyone explain?
0
votes
0answers
9 views

.net core RouteData pattern matching

I'm trying to match a route using the routedata object that's returned from the HttpContext.GetRouteData() method in asp.net core. Assuming an endpoint of 'http://localhost/dogs/breed' exists, what ...
0
votes
0answers
4 views

Type X exists in elements c:\Windows\…\Temporary ASP.NET Files\root\path1\xxx.dll and c:\Windows\…\Temporary ASP.NET Files\root\path2\yyy.dll

During solve of one task I needed to change a one namespace. I commited that and everybody were happy. But a while moment later I had to rollback a new namespace and back to old namespace. This was ...
-2
votes
0answers
23 views

Luhn Validator give always valid result

I am playing with the Luhn credit card validator. This is what I made until now. The problem is that the code below works with valid and invalid card numbers. The MagicNumber (which is my variable ...
0
votes
0answers
9 views

WCF service callback handler that calls another service callback issues

I'm new to WCF, I created a solution, that has a WPF client application, linked to A WCF service, let's call it TradingService(self-hosted) with duplex binding(WsDualHttpBinding) and TradingService is ...
0
votes
0answers
25 views

How to run the java script functions using .net library class?

I have the JavaScript string for calculating some formulas, but I need to execute the scripts from C#. Like JS formula string: function(params) { var itemAmount = 0, itemsList = JSON....
-1
votes
0answers
25 views

Postasync json with array in C# [duplicate]

I am trying to post the following json data which works fine in soapui/postman { "Subject": "Testing Emailer API", "ToRecipients": [ "[email protected]" ], "CcRecipients": [], ...
0
votes
1answer
20 views

Why is my client server udp code not sending?

I have been interested in tcp, udp and named pipes lately and am trying to teach myself. I am trying to get a udp connection set up to see how it works. I have a client and server program in windows ...
2
votes
0answers
27 views

Adding Content-Description to email in .NET

I'm trying to set a MIME Content-Description field in an email. I set the Content-Type and the Content-Tranfer-Encoding using an AlternateView, but I can find no way to add Content-Description. What ...
0
votes
0answers
19 views

.NET WebBrowser DocumentCompleted event not called after InvokeMember(“click”)

I am trying to navigate to a website to parse its content using the System.Windows.Forms WebBrowser class. Unfortunately the request is first redirected to a privacy policy site where the user is ...
-1
votes
0answers
15 views

A good .NET Chart library to use in the backend [on hold]

Can anyone suggest a good, preferencibly free .net library for chart creation in the backend, so I can save it as a png? Thanks
0
votes
0answers
17 views

Emgu CV Image sharpening and controur detection

I am working on a project where I need to identify dots from IR lasers on a surface. I use for that a camera with IR filter Some input images: There can be several dots, too. So I tried to sharpen ...
0
votes
2answers
55 views

Asp.Net MVC 5 route not getting hit

I have this in my RouteConfig: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", ...
0
votes
0answers
5 views

Unit test serilog configuration

I have a piece of code for setting up serilog based on some custom configuration combined with hosting environment. E.g. the application writes to one sink in development and another sink in ...
-2
votes
3answers
39 views

Should these members be in a model? and if so, how?

I'm new to WPF and Prism, so, I'm trying to figure very basic things out at the moment. My little experiment looks like this when running: I have a Views\Registration.xaml that looks like this: <...
0
votes
0answers
23 views

Not able to copy specific pages of word document

I am trying to cut specific pages of my word document(.docx), say 2, 4. I am using for loop to traverse as per the page gave splitting it based on ,.Below is the code for the same if (startEnd....
1
vote
0answers
38 views

How to obtain task bar Notification Area width in a C# program?

I am developing a feature within a C# Winforms application which has a requirement for determining the width of the Windows "Notification Area" of the Task Bar (specifically when docked in the default ...
-2
votes
3answers
57 views

Changing object element within json

I have JSON like this { "amounts": [ { "tid": 7072, "amount": 10000, "currency": "USD" }, { "tid": 7072, "...
0
votes
0answers
40 views

How to insert images in pdf using C#?

I am new to C# and I am now developing a simple website(under .net framework) for users to fill in data and the data will be filled in a pdf document automatically. Recently, the program can autofill ...
-1
votes
0answers
10 views

how to write custom membership provider for adfs

I need to implement ADFS membership along with sql membership in existing episerver site. As I investigated, custom membership provider for adfs along with existing sql membership provider will be ...
0
votes
0answers
21 views

Application insight .NET | Custom metrics don't show up in portal.azure.com under metrics

I have application insight running with a "pay as you go" model. Standard performance metrics show up in the portal. Custom metrics don't show up in the metrics section. My Environment. A custom .NET ...
0
votes
0answers
6 views

What's the difference between XElement.WriteTo(XmlWriter) and XElement.Save(XmlWriter)?

What's the difference between XElement.WriteTo(XmlWriter) and XElement.Save(XmlWriter)? Or are they the same? https://docs.microsoft.com/en-us/dotnet/api/system.xml.linq.xelement.save#...
-3
votes
1answer
40 views

C# Form store data into a list of objects

I am new to c# forms and I want to store some data from a textbox and a numericupdown with an 'Add' button into an object and then add that object to a list of objects so I can display that input ...
0
votes
1answer
22 views

Await an Anonymous Type

In an ASP.NET Core WebApi Controller, I try to return a json { payload: myArray } [HttpGet] public async Task<IActionResult> GetEntriesPaged(int? page, int pageSize = 10) { ... return ...
2
votes
1answer
27 views

How to create Hub Proxy using AspNetCore SignalR

Anyone know the AspNetCore SignalR equivalent of this code from AspNet SignalR? Task.Factory.StartNew(() => { //// var clients = Hub.Clients<RealTimeNotificationHub>(); var ...
0
votes
0answers
30 views

C# Upload csv contacts to google contacts

I'm using C# and google people API to create contacts in google contacts, but it's really slow. With 1200 contacts it takes about 25 minutes. If I instead upload a CSV in google contacts, it takes ...
0
votes
0answers
17 views

Web api 2 (.net core) Service has deployed in azure server portal getting endpoints response are expired within 1 minute

Web api Service has deployed in azure portal server getting endpoints are expired within 1 minute.How can i increase the default timeout 60 sec to 15 min in Azure sever portal.But in local working ...
0
votes
0answers
20 views

Fetch real time data using WCF

Want the WCF service to communicate to client about a change in data(Configuration in db). I do not have control over DB directly, it is only through this service. Don't want the client to ...
0
votes
2answers
33 views

No method to map entity to table in entity framework core

I am using entity framework core in a normal .net project, version 4.7. I know I can do this. The problem is that I can't seem to map an entity to a table because the "ToTable" method doesn't exist. I ...
0
votes
0answers
9 views

How to add active learning to Azure Chat Bot with C# .net

I have made a chat bot with LUIS and QnA, but now I want to add active learning to the QnA, but the problem is I'm only able to found documentation for node.js, whereas my project is in c# and .net ...
0
votes
0answers
8 views

Nuget Command in TeamCity

I want to learn how I can run nuget update-package command as a TeamCity build step to update one package for all the projects in my solution. I have tried using nuget installer as a step, but it ...
1
vote
0answers
31 views

How to fire click event of image button in datagridview in asp?

I am trying to use image button in datagridview with asp. I have a dataset with some attachment file. When datagridview is loading, check attachment files and add a imagebutton to download that files. ...
0
votes
0answers
17 views

How Can I copy sheetview on C# .net?

I'm using c# .net and I want to copy sheetview data to object[] to download excel. FarPint.Win.Spread.SheetView spdList_sheet1; FarPoint.Win.Spread.FpSpread spdList; Control[] obj = new ...
0
votes
0answers
11 views

Realm database report “No RealmObjects. Has linker stripped them?” on Windows10

When using realm database on VisualStudio2015(C#), Realm report exception like below: No RealmObjects. Has linker stripped them? See https://realm.io/docs/xamarin/latest/#linker-stripped-schema ...
0
votes
2answers
18 views

Could you give me some general advice on .NET and TLS 1.2

I've searched other responses and the solution that worked for me was to insert System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; before calling the services that failed. ...
0
votes
1answer
12 views

How to remove value from Dynamics Entity using SDK library in C#

I'm trying to find out how to remove an option set attribute using a console application, the closest I've come is to assign -1 to the option set value, since when I do this in the Dynamics Interface ...
1
vote
0answers
11 views

System.IdentityModel v4.0 could not found

Am having an error when hosting a website on a server windows 2016 having iis 10. When i host the website am getting system.IdentityModel v4.0 could not found.. The target framework is v4.6 and have ...
0
votes
1answer
31 views

.NET IQueryable MSSQL and ASP.NET WebAPI

The case is following. There is DataGrid in WPF app which consume IQueryable as ItemsSource (apply Filtering, Sorting, Grouping, Aggregations, etc...) we have MSSQL Server DB where the data is stored ...
0
votes
1answer
37 views

Azure failing Could not load file or assembly 'System.Net.Http, Version=4.2.0.0

I have been getting this error for a while now. Oddly I only get this error when I publish the app to to Azure, locally it's fine. I've tired changing the redirect to: <dependentAssembly> ...
0
votes
0answers
26 views

Is it possible to use “System.Data.DataTable” with 1000 columns as DataSource of “system.windows.forms.dataGridView”?

I have no problems to fill the "System.Data.DataTable" with 1000 columns(no errors appears for now), but when I try to bind it to DataGridView this error message appears: .NET runtime exception: Sum ...
0
votes
0answers
21 views

exceeded simultaneous SESSIONS_PER_USER limit

I am receiving the error "System.Data.OleDb.OleDbException (0x80004005): ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit". My company only allows 64 sessions per user and will not increase ...
0
votes
0answers
12 views

WebService Client returns null Result object, however message body has content

I'm using the built-in web service reference client to communicate with a 3rd party web service. The work flow consists of making 3 calls in succession. The first call is working fine, however the ...
0
votes
0answers
8 views

.Net ListView seems to ignore column settings

I normally use ListBox but for my new UI I need columns. I moved to a ListView, set up five columns in the inspector, and then used this code to populate the list: Dim TempI as ListViewItem For Each ...