.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

Need advice on how to use WF4 to manage my business logic in my ASP.NET MVC3 app

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

I want to use WF4 in my ASP.NET MVC3 app and now trying to get the hang of how WF4 should interact with the MVC app.

Say, I want WF 4 to help me with the registration process. I want new users to go through the following steps:

  1. Register
  2. Activate account
  3. Fill out personal profile
  4. Fill out professional profile

Clearly, all the registration logic and UI elements will be in the MVC3 app. I assume WF4 will be where I will check to see if the user has completed these steps.

What I'm not clear about how will WF4 tell my MVC app where to send the user? Here's what I'm thinking, please let me know if this approach makes sense

New registrations will initiate long running workflows and bookmarks will get saved in SQL Server. I will have four UI views in the MVC app with their corresponding logic in their respective controllers. How will I WF4 tell MVC what to do i.e. what URL to send the user to and what parameters to pass?

Thanks, Sam

View Complete Post

More Related Resource Links

Logic to calculate business hours


Hi All,

I have tried searching all over the web for this logic. Got many but half of them did not match what i was looking for and half were malfunctioning.

I want to calculate business working hours between 2 datetime, where in I should be able to set the working hours as well as weekends and holidays should not be calculated.


Please help me guys... It will be a great help... 

Best way to implement business logic

I am trying to migrate our current SQL CRM to Sharepoint Server 2010. At first I tried using BCS but I couldn't figure out how to implement a many-to-many lookup relationship. So now I am trying to use SSIS to move the SQL data into the lists in Sharepoint. Right now, I have accounts and contacts as lists. Now I am trying to implement the business logic where an account can have multiple contacts and a contact can have multiple accounts and when a user associates a contact with an account (or vice versa), that account should automatically be associated back with the contact. It seems this cannot be accomplished with a declarative work flow like in SPD. Am I correct in thinking that the best way to implement this is with 2 sequential workflows in Visual Studio?  Also, is a workflow always preferrable to an event receiver? Thanks!

VB code behind the Business Logic Layer ???


Hello. I was hoping for some general help and comments.

I went through a lot of the ASP.Net Web Forms Tutorials.

I also went though the whole "ASP.Net in 24 Hours" book by Scott Mictchell. I followed everything that went on in that book and built the final project successfully. I also used the tutorials here to better understand the whole Membership Provider/User tables setup that was going on in the book.

Next, I thought I would learn more about accessing data for ASP.Net since that is what most application do.

I went through the first Data Tutorial here. I seemed to understand what was going on just fine.

The second Data Tutorial seemed to just show a lot of VB code to build the Business Logic Layer. There was not much explanation about how to do it yourself.

I think I can keep going in the tutorials here. I downloaded the code from the second tutorial and went through it.I am guessing that the code in the second tutorial was given just to proceed with the overall project that is being built throughout the tutorial sequence.

I just wish I understood what is going on in those long lists of VB code. I can see some of what is going on. I don't know VB very well at all. So, what is the next step?

I have started working through a VB book. Will learning VB help me understand the code in that tu

Advice needed: how to manage large list



I have a question about the guidelines set by Microsoft.
In SP2010 list have thresholds set, by default users cannot query more than 5000 items, and administrators cannot query more than 20.000 items.

In SP2007 I had a list that contains 10.000 items. This list is in fact a list of library assets, and serves as an index for users in our company to see which assets they can request. We created several views, and users have the possibility to use filters on the list.
So e.g. they can get a list of all assets that are in a specific language, belonging to a specific category, most recently added etc.

With the new threshold, this list doesn't show up anymore. Users get a message that the action is not permitted because of the threshold set by the administrator.
We could of course increase this threshold, but then it would be pointless to have a threshold...
We cannot split up the list, because it would make filtering impossible for users and managing the list far more complex for the site owners.

So what approach do I need to follow in this case? I cannot see how Microsoft wants me to handle a list/site like this...

Separate class library for controllers,models,repositories,business logic


Alright after scratching my mind for a while.. I still cant figure out how to go ahead with my architecture: http://forums.asp.net/p/1618613/4149672.aspx#4149672

nor i can find a decent link / info on it...So, iam goin to give this one more try.

Web Part remote update and centrally located business logic


Hi everyone,

We have a web application with a search engine that our customers want to integrate into their Sharepoint environment with automatic login. I'm not familiar with Sharepoint myself but have a question around the practicality of it. I realise that we have two options:

1. Display my web app in an IFRAME. The benefit of this approach is that my Sharepoint users will automatically benefit from any update made to the web app. The downside is that they cannot download any search results directly to their Sharepoint folders.

2. Create a full Web Part to "rebuild" the full user interface of my search engine for Sharepoint. The Web Part will access my web app through back-end APIs. The benefit of this approach is that users can download results directly into their Sharepoint folders. However a big downside is that anytime there's an update to the web app, I have to implement it separately on the Web Part and redeploy it. I'm discouraged by this because that means I have to update the Web Part on every customer's Sharepoint instance.


