.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Natural Algorithms: Use Bee Colony Algorithms to Solve Impossible Problems

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

Simulated Bee Colony (SBC) algorithms model the behavior of honey bees and can be used to find solutions to difficult or impossible combinatorial problems. In this article I explain what exactly SBC algorithms are, describe the types of problems which can be solved using SBC algorithms, and present a complete end-to-end example which uses an SBC algorithm to solve the Traveling Salesman Problem.

James McCaffrey

MSDN Magazine April 2011

View Complete Post

More Related Resource Links

Genetic Algorithms: Survival of the Fittest: Natural Selection with Windows Forms


Genetic Programming is an evolutionary algorithm that employs reproduction and natural selection to breed better and better executable computer programs. It can create programs that implement subtle, non-intuitive solutions to complex problems. By taking a well-known example from the Genetic Programming community and implementing it with the .NET Framework, this article demonstrates that CodeDOM and Reflection provide all the facilities that are needed to do Genetic Programming effectively.

Brian Connolly

MSDN Magazine August 2004

Windows with C++: Exploring High-Performance Algorithms


See how you can gain efficiency in surprising ways by looking closely at your algorithms, the data they operate on, and the hardware you're designing for.

Kenny Kerr

MSDN Magazine October 2008

Tamper-Resistant Apps: Cryptographic Hash Algorithms Let You Detect Malicious Code in ASP.NET


Cryptographic hash algorithms produce fixed-length sequences based on input of arbitrary length. A given input always produces the same output, called a hash code. Using these algorithms, you can compute and validate hash codes to ensure that code running on your machine has not been tampered with or otherwise changed. ASP.NET provides a software mechanism for validating hash code fingerprints for every page requested by a client. In this article, the author shows how to use hash codes with ASP.NET applications to detect tampering and prevent malicious code from running when tampering is detected.

Jason Coombs

MSDN Magazine September 2002

C++ and STL: Take Advantage of STL Algorithms by Implementing a Custom Iterator


There are many benefits to using the Standard Template Library (STL) for C++ development, including the ability to use generic data structures and algorithms. To use the STL algorithms, an STL-conforming container is required. Iterating through the Internet Explorer cache is an informative exercise, but the cache is not an STL-conforming container. So, to use the STL algorithms to search and enumerate the Internet Explorer cache, an adapter is needed. Building such an adapter-an STL-conforming iterator-is the topic of this article. Also provided is an overview of the components of the STL and the Win32 Internet APIs used.

Samir Bajaj

MSDN Magazine April 2001

Which one is better - AES (Rijndael) or DES(Triple DES) encryption algorithms


Hi ,


Which one is better -  AES (Rijndael) or DES(Triple DES)  encryption algorithms            

-  Is AES (Rijndael) is superior to DES (Triple DES) based algorithms??   If so what’s the use of Triple DES

Great if you can share your views on this



SharePoint 2010 Installation Failed - FIPS validated cryptographic algorithms

Hi All,
We are trying to install SharePoint 2010 foundation on a Windows 2008 Standard-SP2 (NOT R2).
After installing SharePoint when we run the config wizard for the first time we get the below mentioned error. We have another box which hosts MS SQL Server 2008 and we noticed that the config database is created but the wizard fails during the Create Config Database step.
Local security policy for FIPS is disabled.

