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

Top 5 Contributors of the Month
Post New Web Links

ASP.NET MVC project architecture problems - authorization and session

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hello, I am finishing a project that started another programmer. Alter the entire architecture is not possible, but some things I want to overwrite. Namely - the authorization, and a way to store the current user session. The project represents a client that communicates with the server through the soap-services. On the server, there is Security-Services, and several others, for example, A-service, B-Service. Security service provides authentication and session key with which initialized other services. The project is written in ASP.NET MVC3, the head of a user model, which is implemented as singletone-Class, which describes the methods of interacting with services. How authorization works - there is CustomMembershipProvider with overridden ValidateUser method, which operates on Security-service. If successful authorization occurs the user registration in asp.net - FormsService.SignIn (model.UserName, false) and then initizalied user class: 


class SiteUser
    public static SiteUser Current
            if (HttpContext.Current.Session.IsNewSession && !HttpContext.Current.User.Identity.IsAuthenticated)
                throw new UserAutorizationExeption() { Reason = AuthExceptionReason.NewSession };

            if (HttpContext.Current.Session[se

View Complete Post

More Related Resource Links

Project Example: ASP.NET MVC + SubSonic Architecture

use of SubSonic to provide the DAL in association with some ASP.NET MVC sites and was waylaid in my original intent to throw up a post summarizing the architecture we're using for the effort. Well I've finally gotten around to it. Recall that in his fake it till you need it post, Dave provided a window on our architecture that I'll build upon here

Problems converting VS 2003 project to VS 2008



I'm having problems converting a VS 2003 project to VS 2008 (tried 2005 as well, same problem). There are several problems;
a) I don't have VS 2003 installed.
b) The project is a web service, however I'm not sure what type of VS project it was created as.
c) The general knowledge about the project setup is..slim.

I get a error message using the conversion wizard, however, I'm not familiar with the tool and I cannot quite find any good information on Google for it, so I am left with a error message I do not understand.

Conversion Issues - myProject.csproj:
Unable to open the Web site 'C:\local\path\to\project\myProject.csproj'. The Web site 'C:\local\path\to\project\myProject.csproj' does not exist.

The web service is not intended to run on the dev machine, it is copied to a test or a prod server. However, I do not know how this was done previously. I'm thinking that in order to convert, it has to access the server on which it should run (which is set somehow in a config maybe). But that doesn't actually make any sence..

If anyone could shed light on this, I would really appreciate it.

Thank you.

need help to finish this sample project - using 3 Tier architecture


hi friends, i ma new to asp.net, i am just learning asp.net using this site and some resources from internet , internet is the only source for me.  and here  i have a project that should be designed by the patter of 3 tier architecture. i have an idea, but i couldn't start it, need your guidance, if i did this , it will very useful for me to get a job. please help me.  

these are the requirements and steps. 

Please find below the steps, we follow up.
1. Develop a Sample project in 3 Tier architecture in .Net 3.5 using VS 2005 or 2008 and MS SQL 2005 Express 
(Login page, User session handled inner page with a listing of data, provision to insert and update data)
2. Coding should be of standards as per document attached
3. No Hard Coding instead, values should be placed in constants, config file and retrieved.
 Particularly DB connection.
4. Stored Procedures should be used for Data insert, retrieval and update.
5. Sample Project should have implemented Client as well as Server side field validations
6. Data Classes, Try Catch for transactions in code should be used


Redirecting to home page when session expires (without )


Hello guys, my web app doesn't use authorization in web.config, but i want to detect when a session has expired and redirect to the home page.

I have searched and found solutions that rely on the web app using authorization. Other solutions have implemented a user control to drop in every page.

Obviosly i don't want to manually check for null on every session variable on every event of the web app, so i want the app to do it automatically.

<sessionState timeout="120"></sessionState>
<authentication mode="Forms">
       <forms name="myappCookie" loginUrl="~/index.aspx" timeout="120"/>

doesn't work for me since i don't have allow or deny settings, since my app doesn't need authentication.

What are my options?

authentication and authorization problems


I am getting following error while executing my project.

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.    C:\Documents and Settings\abhimanyu\Desktop\ChinmayaMission Website\admissionzone\Web.config    16    

well this is very simple project but i am unable to find it how? actually i have folder level config file and folder level authentication. please look at following image that i have created for better understanding.


Please reply me, what I use inside the folder level config file and root level config file to accomplish such job.


ASP.Net Project Architecture



I am new to ASP.net application.

Please clarify some of the queries,

1. what architecture need to follow?

2. What are all the common functions need to write? like DBnull checking, conversion etc

3. Coding standards?

4. Error Logging

please provide the sample application, that would be very helpful to me.

Architecture Tools in VSTS 2010

Designing new functionality on existing applications can be daunting. There are always differences between the original design and the current implementation.

The new Architecture tools within Visual Studio Team System 2010 help you understand the application you have, design new functionality you need, and validate that your design and your implementation do not deviate.

SharePoint Tutorial - SharePoint Logical Architecture

The SharePoint logical architecure consists of nested and isolated levels. These levels provide benefits for security, navigation, search, branding and ect. depending on the level

SharePoint Farm
The base level for any SharePoint implementation is the SharePoint farm. Physically a farm can consist of one server or many servers. An organization may implement one or more farms. This usually depends on security and performance needs.

SharePoint Tutorial -SharePoint Physical Architecture

The SharePoint physical architecture consists of services running on one or more servers.

There are three types of services that together run the SharePoint farm: web, application and database services. Web services through Internet Information Server is what processes the ASP.Net and sends back the html to a user's browser. Application services is where the "brains" of SharePoint are located. All of the SharePoint specific logic and services are processed there. Database services are run by SQL Server and it's where all the data/content for SharePoint is stored.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

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

MVC Architecture

The main aim of the MVC architecture is to separate the business logic and application data from the presentation data to the user.

Here are the reasons why we should use the MVC design pattern.

They are resuable : When the problems recurs, there is no need to invent a new solution, we just have to follow the pattern and adapt it as necessary.
They are expressive: By using the MVC design pattern our application becomes more expressive.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

Three Tier Architecture with ASP.NET

ASP.NET supports layered architecture, and this article will illustrate how it can work with the ASP.NET presentation controls. This article focuses mainly on the GridView control, mostly because it is prevalently used in .NET development. However, the concepts work for other controls as well.

ASP.NET 2.0 (III) Architecture and Tools

In this third article we'll take a look at the changes to the architecture of ASP.NET v2.0. In particular we'll look at the changes to the compilation and deployment model.

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.

Application architecture in asp .net

Application Architecture is the most important process of developing a good application. Some people tends to jump into coding without any architecture laid. Later we see those people changing the architecture and finally the application had to be developed from the scratch with the correct architecture.

In this article I will describe some details about how you can improve the architecture of you application. This article is targeted to the beginner's audience.
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