My question is. Is there option #3 that's a midway between option #1 and #2? Is there a way I can create a thin Web Part accessing "proxy" code that is centrally updateable without having to touch every Web Part deployment? Hopefully this option allows me to get the ben

How to use business logic in MVC



I've got a C# MVC 2 application using EF 4. My DAL project gets data from the Model, translates them into POCO's and returns ViewModels to the BLL which is called from the controllers.

I've set up validation attributes on the POCO classes and that works for "Required" fields etc. I would like to add business logic such as "From" has to be before the "To" date. Can this be done on the POCO classes so it is automatically validated client-side in the view?

Also, I would like to add some functionality to the BLL layer such as checking if a resource is already booked between the From and To dates to avoid double bookings. This should fire before the ViewModel is saved. I tried a Try/Catch statement in the controller so that I can throw an error in the BLL, but I don't understand how to return this error to the view with an appropriate error message added.



[Business Logic Handler debugging] - The assembly is not loaded by inetinfo.exe process


Hi there,

Here is my story - my merge replication topology consists of one publisher (sql server 2008), a distributor (same server as publisher) and a subscriber (sql server 3.5 CE). I use web synchronization for my merger replication. Publisher, Distributor, Subscriber and IIS run all on the same (development) machine. I use MSSMS to synchronize the subscriber.

I've created a custom resolver (Business Logic Handler) that should perform some data modification that has been inserted at the subscriber, before it is merged into the publisher. It should but it doesn't so I need to debug it to see what's going on. I've followed steps form here http://msdn.microsoft.com/en-us/library/ms365150.aspx on how to debug a business logic handler on a Web server using Web synchronization and I'm stuck at step 7. MY PROBLEM IS when I attache to inetinfo.exe process from VS2008, I don't see my assembly to be loaded neither in Output nor in Modules window and the break points say that they will not be hit because the symbols were not loaded.

I configured web synchronization almost exactly as it says here http://msdn.microsoft.com/en-us/library/ms151810.aspx , the only difference is that I didn't configured and

How to best organize multiple WebProjects that use similar business logic


We have the following setup

Current Solution:

  • Business Logic (Class Library)

  • Data Layer (Class Library containing EF,Web Services wrappers etc)

  • WebProject1

BUT we now require a new Web Project which would be almost identical to WebProject1 except for the fact that it would alter properties and input variables to functions/voids inside the Business Logic class to provide a different set of data for another completely different user. Think of Facebook as WebProject1 and Myspace as WebProject2. Same concept, same business layer almost but different products altogether.

Future Soltion

  • Business Logic (Class Library)

  • Data Layer (Class Library containing EF,Web Services wrappers etc)

  • WebProject1

  • WebProject2 (similar to WebProject1 but different authentication, different UI, different pages etc)

  • WebProject3 (possible)

Without completely destroying the Business Logic (as the class would now have to allow for 2 paths per set of input variables) how can we structure this to aviod doubling up on any code?

The delima is:

Should we maintain two Business Logic class libraries? Should we add preffixe

Access business logic through a webservice


This should be fairly straightforward, but there seems to be nothing on how to do this.  So far  I've just created wrapper WebMethods and that accessed most of my methods fine, except for the one that returns an object that inherits icollection.  The error returned says to create a default accessor for the class (I don't want to touch the existing business classes, as they are being used elsewhere.)  But, I'm also sure theres many more problems along the way.  So, is there complete documentation to do this?  Or a proper tool to generate a webservice layer?


Business Modelling and Web Applications and extending UML

UML can be used to model a business, prior to automating it with computers. The same basic UML syntax is used, however, a number of new symbols are added, in order to make the diagrams more relevant to the business process world. A commonly-used set of these symbols is available in current versions of Rational Rose.

Logic behind N -Tier Application Development

In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

Business Intelligence Development Studio



            I installed Visual studio 2008. I want to open Reports. I want to install Business Intelligence development studio for that.

May I know how to install that one. Is Business Intelligence development studio comes with Visual studio 2008.

Please tell me, I m new to this concept.


Business Intelligence Reports Project in Visual studio 2008 ?



I wonder how to add a project template called  Intelligence Reports, something like that, to Visual studio 2008. I have SQL 2008 installed. Do I need to install some updates to get Intelligence Reports template to Visual studio 2008 ?

Thank you..

New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Business object design in master details.


Hello guys, I have the following scenario,

  1. There is a master business object containing 40 fields
  2. 2 separate child business objects
  3. If I update a child record, I have to update master's 'Last modify by' status along with 3 or more fields in master
  4. For this purpose, I don't want to initialize a separate Master class object (as most of the fields are unused/wasted)
  5. The 'last modify by' also gets updated if the records in master get updated themselves

Currently I have separate business objects for master table, Child 1, Child 2 etc.

How do I control this in my business object design ? Do I break up my master object ? Say I extract last 'modify by ' into a new class, through inheritance or some other way ?

Is there a way that whenever child gets updated I use a 'small' class to update Master status only and whenever the master itself gets updated I do the same.

Problem is that I am having redundancy in my small class (Master class also contains 'Last Modify By ',

What would you advice. Please have your say. Thank you.

Edit  I am using webforms guys.

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