Failed to create the configuration database.
An exception of type System.InvalidOperationException was thrown.  Additional exception information: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
   at System.Security.Cryptography.SHA256Managed..ctor()
   at Microsoft.SharePoint.UserCode.SPSolutionValidatorCollection.ComputeHash()
   at Microsoft.SharePoint.Administration.SPUserCodeService.UpdateValidatorsHash()
   at Microsoft.SharePoint.Administration.SPPersistedChildCollection`1.Add(T newObj, Boolean ensure)
   at Microsoft.Sha

How to solve JavaScript IntelliSense problems in VS2010

VS2010 should support all of the VS2008 JavaScript functionalities as shown in Scott Guthrie's VS2008 JavaScript IntelliSense blog .  It includes: 1. Basic type inference 2. IntelliSense from referenced external JavaScript libraries 3. IntelliSense from XML comments for functions, parameters and return types 4. Calling web services using ASP.NET AJAX   Additionally, VS2010 RTM had some improvement, including: 1. IntelliSense when manipulating browser objects 2. Dynamic generated variable IntelliSense 3. Default JavaScript snippets within IntelliSense to help you code faster Scott Guthrie has a brief blog covering some of these.   Due to the dynamic feature of our JavaScript engine, we may run info conflicts between XML commented...(read more)

FIPS validated cryptographic algorithms


I have enabled the FIPS algorithm policy on our windows server2008 machine. Now, any page that has a viewstate is abending with the following error: 

This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

This is used in a web farm so we have a machine key defined in our machine.config. If I add decryption="3DES" to the end of that key everything works again. My guess is the default is AES which isn't FIPS compliant. I also noticed this is not an issue on my iis 6.0 servers running server 2003. Very similar setup.

Is there a better way to handle this situation? I read some articles about doing something similar in the app web config. The web.config worked fine. However, the machine.config change seems better because I won't have to change every application.


Clustering algorithms


I am trying to understand clustering algorithm trying to understand and get information about outliers...

I am trying to get the information from my audit logs that would have information like

Session(Unique Key)

source IP 


time spent 

start time 


Now few of the outliers which i want to able to report are

--One user constantly trying to make multiple attempts in a x amount of time ( lets say 10 times in 30 mins)

-- One would be same user Id coming up from different IP 

-- One would be  the amount time spent is more than x hours 

-- if start time are off the peak hours...


My list of questions is,  inorder to develop the cluster , how would i need to present the data in DSV 

Do I need to aggregate the data ? Because a user can have more session it will always show up as different session ?

Do i need to create some threshold value to predict outliers on ......?

I just want to detect the anomoly in the patter of data ...  ?

How would i present the data for a same user who logged in 10 times in 30 mins and have 10 different sessionid but is coming from same ip ? address


Could some one help with a direction 


Thank you 



Surrogate vs Natural Primary Keys - Data Modeling Mistake 2 of 10

In case you're new to the series I've compiled a list of ten data modeling mistakes that I see over and over that I'm tackling one by one. I'll be speaking about these topics at the upcoming IASA conference in October, so I'm hoping to generate some discussion to at least confirm I have well founded arguments.

The last post in this series Referential Integrity was probably less controversial than this one. After all, who can argue against enforcing referential integrity? But as obvious as surrogate keys may be to some, there is a good deal of diversity of opinion as evidenced by the fact that people continue to not use them.

Top .NET Performance Problems and how to avoid them

Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Visual Studio 2008 Memory problems


My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.

Problems with Forms Authentication in DD 4 site


Hello,  I am seeing a strange problem with Forms Authentication in my DD site.   A user logs into and can view/edit/delete data all day, but when they execute a Custom Filter against data (for example , a control DynamicData/Filters/CustomerLastNameSearch.ascx ) then the site auth fails, and redirects to the log in screen.

in web.config I have

     <authentication mode="Forms">
            <forms name=".Star" loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" path="/" timeout="43200" cookieless="UseCookies" />     

Offhand, I am thinking two things : that DynamicData/Filters path requires some special handling for some reason, or the control extension ascx is causing auth to get confused.   Has anyone else experienced this or have any suggestions?  Thanks!

Problems posting to a package


Hey Y'all

I'm currently creating a program that accesses a mysql package to add data to a few tables.  I'm currently getting an error that says  "

ORA-01403: no data found
ORA-06512: at "JESSE.PKG_WORKPLAN", line 42
ORA-06512: at "JESSE.PKG_WORKPLAN", line 177
ORA-06512: at line 1


These lines are


and 177:add_team_members(V_PROJECT_ID, V_START_DATE, v_FISC_YEAR, V_MEMBERS ,V_NUM_MEMBERS,'add');

Checking these variables in my asp.net page they are all receiving parameters.

Is there a  way to see what the database is actually receiving from the asp.net page?

Or is there another thing to be looking at?


URL Routing and Existing HttpHandler problems


Hello everyone,

I have a problem:

I am currently using 2 features: 

1. HttpHandler

Registering the path="res.aspx" verb="*"

2. URL Routing:

Registering with this pattern: "Company/Edit/{*companyId}","~/CompanyEdit.aspx"

In my CompanyEdit.aspx page, I used httphandler res.aspx to generate some images at client.

  • res.aspx?img=1
  • res.aspx?img=3

Now the problem is here, the page is load success with companyId = "12345", but when the images was loaded at client, it loaded the CompanyEdit.aspx again and show error with wrong id.  

I have debug and find the problem that because when image's urls were generated to client with url=res.aspx?img=1, url=res.aspx?img=3, the asp.net will understand that they are Company/Edit/res.aspx?img=1, Company/Edit/res.aspx?img=3 when it maps with URL Routing pattern.

=> So the CompanyEdit.aspx was load again with wrong id (id now is "res.aspx"). 

So, do you have any ideas to solve this problem, or other design.

Thanks, and best regard

ASP.NET 4 precompilation problems



We used ASP.NET precompilation (first manually, then with VS2008 WDP) with .NET 3.5 almost (see below) successfully.

After we moved to 4.0, the precompilation no longer works properly. The precompilation process itself succeeds, and the website works, but it consumes about twice the CPU it does without any precompilation. We use non-updatable precompilation (so webpages get compiled completely).

Our internal profiling tells us that most of the threads spend their time within variations of the following stack:


  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(System.Web.VirtualPath virtualPath, bool ensureIsUpToDate) + 0xa2 bytes 
  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0x5b bytes 
  System.Web.dll!System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(System.Web.HttpContext context, System.Web.VirtualPath virtualPath, bool noBuild, bool allowCrossApp, bool allowBuildInPrecompile, bool throwIfNotFound, bool ensureIsUpToDate) + 0xcb bytes 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend