.net

.Net : main resources, tools and libraries, open source or not, to build entreprise level applications?

As a young professional in .Net, I noticed that there are plenty of .Net application blocks for build an entreprise level application. Still, I could not find a place where all these resources are gathered, as an entry point to .Net development for beginners or professional. Here is my question. Which application blocks do you use in y...

Enforce Action Filter on all Controller Actions (C# / ASP.NET MVC)

Hello, I made a new action filter (attribute, similar to [Authorize]) which authorizes access to a controller action based on a session value. However, I'm basically decorating all my controller actions with that attribute (with the exception of very few). So, I thought it would be better to have that Action Filter always executed exc...

Get log4net log file in C#

Hi, this is my configuration for log4net: <log4net> <appender name="MyLogger" type="log4net.Appender.RollingFileAppender"> <file value="MyLog.log" /> <appendToFile value="true" /> <rollingStyle value="Size"/> <maxSizeRollBackups value="20"/> <maximumFileSize value="1000KB"/> <layout type="log4net.Layout.PatternLayout"> ...

WF Rules and CodeTypeReferenceExpression

I moved some variables into classes in my workflow. Unfortunately, now the rules fail, I've been trying to set the Type, but keep getting this error. Activity 'ifRequestComplete' validation failed: Property "Condition" has invalid value. Condition expression is invalid. The type name specified ("Request, ApprovalWorkflow")...

Fastest way to implement Duplicate Character Removal in String (C#)

In C#, what is the fastest way to detect duplicate characters in a String and remove them (removal including 1st instance of the duplicated character)? Example Input: nbHHkRvrXbvkn Example Output: RrX ...

calculate object delta

I am working on an application where client and server share an object model, and the object graphs can become rather big. To save an object from client to server, ideally i would like to send only the difference over the wire, to minimize network traffic. I can pull the original object graph on the server and apply the delta to it Won...

C#: Make a method to return Execution Time of another Method

I'm trying to come up with a method which will measure and return the execution time of another method. Basically something like this: public void DoSomething(Int32 aNumber) { /* Stuff happens */ } // // Somewhere else in code: TimeSpan executionTime = MyDiag.MeasureExecTime(DoSomething(5)); // Now executionTime contains how long Do...

Are all WCF endpoint types capable of the same things? IS the only difference the transmission type and security?

Are all WCF endpoint types capable of the same things? IS the only difference the transmission type and security? ...

How can I generate random 8 character, alphanumeric strings in C#?

How can I generate random 8 character alphanumeric strings in C#? ...

System.TypeLoadException with multiple projects in solution

I have created a VS2008 solution with 3 projects in it (Class Library, Windows Application, and Web Application). I am using objects that I define in the Class Library in both the Windows application and the web application. This works great for the Windows application, but when I go to create an object in the code behind of a web page...

writing an online payment processing system

We've been requested to create an Online payment processing system the like of Paypal for our national use. does an open source version of this exist ? (so I could study it and maybe improve on it) are there any books/resources/materials that could be useful ? How can I go about taking on such a huge task ? ...

when i add a reference to my project, does it bundle it together?

when i add a DLL to my project, and then publish it, does it add the DLL so that i dont have to worry about the reference? ...

Is there a size limit to the amount of data you can send to a WCF service?

Is there a size limit to the amount of data you can send to a WCF service? I send an array of objects over and when the array gets to be a certain size, I get a 404 bad request exception. Is this a limit of httpHosting? Would another type of hosting work better? ...

c# vs2005 .net 2.0: code optimization

What is the best way to see memory leaks or areas to optimize code in your .net source code? I am using vs2005, c# , .net 2.0 Any good free tools out there that I can safely install on my work desktop? ...

Custom reflection functionality in .Net

Is it possible to override reflection functionality ? ...

Developing a rich internet application

Hello, I have been a desktop developer for a few years mostly doing object oriented stuff. I am trying to branch out into web development, and as a hobby project trying to put a web application together. I have been reading quite alot of information, but I still can't seem to decide on the path to take and would really like some advice....

Reliable email encoding.

What are the most reliable encodings for sending email? I had some problems recently with .NET's System.Net.Mail default of quoted-printable ('=0D=0A' scattered throughout the message). So I changed to iso-8859-1 for the body (set via alternative views), and 7bit for transfer (and base64 for embedded resources). Are there the better ch...

SQL Server select and insert issue

Hello everyone, I have two databases called DB1 and DB2 on the same database server. I have Table1 in DB2 and Table2 in DB2. Currently, I am using insert into select * to transfer all data from Table2 into Table1 (Table1 is empty, my purpose is to make a copy of data from Table2 to Table1). The table structure is clustered ID column (of...

Trouble getting WCF to work with netTcpBinding

Below is my app.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service name="Indexer"> <endpoint address="net.tcp://localhost:8000/Indexer/" binding="netTcpBinding" bindingConfiguration="TransactionalTCP" contract="Me.IIndexer" /> </service> <ser...

measuring pixels

i am writing some code in vb.net that will be generating a pdf file. i am going to be placing text and images in the pdf file. instead of doing trial and error on positioning the text and images using the pixel coordinates, i would like to be able to know exactly the coordinates of something on a pdf file. so for example i would like to ...