Questions tagged [.net-4.5]

Version 4.5 of the Microsoft .NET Framework. Use for questions specifically related to .NET Framework 4.5. For questions on .NET Framework generally, use the .net tag.

.net-4.5
Filter by
Sorted by
Tagged with
0 votes
1 answer
796 views

visual studio 2013 update 4 installation error

I am really in trouble please help me...vs 2013 not installing..![enter image description here][1] i got fatal error while installing .net 4.5.1 i have vsultimate 2013 in iso format... i have these ...
Shishant's user avatar
1 vote
1 answer
1k views

What are .NET4 to .NET4.5 runtime changes

Eager to reduce risk in my project I would like to know what are the runtime changes between .NET4 to .NET4.5 (not 4.5.1 or 4.5.2)? I could find runtime changes for 4.5.1 and 4.5.2 but not for 4.5. ...
DeJaVo's user avatar
  • 3,121
0 votes
1 answer
75 views

ASP.NET web app not deploying correctly on Windows server 2012

So here's the thing. I recently updated a web project to use nuget for its dependencies, which in turn updated all of those dependencies to the latest versions. Quite a task as there were some ...
jenson-button-event's user avatar
2 votes
3 answers
5k views

Is it possible to check multiple regex matches at once? at one iteration?

Ok my question is about checking performance Lets say i have the following regexes regex1 = "=powered\ by\ 4images" regex2 = "post\ comment" regex3 = "kommentar\ posten" regex4 = "\[...
Furkan Gözükara's user avatar
0 votes
1 answer
125 views

Is it possible to use NHibernate 4 without db cfg file?

