Wednesday, 10 September 2008
What security measures exist for .NET Remoting in System.Runtime.Remoting?
None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.
What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?
Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of informaion. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.
Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component?
When to use Web Service:
1. Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
2. Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
3. Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
4. Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
When not to use Web Services:
1. Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
2. Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.
1. Communicating through a Firewall When building a distributed application with 100s/1000s of users spread over multiple locations, there is always the problem of communicating between client and server because of firewalls and proxy servers. Exposing your middle tier components as Web Services and invoking the directly from a Windows UI is a very valid option.
2. Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.
3. Business-to-Business Integration This is an enabler for B2B intergtation which allows one to expose vital business processes to authorized supplier and customers. An example would be exposing electronic ordering and invoicing, allowing customers to send you purchase orders and suppliers to send you invoices electronically.
4. Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or binary componet-based resuse. The limiting factor here is that you can reuse the code but not the data behind it. Webservice overcome this limitation. A scenario could be when you are building an app that aggregates the functionality of serveral other Applicatons. Each of these functions could be performed by individual apps, but there is value in perhaps combining the the multiple apps to present a unifiend view in a Portal or Intranet.
When not to use Web Services:
1. Single machine Applicatons When the apps are running on the same machine and need to communicate with each other use a native API. You also have the options of using component technologies such as COM or .NET Componets as there is very little overhead.
2. Homogeneous Applications on a LAN If you have Win32 or Winforms apps that want to communicate to their server counterpart. It is much more efficient to use DCOM in the case of Win32 apps and .NET Remoting in the case of .NET Apps.
Tuesday, 26 August 2008
Third Party ASP.NET Grid control
ComponentArt Grid for ASP.NET
Features and Benefits
Advanced Client Programming: Powerful client-side API featuring Microsoft AJAX library syntax allows for total control over structure and data, with persistence to the server.
Widest ASP.NET Framework Support: ComponentArt Grid is available for ASP.NET 1.0, ASP.NET 2.0, ASP.NET AJAX and ASP.NET 3.5.
Comprehensive AJAX Support: Paging, sorting, filtering, grouping, and editing can be performed through AJAX callbacks - without reloading the page.
Multi-mode Operation: ComponentArt Grid features the ability to operate in Client, Callback, and Server modes.
Client-side Templates: Client-side templates dramatically decrease page footprint and enable innovative new features such as real-time data previewing while paging.
Fast and Lightweight: ComponentArt Grid offers the lightest page footprint and fastest performance in the industry.
Cross-Browser Compatibility: Supports IE5-7, Firefox 1-2, Netscape 7-8, Mozillas, Opera 8-9, Safari 1.
Other Features: Column resizing and reordering, hierarchical display of tables, selection of multiple records, record editing, conditional formatting, context menus, and keyboard control.
Refrence by : ComponentArt
ASPxGridView Suite
We can tell you that it is blazing fast, dependable, and fully optimized. We can tell you that it has no match in the marketplace and we can show you that whether you have 1000 rows to display or 1 million, the ASPxGridView can make advanced UI features such as sorting, grouping, and summary computations available without bringing your server to its knees. We can tell you all of these things, but it might be better to hear it from an independent source...One that in a recent review said the ASPxGridView has "No Competition".
Features and Benefits
Blazing Fast Data Mining and Analysis Features
AJAX-enabled Features and API
Data Editing
Additional Capabilities and Features
ASP.NET Shared Framework
Shared Framework Overview
AJAX-Enabled Features and API
Miscellaneous Features
ASP.NET Themes
XHTML Compliance
Refrence by : devexpress
WebGrid for ASP.NET
WebGrid� is a full featured, search engine-friendly, hierarchical AJAX grid control for ASP.NET 2.0 (and up) that allows binding and professional display of your data in whatever style or manner best fits your needs. AJAX functionality built into the WebGrid provides benefits such as allowing the data grid to automatically and quietly send AJAX requests (on client browsers that support this technology) so that behind the scenes it can repaint the UI and provide a rich and responsive user experience. The many capabilities of the WebGrid make it ideal for users that need to work interactively with data exposed by your Web application. These features include ASP.NET templates for rows and columns, sorting, filtering, group-by, scrolling columns while one or more other columns are fixed in place, and many other features.
Rich Data Entry
When you combine the presentation of WebGrid with the embeddable editors in our set of WebEditors� you can produce a rich data entry application in no time. You can embed the masked editor, numeric editor, date time editor, date dropdown, and custom button into any grid column. The WebCombo� allows editing grid column values through powerful multi-column selection lists, with type-ahead, and many features like fade-in effects, shadows, and alpha blending where supported by the browser.
Features at a Glance
No-Touch AJAX Control - With zero code, enable AJAX for the grid control to supercharge your users' scrolling, sorting, paging and hierarchical navigation.
Search Engine Optimization (SEO) - By detecting over twenty different crawlers and then generating search engine-friendly HTML output, the WebGrid increases your data's visibility for better search engine rankings.
High Performance - We have optimized our rendering to include as little HTML as possible and leverage industry-standards like CSS to reduce inline styles, plus, you don't need to enable ViewState to execute all of the functionality inherent in our ASP.NET grid control.
Spreadsheet Support - Excel copy and paste along with exporting to (or reading from) Excel makes transferring data a breeze. Column pinning, stationary headers, and row filtering make viewing deep flat and hierarchical data a pleasurable experience.
Client Side Object Model (CSOM) - Manipulate virtually any WebGrid object on the client in JavaScript using the CSOM in conjunction with the grid being an AJAX control capable of creating the richest possible client side experience.
Custom Navigation - Using WebNavBar�, our custom hierarchical data grid navigation control for ASP.NET, you can give your users additional navigation choices not available in standard paging scenarios.
Application Styling - We provide an entire library of style sets with which you can adorn your ASP.NET Web site with a professional look or common functional style (Office 2007, Mac and others). Application Styling can apply coordinated color schemes, creative border solutions, decorative imagery and fonts with as little as one setting, or you can create and share your own with our very intuitive NetAdvantage AppStylist� tool for ASP.NET.
Browser Support - Internet Explorer 6.0 and above, and FireFox 1.0 and above (both Windows and Mac).
Section 508 Compliance - Our ASP.NET grid control is in full compliance with Workforce Investment Act of 1998 Sub-section 508 regarding information access for people with disabilities.
Refrence by : Infragistics
RadGrid for ASP.NET AJAX
RadGrid for ASP.NET AJAX is the fastest and most feature-rich Datagrid for ASP.NET, designed to provide desktop-like user experience with minimum HTML output. RadGrid provides real-time performance as well as almost codeless development experience for a rich variety of features.
Key Features
Codeless Development Experience
Powerful Databinding
Unbeatable Performance
Extensive VS.NET Design-time Support
Hierarchical Grids
Outlook-style Grouping
Rich Data editing controls
Extensive Client-Side Functionality
Exporting Data
Search Engine Optimization
Client-side databinding with LINQ to SQL
Refrence by : telerik
obout ASP.NET Grid
Key Features
Impressive Performance: millions of records in 2 seconds
Rich Design-Time support
ASP.NET AJAX compatible
Cross-browser compatible
Sorting
Simple sorting
Multi-column sorting
Record selection
Single record selection
Multi-record selection
Keeping selected records when chanhing the page
Templates
Templates for displaying data
Templates for Add/Edit controls
Templates for the Filter
Row Templates
Using Scrollbars
Vertical with Fixed Headers
Horizontal
Both
Grouping
Grouping the records
Displaying information for each group
Localization
Localize the Grid to any language
Rich Design-Time Support
Configure data-source
Add/Edit/Delete columns
Configure appearance
Configure general settings
Add/Edit/Delete templates
Browse online resources
Paging
Paging
Manual paging
Customizing number of pages
Customizing page-size selector
Much more
Refrence by : Obout
ASP.NET security
ASP.NET security is mostly concerned with building secured sites that serve up pages only to authorized users. There are certain sites on the net that require login before displaying certain pages. These sites must implement some application level security to identify authorized users. This application-level security is provided using ASP.NET. It works in conjunction with IIS, the .NET platform and the underlying operating system security services.
Whenever a client tries to connect to a website, it has to make a request to the Web Server for a particular page. This request is known as a webrequest. To implement the security at application level, the application needs to take two actions�identify the person who has made the request to the web server and specify who can access which pages.
This action of identifying the caller of web page is known as authentication. Once authentication is done, it is decided which pages the caller can view. This is known as authorization. ASP.NET supports four types of authentication and authorization mechanisms.
:::
�
� But Passport service is not free. If we want to support Passport authentication on our website, we will have to subscribe to it.
Forms Authentication
Form based Authentication is best suited where very high degree of security is not required. We can use our own login form, replacing the default login provided by Windows. In almost all situations we will allow anonymous access to our website, since authentication is done by ASP.NET instead of IIS.
ASP.NET first checks whether there is any authentication cookie present in the request header. If cookie is present, we know that the user is already authenticated and his identity is present in the cookie. Otherwise the user is automatically redirected to our custom login page. The user then presents his login credentials. If the user is authenticated, we place a cookie in the request header and pass it on to ASP.NET other wise access is denied.
Form based authentication is configured in the �web.config� file. The <authentication> section carries information regarding cookies, password formats, list of registered users, etc.
Whenever a client tries to connect to a website, it has to make a request to the Web Server for a particular page. This request is known as a webrequest. To implement the security at application level, the application needs to take two actions�identify the person who has made the request to the web server and specify who can access which pages.
This action of identifying the caller of web page is known as authentication. Once authentication is done, it is decided which pages the caller can view. This is known as authorization. ASP.NET supports four types of authentication and authorization mechanisms.
- Windows authentication
- Passport authentication
- Forms authentication
Let us discuss them one by one.
Windows Authentication
This type of authorization is best suited for intranet applications. A user will be able to access a requested resource only if he has a valid and active account on Windows. Moreover that account needs to have permissions to access the specific resource. This type of authentication is very secured since it uses hash algorithms to encode and decode client�s credentials. However there are a few problems, this type of authentication does not work through most proxy servers, firewalls, and some routers. Hence this technique is not very suitable for Internet applications.
Setting up Windows authentication is simple. Just make the following settings in the �web.config� file of your project.
- Passport authentication
- Forms authentication
Let us discuss them one by one.
Windows Authentication
This type of authorization is best suited for intranet applications. A user will be able to access a requested resource only if he has a valid and active account on Windows. Moreover that account needs to have permissions to access the specific resource. This type of authentication is very secured since it uses hash algorithms to encode and decode client�s credentials. However there are a few problems, this type of authentication does not work through most proxy servers, firewalls, and some routers. Hence this technique is not very suitable for Internet applications.
Setting up Windows authentication is simple. Just make the following settings in the �web.config� file of your project.
These entries ask ASP.NET to use Windows authentication with Identity impersonation for the authentication. Simply doing this will not work if IIS is configured to accept anonymous requests to this website (by default IIS accepts anonymous requests to any Website). To turn off anonymous access to this site, follow the instructions given below.
(a) Start Internet Services Manager from Administrative tools in the Control Panel.
(b) In the IIS, explore the branch with name same as your local machine name.
(c) Explore �Default WebSites�.
(d) Locate the Website we want to authenticate using Windows authentication.
(e) Right click on it and select Properties. Property pages would get displayed.
(f) Select the tab named �Directory Security�
(g) Click on the edit button inside the group box named Anonymous access and authentication control
(h) In the following dialog, uncheck Anonymous access check box. Make sure Integrated Windows Authentication check box
is checked.
(i) Click OK to dismiss the dialogs.
This process will force IIS to pop up Windows authentication dialog before displaying the web page requested.
(b) In the IIS, explore the branch with name same as your local machine name.
(c) Explore �Default WebSites�.
(d) Locate the Website we want to authenticate using Windows authentication.
(e) Right click on it and select Properties. Property pages would get displayed.
(f) Select the tab named �Directory Security�
(g) Click on the edit button inside the group box named Anonymous access and authentication control
(h) In the following dialog, uncheck Anonymous access check box. Make sure Integrated Windows Authentication check box
is checked.
(i) Click OK to dismiss the dialogs.
This process will force IIS to pop up Windows authentication dialog before displaying the web page requested.
This can be done programmatically by modifying the section of the web.config file. Make the following changes to the authentication section
:::
:::
We instruct IIS to not to allow any users without proper authentication. The tag deny users=�?� will stop all unauthenticated users from accessing the website.
Passport Authentication
Passport authentication is a service provided by Microsoft. This service allows us to implement single SignIn for multiple applications or Websites that want to authenticate users. The user is expected to use only one user name and password to access all the sites more over, the user need not re-SignIn whenever he switches from one site to another (provided both sites support Passport authentication). For example, if site1.com and site2.com both support passport authentication, then if a user visits site1.com, sign in the site and then decide to visit site2.com, you will be automatically authenticated on the basis of the credentials you presented at site1.com. This is possible because whenever you sign into a Passport service supporting site, the service creates a secure cookie into our machine. Later when we visit another Passport supporting site, our browser presents this cookie. This cookie indicates that we have already been authenticated and no new authentication is required. To setup Passport authentication, following configuration needs to be added to the �web.config� file.
Passport Authentication
Passport authentication is a service provided by Microsoft. This service allows us to implement single SignIn for multiple applications or Websites that want to authenticate users. The user is expected to use only one user name and password to access all the sites more over, the user need not re-SignIn whenever he switches from one site to another (provided both sites support Passport authentication). For example, if site1.com and site2.com both support passport authentication, then if a user visits site1.com, sign in the site and then decide to visit site2.com, you will be automatically authenticated on the basis of the credentials you presented at site1.com. This is possible because whenever you sign into a Passport service supporting site, the service creates a secure cookie into our machine. Later when we visit another Passport supporting site, our browser presents this cookie. This cookie indicates that we have already been authenticated and no new authentication is required. To setup Passport authentication, following configuration needs to be added to the �web.config� file.
�
�
�
�
�
Forms Authentication
Form based Authentication is best suited where very high degree of security is not required. We can use our own login form, replacing the default login provided by Windows. In almost all situations we will allow anonymous access to our website, since authentication is done by ASP.NET instead of IIS.
ASP.NET first checks whether there is any authentication cookie present in the request header. If cookie is present, we know that the user is already authenticated and his identity is present in the cookie. Otherwise the user is automatically redirected to our custom login page. The user then presents his login credentials. If the user is authenticated, we place a cookie in the request header and pass it on to ASP.NET other wise access is denied.
Form based authentication is configured in the �web.config� file. The <authentication> section carries information regarding cookies, password formats, list of registered users, etc.
Saturday, 21 June 2008
Array
Que:- Can you store multiple data types in System.Array?
Ans:- No.
Que:- What�s the difference between the System.Array.CopyTo() and System.Array.Clone()?
Ans:- The first one performs a deep copy of the array, the second one is shallow.
Ans:- No.
Que:- What�s the difference between the System.Array.CopyTo() and System.Array.Clone()?
Ans:- The first one performs a deep copy of the array, the second one is shallow.
Thursday, 17 January 2008
Differences between Server-side and Client-side code?
Server side code executes on the server. For this to occur page has to be submitted or posted back. Events fired by the controls are executed on the server. Client side code executes in the browser of the client without submitting the page.
e.g. In ASP.NET for web controls like asp: button the click event of the button is executed on the server hence the event handler for the same in a part of the code-behind (server-side code). Along the server-side code events one can also attach client side events which are executed in the client�s browser i.e. javascript events.
e.g. In ASP.NET for web controls like asp: button the click event of the button is executed on the server hence the event handler for the same in a part of the code-behind (server-side code). Along the server-side code events one can also attach client side events which are executed in the client�s browser i.e. javascript events.
Subscribe to:
Posts (Atom)