Create Windows Workflow Foundation rules in ASP.Net - asp.net

Is it possible to create and configure Windows Workflow Foundation rules from an ASP.Net application? There is the System.Workflow.Activities.Rules.Design.RuleSetDialog for Windows Forms projects, but is there some equivalent for ASP.Net MVC projects using the Razor view engine?
Anyway, I need to be able to create rules from within an ASP.Net client, save them in a database and evaluate the rules in a service later on. Is there perhaps something new in WF4 that can help me with this?

I can't find any .NET 4 samples, but there is a .NET 3 sample for creating RuleSets using the object model. I would assume you need to create your own custom UI for it and create your RuleSets via the object model to handle this in a web application.
Referenced .NET 3 Samples - The sample I'm referring to is called "Creating rules using the object model"

Related

Configure database for MVC authentication

I've been Googling terms like
configure database for mvc authentication
But I can't find anything from this decade that relates to my configuration.
I've created an MVC application using .NET Framework 4.6 with authentication support (database first). Now where do I find step-by-step instructions for creating the database tables and configuring MVC to use them?
Thanks for any tips!
The correct thing to google for is 'ASP.NET Identity'.
If you generate an MVC app straight from one of the templates it will generate a number of classes to handle security and identity.
One of these classes will implement interface IUserStore. The class provided will inherit from Microsoft.AspNet.Identity.EntityFramework.UserStore<TUser>, and uses Entity Framework to check the database if the tables exist, and create them if they are not there.
If you are uneasy about giving your application enough privileges to modify your data schema (ew!), you can create your own class that implements IUserStore and plug that into the system.
It's a big topic, but hopefully this is enough to get started with.

Data Access Application Block for .NET 4.5 using MVC 4

I'm trying to develop an application using MVC 4.
Earlier I was using Generic repository for accessing my database .
But later I was suggested to use Data Access Application Block to access Data Base in my application .
I'm not getting any exact clue that how to start with it.
Can any one suggest some link which can provide me the exact information about Data Access Application blocks for .NET 4.5 and MVC 4 and also some examples of its correct usage.
Thanks in Advance..
I think Data Access Application Block is quite obsolete.
Why don't you use an ORM (such as Entity Framework or NHibernate) to build your data access layer? As you can see here Entity Framework is Microsoft’s recommended data access technology for new applications
There's quite a lot of documentation on the Pattern & Practices site at MSDN, http://msdn.microsoft.com/en-us/library/dn440726(v=pandp.60).aspx.
I have used DAAB in a few projects, but it's quite heavyweight and isn't as widely used as other frameworks. It's also very data-centric rather than being more domain oriented. You might want to consider Entity Framework or a similar ORM over DAAB.

Runtime Workflow in ASP.NET

I need to create an ASP.NET application that will allow user to create the workflow on the fly and implement it. The user should be able to create the workflow as we create a UML class diagram in case tool. That means user should have an interface to drag drop multiple workflow objects and setting various steps and process.
I will be using:
C# 4.0 ASP.NET, .NET 2010
I need to know how to provide such functionality and which tool I should use for allowing the user to create such runtime workflow and save.
Thanks!
To run workflow foundation designer on the web you will need to look toward XBAP hosting of the WF runtime. Checkout mtaulty's blog.

How to create an ASP.NET MVC 3 control/component that can be reused by other applications

I am required to deliver a component, inlcuding business logic and UI, to be used on a ASP.NET MVC 3 web site that is being developed by other company.
I know my way around ASP.NET WebForms server controls and how to package and distribute them to be reused across projects. I also have experience with MVC approach in general and some ASP.NET MVC experience. I did read over materials recommending use of HTML helpers and similar, but most of this deals with only UI reusability or reusability inside a single ASP.NET MVC project. I did not find any mentions of how to package and distribute such functionality for ASP.NET MVC.
The business logic is major part of this component. It is supposed to be a kind of wizard, which progresses through a lot of steps and which would also work with database using Entity Framework and send an email to the user upon completion.
How would I go about creating a control/component that encapsulates complex business logic and also renders its own UI/view output and that would be distributable in form of a standalone assembly? Is this even possible or only to some extend?
Would this somehow be doable by wrapping model, view and controller inside an assembly?
Or would it be better to approach this just as a complex model? If so, how would it be possible to connect the UI/view and controller to this component by the consumer of the component?
I also did see a couple of vendors out there, such as Telerik, who sell something along the lines of ASP.NET MVC controls/components, so I assume this is somehow possible to do.
This article tells how to call controllers from another assemblies.
To reuse only views, you can use RazorGenerator.
I recommend you to refer the MVC Control ToolKit Project page of CodePlex
Also see ASP.Net MVC Sprite Project

What is the best approach to start the following project in ASP.NET?

I am new to ASP.NET Web Forms. Now I am having a small project that I have develop it in ASP.NET. This project consists of the following:
1. data entry system: adding, editing and deleting users
2. defining two roles of the users: admin or registered user
3. creating, editing and deleting events
4. creating simple reports with some graphs
I am expert with HTML, CSS and Javascript. Also, I have a good background in C# and I used Oracle database during my university life, so I know SQL language.
I finished the Lynda Essential Training about ASP.NET and now I am thinking to start my project but I am confused about my start and I don't know from where I should start.
In addition, I have the following questions:
1. Should I know Entity Framework and know how to use it and use it in my project? Is is possible to develop the website with the SqlDataSource?
what is the best and short approach to develop this website from your experience?
Do I need to take another tutorial or is it fine to start with project and taking specific tutorial for each problem that I will face?
Your help guys is highly appreciated
There were a few decisions to make:
Project Type
Web Project or Web Application Project
See http://msdn.microsoft.com/en-us/library/dd547590.aspx
Pattern
MVC or classic Web Forms
See Biggest advantage to using ASP.Net MVC vs web forms
Data Access
Entity Framework (currently in BETA for use with Oracle, see http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html), LINQ to SQL, System.Data.SqlClient classes

Resources