Click here to Skip to main content
15,890,185 members
Everything / .NET / .NET4

.NET4

.NET4

Great Reads

by Igor Ladnik
Wrapper to facilitate usage of TCP sockets
by Roman Kiss
This article describes a design, implementation and usage of the Custom Routing Manager for managing messages via Routing Service built-in .Net 4 Technology.
by Nish Nishant
An ExifReader class in C# that supports custom formatting and extraction. StyleCop compliant code, with demos for WPF and Windows Forms.
by defwebserver
How using the Silverlight DataTrigger allows you to run a process and then raise another when using View Model (MVVM)

Latest Articles

by Elmue
An easy to use 3D control which can be integrated into an application in a few minutes
by NikStar
Using OutgoingMessageProperties and OperationContextScope to implement authorization by http header for WCF client that communicates with non WCF-based web services.
by Ralf Meier
In this article, I demonstrate how to integrate Shelly® relays into my smart home, controlling the devices through routines in VB.NET.
by Sufyan S Jabr
All that you need to know when working with MSDTC, troubleshooting and problem solving.

All Articles

Sort by Title

.NET4 

14 Feb 2014 by Member 10540250
I am using msApp.block in my website , index page is running, but when i click on link to show data in DETAIL.aspx page in Datalist_ ItemDataBound it showing error " An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll " please help ....
14 Feb 2014 by Abhinav S
Looks like there is something going wrong on the details page.Go through your code and check if you are running a loop that never ends.
12 Sep 2010 by Spenser723
I have a programs with thousands of variables. I need to perform complex operations on each of these variables that involves other variables. Some of the formulas that I will using will call methods that I have defined. So the string for z may be "x + y", but it might also be...
12 Sep 2010 by Abhinav S
Will operator overloading be of any help to you[^]?
13 Sep 2010 by Spenser723
Thanks for your response. Not sure that operator overloading would help in this case. That would be good if I wanted to perform standard operations on a new class object. In my case, what I want to do is the following:Let's assume that we have a program with the following...
13 Sep 2010 by aidin Tajadod
Hi,As I know there is no equivalent for eval (like vb6) in c#. but you can use system.CodeDom.Compiler namespace to create your own eval function. by using that you can compile your code on the fly and use it in your program.
13 Dec 2010 by niknishu
Hello,When I click on execution of asp.net application, when loading of page on browser, I get following exception error message:"Failed to create AppDomain"despite search results via google on this following steps dealing with renaming of security.config or doing caspol -reset didn't...
28 Jul 2011 by Member 8120835
Step 1 :Delete the 1.security.config 2.security.config.cchfrom the below linkC:\Documents and Settings\Admin\Application Data\Microsoft\CLR Security Config\v2.0.50727.42here the "Admin" user may changes depends upon your user nameStep 2 :Go to Microsoft Visual...
11 Aug 2013 by sanket_05
How can I enable "Hangout on Air" through a regular Google hangout JavaScript API??I am using regular Google hangout app and it is linked from my website. But now I want to add an additional feature of allowing users to record the conversation and post it in to Youtube channel using "On...
19 Apr 2013 by Necmettin Demir
"How to series" about MVC, jQuery, JSON, paging, mapRoute.
28 Sep 2010 by lmhf004
I want the program to popup the "Loading Waiter" dialog when UI loads some data.so I use the BackgroundWorker to do this work ,but in BackgroundWorker's ReportProgress,the Application bind data to UI and has spent 5 second before they completed.During this timethe UI and the...
28 Sep 2010 by Sandeep Mewara
It looks like you want to ask this question to an author related to his/her article. I would suggest you to please use the forum present at the end of the article in order to reach author and get quick response. Rarely you will find authors reading this forum. Please post the same at the...
4 Sep 2019 by honey the codewitch
I have a component that keeps a cache on a per-thread basis, but in some applications i need to share the cache across multiple threads. I don't mind hosting the component on a thread and then marshalling calls over to/onto that thread in order to share the cache between other threads - in fact...
2 Sep 2019 by Gerry Schmitz
System.Collections.Concurrent Namespace | Microsoft Docs[^]
4 Sep 2019 by George Swan
You can use lock to restrict the updating of a variable to one thread at a time. Other threads calling the method will be blocked until the lock is released. private readonly object totalLock = new object(); private double total; public void AdjustTotal(double amount) ...
4 Dec 2012 by SNI
Hi,I am trying to use RDLC with MVC3 using Visual Studio 2010 Professional. I am tried to select "Show Data sources" option but it is disabled. I tried to all options to enable it but it is still disabled. I am trying use Northwind.mdf using ADO entity framework. Can any one have idea how...
8 Aug 2011 by 94HellGate
i just found a piece(not enought to find it out) of code and i'm wondering how i can do this, because it's much better than a normal event in my caseconsole.BindCommand("!", delegate(GameTime gameTime, string[] args) { console.WriteLine(args[0]); ...
8 Aug 2011 by Christian Graus
It's all you need. The delegate is an anonymous method. So, you use this syntax to create inline events. The real advantage is, any variables in the method that creates this, are visible to the delegate. Google anonymous methods if you need more help.I should add, this runs no faster or...
8 Aug 2011 by BillWoodruff
Hi, Christian is absolutely right, and an event definition can be even simpler using Lambda form in .NET 4.0://'SomeControl' stands for any control that exposes a 'KeyDown' eventSomeControl.KeyDown += (sndr,eArgs)=>{MessageBox.Show(eArgs.KeyCode.ToString());};In this example, you define the...
1 Sep 2011 by BillWoodruff
post-script:...
28 May 2015 by Aniket Samanta
HI,I am trying to call a third party web service link and getting the error "The request failed with HTTP status 401: Unauthorized.". I have followed the below steps. Could you please help me on this.1. I have got the wsdl of the the webservice. Added web service reference of that third...
17 Jan 2016 by Harsha Wansooriya
Sample Game using XNA
19 Dec 2012 by Oleksandr Kulchytskyi
Hi guys.I have one question about disposing resurces.for event observation i use Rx(Reactive Extensions).Observable.FromEventPattern(_outlookManager, "MailReceived", Scheduler.ThreadPool). ...
19 Jun 2013 by VIP Venkatesan
Hi friends,In my project i'm using excel data import concept.in that i've import one excel named "Sheet1"..if i imported the same excel again it should not be imported. andit should alert like "The Excel File Already Imported".Is this possible??Regards,Venki
19 Jun 2013 by Mukesh Ghosh
Hi,Yes possible, in case you need to keep imported excel file along with sheet name in Database or any text file so every export you need compare with previous one.
19 Jun 2013 by DaveAuld
Read the import file, generate a hash of the file (SHA-256 etc.) store it.If the next file has the same hash, then chances are you have already imported the file already.As you have not really given much else to go on, this is the best option I can think of at the moment.
10 Feb 2013 by Eljeddi
hello everybody....I'm a student and i need some ressource about the .net development,,, wcf,wpf,c#,VS,ASP.net,sql server... i'm looking for books and tutoriels and everythings can help me as a beginner ,,thank you in advance :)
10 Feb 2013 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
As a beginner, I would suggest you to go for MSDN articles and try the examples given there. When you will start building some sample applications, if you face any problems, then just come back to this awesome Technical Forum Code Project with your question.Everybody will help you here.For...
5 Jan 2015 by sreesankar89
I am having datatable dtdata and the value inside the column is 1.In order to avoid a .ToString() I thoughtouf using .EqualsI have tried this if(dtData.Rows[0]["Column1"].ToString() == "1") -- workingif(dtData.Rows[0]["Column1"].ToString().Equals("1")) --- working but its not...
5 Jan 2015 by CHill60
This codeproject article explains the differences quite nicely What is the difference between “==” and .Equals()?[^]
5 Jan 2015 by CLilium
if(dtData.Rows[0]["Column1"].E...
5 Jan 2015 by Praveen Kumar Upadhyay
As you have mentioned that your column type is tinyint(1). Now when we load the select statement into DataTable, tinyint column value is getting converted into short type of.Now I will explain your scenario, why if(dtData.Rows[0]["Column1"].Equals("1")) returning false.Consider the below...
10 Feb 2012 by Tsotne1990
Hi!I wonder if the .NET 4 has a standard Ribbon component. Im using Visual Studio 2010, could anyone state where to search? (if it exists in there)Thanks
10 Feb 2012 by Christian Graus
Nope - you have to search the articles here or search to buy a third party component.You should always search Code Project[^], especially when someone has told you that you should try that.
12 Jul 2013 by pokemonjohn
HiI have a windows service which i have been using on a windows server 2008 for some time with out any issues.I'm no trying to get this to work on a windows Server 2012 box.The windows service has an installer project and will install / uninstall fine on both servers, how ever on the...
6 Sep 2012 by cple82309
I have a small .bat program that runs at night using VB.NET 4.0. The job use to run on a Window XP Service Pack 3. I tried to migrate the application to a Windows 2003 Service 3. The application failed stating System.Null exception. I followed the code and it seems to fail on initializing...
6 Sep 2012 by Dave Kreskowiak
I'll assume that "SystemNull exception" actually means "Object not set to an instance of an object".All you have to do is step through the code where it bombs and check to see which one of your objects returned Nothing. Your code is making the assumption that some call that is supposed to...
25 Jun 2012 by yadlaprasad
If i run my application in IE8, it is working as expected(http://localhost:3486/Login.aspx). where as if i run the same application in Mozilla it is redirecting to undefined page. (http://localhost:3486/undefined)can anybody please help.
26 Jun 2012 by Vijay Walunj,Navi mumbai
insufficient information.Still i am trying to give a ans.check web.config also check starting page of your application page in the properties solution if it is starting page.If you r using code in scripting for redirect there may b issue with scripting may b not supported by browser.if is it ok...
23 Aug 2014 by amiradar
As I've encountered an advice not to use the SerialPort.DataReceived event, nor the BytesToRead() (www.sparxeng.com/blog/software/must-use-net-system-io-ports-serialport), I am trying to implement a reader from a serial port with BeginRead & End Read. When the application reached the line:Dim...
11 Oct 2009 by Shivprasad koirala
In this article we will discuss about new feature DLR and also about ‘dynamic’ and ‘expando’ objects.
1 Jul 2015 by MacParekh
I have uploaded site on Sever. Two site one of them hosted with .NET 4.0 framework. and second in .NET 2.0 framework. 4.0 framework site working properly. But 2.0 framework site unable to load CSS, javascripts and images. It is giving 500 error. As well as reference error "WebForm_AutoFocus...
17 May 2010 by Sarang Date
Any string input can have these many possible states1) String is null2) String is empty3) String contains nothing but white space4) String has some contentTill now, .NET had static method for stringbool string.IsNullOrEmpty()which handled first two conditions for...
12 Aug 2010 by jfriedman
public static class StringExtensions { public static bool IsNullOrWhitespace(this string s) { if (null == s) return true; return string.IsNullOrEmpty(s.Trim()); } }
30 Jan 2013 by Dan_YYC
Hello all. I have a very simple/complex question to ask of anyone who as ever worked with/in the dinosaur environment known as ADP. Which ironically probably cuts your paycheck, and mine =(. I would LOVE to speak with some one who has experience programming from .NET to ADP via...
17 Oct 2019 by Changqin Liu
C# framework integrated with spring.net and ibatis.net
20 May 2014 by normalsoft
Hi,I have developed a class library in .net framework 4.0 in which i am referring System.Net.Http namespace. Now i have to refer this dll into my existing application(running v3.5) and done it. While executing the application shows the following error"This assembly is built by a runtime...
20 May 2014 by Mehdi Gholam
You cannot use a later version of .net assemblies with an older version (i.e. v4 in a v3.5 application) this is because of the possible use of newer runtime features which don't exist in the older runtime.You can however do the opposite (i.e. use a v2 dll in a v2+ application).If you are...
6 Jan 2014 by Assil
This article describes asynchronous patterns in .NET and how to do them.
27 Mar 2012 by gourav agrawal
hi I have integrate .net blog engine with our site, it work fine on local but when i am deploying on server, it not link with app_code folder that contain the various cs file of .net blog engine, so how i link the app_code file with our site, if added the app_code folder on server it give...
23 Aug 2010 by tapash mane
How we can import Excel File in .NET by using bulk insert Method(SQL SERVER)
23 Aug 2010 by Yusuf
Is google[^] broke where you live?
18 Jan 2011 by anada8886
Hello everyone, I don't know whether this is the right place to ask this question or not, but since all the people here have pretty much knowledge about the IT market needs, I thought I should take your opinion on this. I have around 2.5 years of experience in .Net3.5/4.0, & now I am...
18 Jan 2011 by Kasson
Go for Microsoft Certified Solution Developer (MCSD) or Microsoft Certified Applications Developer (MCAD) that will be very much helpful.For more details MCSD[^] and MCAD[^]
18 Jan 2011 by thatraja
Here you go dudeMicrosoft Visual Studio Certification[^]Also browse from here too Microsoft Certification[^]
6 Aug 2014 by lalitha19
Hii need to convert word ,txt documents from folder to Pdf file through C# console application.but it doesn't require any MS office to be installed on system,anyone please help me to find some .net component for free / cost.or does anyone know the coding to convert documents please let...
6 Aug 2014 by Sibeesh Venu
please read herehttp://msdn.microsoft.com/en-us/library/office/bb412305(v=office.12).aspx[^]
10 Jan 2011 by rajesh_ncc
Hi,This is Rajesh Kumar K. from Chennai based company.I am working with .net framework 2.0.I am very new to .net framework 4.0. Could you please guide me to a tutorial or sample or guide or notes. Thanks for your future help.regards,Rajesh Kumar K.
29 Dec 2010 by #realJSOP
No. That subject is way to broad to be answered here. The best thing you can do is develop some initiative and google ".Net 4.0". There are MILLIONS of results awaiting your perusal.
29 Dec 2010 by Hiren solanki
Yes why not ?See the big tutorial HERE[^]
29 Dec 2010 by Abhinav S
Go to the msdn website - you should get some real good videos and quickstarts there.
10 Jan 2011 by Anupama Roy
Take a look at this to know about Optional Parameters & Some New features in .Net 4.0http://dotnetforyou.wordpress.com/category/net/net4-0/[^]
27 Jun 2013 by ashriv
Is the C#.Net 4.0 based windows application Compatible with Windows XP SP2 or below?I'm in process to develop a windows application using C#, .Net Framework4.0 using visual studio 2010. for Reporting, I am using SAP Crystal report.my Question is - Is this application Compatible with...
24 Jun 2013 by Ron Beyer
Here is the requirements for 4.0[^]Windows XP is supported. .NET 4.5 does not support Windows XP though.
27 Jun 2014 by Abhinav S
In general, you will not face any issues in building a .Net 2.0 dll in .Net 4.0..Net is backward compatible.
27 Jun 2014 by Raul Iloc
You should target .NET 4.0 without problem; some small problem could occur in the process of converting the solution (and its projects) from an older version (VS2005 that use .NET 2.0) to a new Visual Studio version (VS2010 for .NET4.0).
27 Jun 2014 by Sergey Alexandrovich Kryukov
Just change the target and see what happens. Few types/members are made obsolete. Try to get away from non-generic collections (additionally).—SA
22 Jan 2014 by Akashkumar Bammrotwar
I had developed a WCF Service in .net framework 4.0 and Client in .net framework 3.5. Does it create a problem? I mean it is possible to for .net framework 3.5 can consume the service which is build on .net framework 4.0 and using binding "wsDualHttpBinding"? I had tested in the two situation...
22 Jan 2014 by Sampath Lokuge
No,Always you can do this.B'cos it's having backward compatibility with the earlier version.So, if you're having something wrong,it should give the same error on your local host also.Hence, you don't have any problem with local host means where may be the problem with something else.So try to...
31 Aug 2010 by Livio Francescucci
How to create an ASP.NET gridview AJAX enabled connected with WCF SOAP and REST webservices.
31 May 2016 by Yaseer Mumtaz
.NET interview questions and answers with real world examples and code snippets
10 Dec 2013 by OriginalGriff
No.These are not complex questions, and if you do not know the answers - and you are too lazy to try and answer them yourself - then you probably should be looking at a different career.Suppose we answer them, and you get the job. Can you do it? Not very likely - which means that one of...
10 Dec 2013 by thatraja
Only 100 questions? You have disappointed me.If I were you, I would have started to learn by books & Google. You could get answers for 30% of questions from Google by search using the questions.This is not quiz program, it's for job so don't play bluffing during Interview never.And...
16 Sep 2014 by Member 3373055
venkat, please remove these question , we all knows which questions are these. Just because of you they might change the pattern and you know how many members will be effected due to that change. So, please remove these questions right away.Search in google will get all inputs.. don't post...
13 Apr 2015 by ArindamSarkar
Can you please share few more question on Azure, RFP, Cloud and Metro UI
30 Mar 2011 by shubha111
i am doing RDT (REMOTE DESKTOP TOOL) project in .net ., Help me for doing tehe code for writting the "Change Password" form.
30 Mar 2011 by Abhinav S
Have a look at msdn for details on .Net.
30 Mar 2011 by OriginalGriff
Now, there is a short question.Here is a short answer: No.Do you realize how much work is involved in a detailed explanation of anything? Even a five line C# program can take half an hour to explain in detail. An entire remote desktop viewer project? Do you think we have all year, just...
25 Oct 2015 by Greg Nutt
This is a VB.NET Version for ".NET Remoting Events Explained"
8 May 2013 by RichCode
Probably a simple question... I've connected to simple web services before by using Visual Studio to add a web service where it creates all the class information for you. But soon I will need to connect to a secure web service using WS usernametoken (username and password with nonce +...
19 Aug 2013 by TapasU
Hi All,I am making call to a Java service from my ASMX. However, I am getting the following exception from the Java call in my .Net code base.System.Web.Services.Protocols.SoapException : System.Web.Services.Protocols.SoapException: Server was unable to process request. --->...
19 Aug 2013 by TapasU
Hi All,I tried SOAPUI tool to generate the request. But I am getting Following Error.HTTP/1.1 400 Bad RequestDate: Tue, 20 Aug 2013 05:41:30 GMTServer: Microsoft-IIS/6.0X-Powered-By: ASP.NETCache-Control: privateContent-Length: 0Sample Request below
14 Jan 2014 by Ron Beyer
Convert what System.Convert can't.
3 May 2016 by Southmountain
this post discussed .NET versioning and multi-targeting of .NET application and component written in C#.
31 Jan 2012 by Survalent
I am unable to handle and suppress errors in my service without clients knowing about them. Someone tell me what I am doing wrong.Given a WCF service function as followspublic MyType GetMyType(bool blCry) { try { if(blCry) throw...
17 Dec 2012 by kaseempeera.v
What is WCF Bindings? Give the programmitical examples each one?
17 Dec 2012 by Abhishek Pant
these articles may help youWindows Communication Foundation Bindings[^]WCF Services - Choosing the appropriate WCF binding[^]Understanding WCF Bindings and Channel Stack[^]WCF Service Binding Explained[^]WCF Bindings In Depth[^]
8 Aug 2012 by ALIENMASK
How to host .NET web service, in side the local IIS server. I have developed the service using .NET 4.0. Please let me know.Regards !
8 Aug 2012 by Karl Sanford
Here you go: http://msdn.microsoft.com/en-us/library/aa751792.aspx[^]
8 Aug 2012 by Sandeep Mewara
If it's a WCF, see here:MSDN: Hosting and Consuming WCF Services[^]MSDN: How to: Host a WCF Service in IIS[^]If it's a normal web service then you need to deploy as a normal web app:For hosting a web application: MSDN: Walkthrough: Publishing a Web Site[^]
27 Dec 2014 by Thebusker
Hello to all,my Hosting Provider don't allow to use the default user called "dbo" (on mssql 2008 server).I'm using the standard Membership in Visual Studio Express 2012 (or VS2010) for Registration and Login pages, but the Entity Framework/Membership .dll creates tables and vistas by "dbo"...
30 Aug 2016 by Member 12478311
I am getting .net app crash unexpectedly.My code and everything looks fine.I am really struggling to figure this outI got the below information from dump file(.dmp).he PID__4120__Date__08_29_2016_Time_11_13_58AM__139__Second_Chance_Exception_C0000005.dmp the assembly instruction at...
30 Aug 2016 by Patrice T
You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.The debugger allow you to follow the execution line by line, inspect variables and you will see that there...
14 Mar 2014 by Nikita D. Sinelnikov
HowTo: make the report background (elements) of Microsoft .NET Report (.rdlc) non-printable
16 Sep 2012 by golrokh_ka
hi ,, my website was created with .Net 3.5 , i cant install .Net 3.5 on the server, can i run my website with .net4 on IIS ??
16 Sep 2012 by PBGuy
Yes, you can. If you installed .NET 3.5. Otherwise, you need to update your site. It also can be depended on the configuration setting in your web.config. And if you use IIS 7.0 and running the 3.5 application in 4.0 framework. You need to change and put your application in different application...
18 Mar 2013 by Member 9445358
I wrote code that works correctly for a single page, when a linkbutton is hovered over it causes javascript code to execute from a document ready, that causes a popup to show.BUT when another linkbutton is clicked, causing a postback and then a C#linkbutton_click function to execute, the...