So in NHibernate all seems to be configurable without any special configuration (Attributes and code for schema configuration and mapping). Is it possible to configure DB connection (creation in case ...
DuckQueen's user avatar
  • 862
0 votes
2 answers
135 views

Convert user-defined pseudo regex string into working regex

String to match www.ads://fkdsmkdsf.mysite.comkmdfgkkdf Pseudo regex pattern : *://*mysite.com* Desired regex pattern .*?\://.*?mysite\\.com.*? My code: string srinput = "www.ads://fkdsmkdsf....
Furkan Gözükara's user avatar
1 vote
0 answers
255 views

Async NUnit Test with await not listed in VS2013 Test Explorer

I ran into following problem. A NUnit async test using await to await a call returning GetCustomDataAsync is not listed in the Test Explorer. In the same, an async test await a call returning int ...
1ppCH's user avatar
  • 276
1 vote
1 answer
578 views

NLog file target writes only one record

Whenever my application runs on the Test, Preprod or Prod server (Windows 2012 R2) on the infrastructure of our hosting provider, all file targets write exactly one log entry, and then stop working ...
Jonas Sourlier's user avatar
0 votes
1 answer
1k views

Mono and missing references

I'm new to .NET and using Mono (great combination I know), and I am having trouble with some missing references from a code developed in Visual Studio. I would like to know if it is possible to have ...
Rui's user avatar
  • 1
3 votes
4 answers
1k views

How to specify in C# generics such T that is constructible from string? (generic type constraint)

I want to specify required default constructrion options for my T: public interface IParameter<T> /* where T : T(string) */ { T Value { get; set; } } so I would be able to construct ...
DuckQueen's user avatar
  • 862
3 votes
2 answers
994 views

Session state on couchbase

I want to use couchbase for session. I configured my web config. Also app framework is net 4.5. Here is my web.config <?xml version="1.0" encoding="utf-8"?> <!-- For more information on ...
Just Ersoy's user avatar
0 votes
1 answer
1k views

Serializing an object that contains a System.Drawing.Image to json

I have run into a bit of a problem and cannot seem to wrap my head around the solution... I have an interface (and implemented class) that contains an image... Guid uid { get; set; } Image ...
asuppa's user avatar
  • 571
1 vote
2 answers
2k views

Regex to only match a string that does not end with ")"

I have a plist file that has nested properties. I need to get the text immediately after the open "(", this is the "Name". I can do this fine, However, because there are nested properties, when my C# ...
user2219930's user avatar
7 votes
3 answers
4k views

Is there a easy way to get the "sp_executesql" query .NET generates for a parametrized query?

Background: If I had the following program public class Program { public static void Main() { using(var connection = new SqlConnection("Server=(local);Database=Testing;...
Scott Chamberlain's user avatar
4 votes
1 answer
2k views

How to create a TimeZone object for a specific timezone? c#

I found the exact thing I went to know, and it is so simple (or should be): TimeZone.GetDaylightChanges() returns exactly what I need: When the daylight time starts and ends: To that end, I would ...
Traderhut Games's user avatar
1 vote
1 answer
50 views

Having T type how to find all classes that expand Base<T> in assembly?

Say I have: public class Base<T> {} public class MyBaseOne : Base<int> {} public class MyBaseTwo : Base<int> {} Having T type (say int) how to find all classes that expand Base in ...
DuckQueen's user avatar
  • 862
7 votes
3 answers
4k views

How to unit test RelayCommand that Executes an async method?

As there is no RelayCommandAsync (at least not that I know of), how to test this scenario. For example: public RelayCommand LoadJobCommand { get { return this.loadJobCommand ?? ( ...
O.O's user avatar
  • 11.2k
1 vote
1 answer
42 views

Sent checked html table view back to client when invalid

When my Model.State is NOT valid I want to return the view WITH the checked checkboxes. How would you change my code? Is it possible at all with my approach? VIEW @model ListTest.Models....
Elisabeth's user avatar
  • 20.9k
3 votes
1 answer
903 views

.NET 4.5 Gridview with DropDownList in EditItemTemplate UpdateMethod

I have Gridview with list of ManufacturerTypes that is related with Manufacturers... So each ManufacturerType has a Manufacturer (2 tables -> 2 entities). When I want to update item ManufacturerType I ...
janilemy's user avatar
  • 565
0 votes
1 answer
146 views

Model Validation on collection with checkbox fails when checkbox not rendered

When my Index view display 2 people and none of them are selected the model validation works correctly due to the MinLengthAttribute in .NET 4.5. Now comes my custom logic in the ui. When only one ...
Elisabeth's user avatar
  • 20.9k
1 vote
1 answer
1k views

Async method within constructor affecting unit tests

Have a unit test that tests that navigation is only allowed if Jobs.Count > 0. GetJobsAsync() is called during construction and clears the Jobs list if not null (gets fresh list each time it is ...
O.O's user avatar
  • 11.2k
1 vote
3 answers
106 views

.*? does not match character before word boundary

I have a hard time understanding why ((?i)\bb.*?\b) returns b and not b- for the string a b- c. I also tried ((?i)\bb\w*\b), but that does not work any better. Some more info: I need to match words ...
user1151923's user avatar
  • 1,862
1 vote
0 answers
2k views

Implement Equalizer to C# Music Player

I have made a music player in C# WinForms, all going good. Now I want to add an equalizer interface(the vertical sliders that change bass, treble, etc), just like Winamp's EQ, but I can't find anthing ...
ChrisCreateBoss's user avatar
0 votes
1 answer
3k views

Writing a file using NPOI

I'm unable to use NPOI to save changes to an xlsx to disk, when attempting to do it from a DLL. I have a set of data that I'm currently storing in a database, and a home-grown ORM for it. The home-...
f00f's user avatar
  • 143
2 votes
1 answer
5k views

Constant value cannot be converted to int

I can't see why line#5 fails to compile whereas line#4 is ok. static void Main(string[] args) { byte b = 0; int i = (int)(0xffffff00 | b); // ok int j = (int)(0xffffff00 | (byte)0); ...
tpol's user avatar
  • 950
7 votes
0 answers
5k views

Application exiting with an exit code of -1073740771

I have a WPF application, which sometimes is exiting with an exit code of -1073740771. The issue is not occurring in any pattern and it's varying from system to system. In some system the issue is ...
Pratik Bhattacharya's user avatar
0 votes
2 answers
2k views

LINQ anonymous object is inaccessible due to its protection level

I have LINQ logic that collects regex parsed data into a dynamically-created dictionary. The issue I am facing is accessing the data in the dictionary (Info). Regex .Matches(text, pattern, ...
user2219930's user avatar
0 votes
1 answer
149 views

git delete all files form remote branch after updating .gitignore

I recently started working on an open source project called "TFDT : Team Foundation Dev Tools" but I made a mistake to add a std .gitignore and now I want to fix it by adding one from https://raw....
ablaze's user avatar
  • 722
0 votes
1 answer
606 views

How to define KeyedCollection of a generic type without specifying the Key type

I have a generic class with specified type of key and I want to create KeyedCollection(Of of that class. I think that code is more clear the my words. The question is whether one can rewrite the code ...
IvanH's user avatar
  • 5,089
0 votes
1 answer
1k views

Hashtable insert failed. Load factor too high : .Net 4.5

I'm getting an exception “System.InvalidOperationException: Hashtable insert failed. Load factor too high.” My application is developed in VS2010 with 4.0 framework and it is working fine in our ...
Jay's user avatar
  • 1,315
-1 votes
2 answers
856 views

How to know which iteration is the last line at foreach File.ReadLines

How to know which iteration is the last line at foreach File.ReadLines Here example loop foreach (var vrLine in File.ReadLines(vrItem)) { } I want to use ReadLines because some files have millions ...
Furkan Gözükara's user avatar
1 vote
0 answers
126 views

Amazon S3 returns "SignatureDoesNotMatch" on download using mono

I am downloading files from S3 using this code protected void FileDownload(FileInfo localFile) { using (AmazonS3Client s3Client = new AmazonS3Client(this.accessKey, this.secretKey, ...
AndersI's user avatar
  • 11
1 vote
3 answers
2k views

How to check if a textbox has a line from a TXT File with C#

It's simple what I'm trying to do; when I click a button, my app should check if textBox1.Text has a line from a text file. Note: I don't want to check if textbox has all the text file in it, just ...
ChrisCreateBoss's user avatar
0 votes
3 answers
883 views

Why the async await not working as expected

I am learning TPL (async/await) from a tutorial and I tried to test it out myself using a console application. Please don't be offended by my ignorance. I am sure I am doing wrong somewhere- I wrote ...
James's user avatar
  • 1,233
0 votes
1 answer
44 views

OAuth Login - UserID from ProviderUserId

I want to do something simple, so must be missing something. I've added some information to UserProfile and want to display that by the username in the "Welcome [username]" section. So I also wanted ...
Steven Edison's user avatar
2 votes
2 answers
2k views

How to place cursor in the first position of a Datepicker control in C#?

I have a datepicker control on a wpf form (masked as 00-00-0000). If the datepicker is empty, then I want the cursor always to be in the first position no matter where I click on the datepicker ...
rapidfire's user avatar
0 votes
1 answer
99 views

Will a long running .net process be termintated if the user session is terminated?

I have a ASP C# application that allows users to upload and process text files. after the upload, the parser is called and starts its work. depending on the size and quantity of the files the user ...
user2219930's user avatar
1 vote
0 answers
520 views

NewLine on CSV export of datatable

I have a datatable in a .Net web app that my customers have the option to export to CSV. A few customers have complained that the CSV is not able to re-import to our application. after further review, ...
user2219930's user avatar
3 votes
2 answers
6k views

Azure Active Directory and Windows Authentication

I'm using Visual Studio 2013, .NET 4.5. and trying to find out if it's possible to authenticate against Azure Active Directory with a web app using windows authentication instead of organizational ...
Suedeuno's user avatar
  • 399
0 votes
4 answers
267 views

LINQ Replace Different String Values

I constructed a variable by parsing a text file with some addresses. FileInfo fi = new FileInfo(@"C:\temp\Addresses.txt") var ZipCodesAndCountryCodes = File.ReadLines(fi.FullName) .Select(...
FMFF's user avatar
  • 1,692
7 votes
3 answers
3k views

WPF NotifyIcon Crash On First Run - The root Visual of a VisualTarget cannot have a parent

Update: Issue appears to be introduced with .NET 4.5.2. Problem does not occur with either 4.5.1 or 4.5. I have a strange issue I am having difficulty debugging. We have a WPF application built on ...
denver's user avatar
  • 2,965
0 votes
2 answers
2k views

Change Backgroundcolor of TabControl

I'm using the .NET 4.5 WPF Ribbon and want to change the background color of one particular RibbonTab, in all situations (independent of whether it is selected, hovered over, or not - don't ask why). ...
Voo's user avatar
  • 29.5k
2 votes
2 answers
2k views

ClickOnce deployment requires Framework 4.5 required when 4.5.2 is installed

I know that the similar questions has been asked, and I've read them, however I can't understand why it happens with Framework 4.5.2 I've make ClickOnce publish and it requires .net framework 4.5 when ...
Dmitry Koshevoy's user avatar
1 vote
2 answers
16k views

Wait for download to complete

I'm trying to create a simple program to download few files. I've tried some ready-made solutions I found on the web but I can't manage to make it work the way I want it to. I'm using this: ...
Miku's user avatar
  • 45
1 vote
2 answers
2k views

UriBuilder not combining two uris correctly

So Here is my problem: I want to combine a URI and a string. The URI is a path to a (parent) folder, while the string represents the path to a sub folder (don't ask me why I am doing this, both types ...
Ruhrpottpatriot's user avatar
1 vote
1 answer
487 views

Map object to new object of a different structure C#

I have a web service that returns all the data I need in JSON, just in a structure that isn't very useful. Here's an example: public class Alt { public Member Member { get; set; } public ...
Tim's user avatar
  • 301
0 votes
3 answers
92 views

How can I change my current selected item by either the key or value of my datasource?

I have a Dictionary<uint, string> and a ComboBox using the style DropDownList, where I bind this dictionary, like: comboBox1.DataSource = new BindingSource(myDic, null); comboBox1.DisplayMember ...
Guapo's user avatar
  • 3,482
19 votes
3 answers
4k views

Is LogicalOperationStack incompatible with async in .Net 4.5

Trace.CorrelationManager.LogicalOperationStack enables having nested logical operation identifiers where the most common case is logging (NDC). Should it still work with async-await? Here's a simple ...
i3arnon's user avatar
  • 115k
3 votes
2 answers
1k views

Is there no Async implementation of MSMQ send in .net 4.5

I wonder why there is no async implementation of MSMQ send? I am using .net 4.5. Am I missing something?
nen's user avatar
  • 715
0 votes
0 answers
150 views

With my DLL and DLL.config in the GAC, how can I override default settings?

In our situation, we have decided to write a global assembly that can be accessed by our in-house software. This util.dll houses our connection strings and various settings in a config.dll (and ...
Dezryth's user avatar
  • 233

1
27 28
29
30 31
79