Thursday, March 12, 2015

Scnario based questions

1. 10 resources keep on logging and checking any file is came into system then he can download and update the system. We need to automate and provide architecture.

batch program and scheduled

2.password encrypt using SHA1, MD5 using round rabin.
design the object, send the server , password and sha1.

3.One employee resign how to intimate the payroll? 

Tuesday, July 1, 2014

Project Manager

1. Cost estimation
2.Scope Management
3.Knowledge key areas.
4.Conflict Management
5.Who will you find out stake holders?
Stake holder analysis,meetings and expert judgement
6.Developer effort estimation.
7.Risk Management?
8.What are the achievements?
9.Roles and responsibilities?
10.What are the project metrics you are following?

Friday, June 27, 2014

VB.Net

1.What is Auto Event wire up ?
Asp.Net pages automatically bind page events to methods that have the name Page_events. This is automatically binding is configured by the Auto Event wireup attribute in the @ page directive, which is set to true by default in C3. If you set Auto event wire up to false the page doesn't automatically search for methods that use the page_events
Auto Event wire up=false and c# auto event wire up=true.

2.What is the process?
Process is set of tasks running application.

3.Tell type of assemblies?
1.Shared, 2.Private 3.Satellite assembly. 

 

Saturday, July 13, 2013

JQuery

http://www.codeproject.com/Articles/618484/Latest-jQuery-interview-questions-and-answers

1.Replace?
$( "div.third" ).replaceWith( $( ".first" ) );
2.How to maintain the sessions in JQuery?
$.session.set("compareLeftContent","value"); alert($.session.get("compareLeftContent"));
2. Jquery vs AngularJS

RestFul API will not support Jquery
MVC pattern support. AngularJS
Twoway data binding
Form validation
Localization

MCV3 Interview questions


http://www.dotnet-tricks.com/Home/MVCInterviewBook

http://www.codeproject.com/Articles/556995/Model-view-controller-MVC-Interview-questions-and#How_to_implement_windows_authentication_for_MVC

http://www.dotnet-tricks.com/Tutorial/mvc/LYHK270114-Detailed-ASP.NET-MVC-Pipeline.html

http://www.codeproject.com/Articles/741228/MVC-Application-Lifecycle

1.Action filters?



  • OutputCache – This action filter caches the output of a controller action for a specified amount of time.
  • HandleError – This action filter handles errors raised when a controller action executes.
  • Authorize – This action filter enables you to restrict access to a particular user or role.

  • The Different Types of Filters

    The ASP.NET MVC framework supports four different types of filters:
    1. Authorization filters – Implements the IAuthorizationFilter attribute.
    2. Action filters – Implements the IActionFilter attribute.
    3. Result filters(response fileters) – Implements the IResultFilter attribute.
    4. Exception filters – Implements the IExceptionFilter attribute.
    2.Advantages of Unity?

    1. It provides simplified object creation, especially for hierarchical object structures and dependencies, which simplifies application code. It contains a mechanism for building (or assembling) instances of objects, which may contain other dependent object instances.
    2. It supports abstraction of requirements; this allows developers to specify dependencies at run time or in configuration and simplify the management of cross-cutting concerns.
    3. It increases flexibility by deferring component configuration to the container. It also supports a hierarchy for containers.
    4. It has a service location capability, which is useful in many scenarios where an application makes repeated use of components that decouple and centralize functionality.
    5. It allows clients to store or cache the container. This is especially useful in ASP.NET Web applications where developers can persist the container in the ASP.NET session or application.
    6. It has an interception capability, which allows developers to add functionality to existing components by creating and using handlers that are executed before a method or property call reaches the target component, and again as the calls returns.
    7. It can read configuration information from standard configuration systems, such as XML files, and use it to configure the container.
    8. It makes no demands on the object class definition. There is no requirement to apply attributes to classes (except when using property or method call injection), and there are no limitations on the class declaration.
    9. It supports custom container extensions that you can implement; for example, you can implement methods to allow additional object construction and container features, such as caching.
    10. It allows architects and developers to more easily implement common design patterns often found in modern applications.


    3.Life cycle of MVC3?




    Request -->Routing --> Handler -->Controller --> Action --> View --> Response

    4.Http module?

    Http handler in asp.net, mvc handler in mvc
    ASP.NET MVC has action filters, while ASP.NET has HTTP modules.

    5.How to deploy the MVC application?

    http://forums.asp.net/t/1748670.aspx?Deploy+MVC+3+application+into+IIS+7

    6.

    Explain attribute based routing in MVC?

    This is a feature introduced in MVC 5. By using the "Route" attribute we can define the URL structure. For example in the below code we have decorated the "GotoAbout" action with the route attribute. The route attribute says that the "GotoAbout" can be invoked using the URL structure "Users/about".
    public class HomeController : Controller
    {
           [Route("Users/about")]
           public ActionResult GotoAbout()
           {
               return View();
           }
    }

    7.

    How can we maintain sessions in MVC?

    Sessions can be maintained in MVC by three ways: tempdata, viewdata, and viewbag.

    8 Restful services?
    RESTful architecture use HTTP for all CRUD operations like (Read/Create/Update/Delete) using simple HTTP verbs like (GET, POST, PUT, and DELETE).It’s simple as well as lightweight. 

    9. difference between mvc3,mvc4 and mvc5?


    10. asp.net and mvc3

    Asp.Net Web Forms
    Asp.Net MVC

    Asp.Net Web Form follow a traditional event driven development model.
    Asp.Net MVC is a lightweight and follow MVC (Model, View, Controller) pattern based development model.

    Asp.Net Web Form has server controls.
    Asp.Net MVC has html helpers.

    Asp.Net Web Form supports view state for state management at client side.
    Asp.Net MVC does not support view state.

    Asp.Net Web Form has file-based URLs means file name exist in the URLs must have its physically existence.
    Asp.Net MVC has route-based URLs means URLs are divided into controllers and actions and moreover it is based on controller not on physical file.

    Asp.Net Web Form follows Web Forms Syntax
    Asp.Net MVC follow customizable syntax (Razor as default)

    In Asp.Net Web Form, Web Forms(ASPX) i.e. views are tightly coupled to Code behind(ASPX.CS) i.e. logic.
    In Asp.Net MVC, Views and logic are kept separately.

    Asp.Net Web Form has Master Pages for consistent look and feels.
    Asp.Net MVC has Layouts for consistent look and feels.

    Asp.Net Web Form has User Controls for code re-usability.
    Asp.Net MVC has Partial Views for code re-usability.

    Asp.Net Web Form has built-in data controls and best for rapid development with powerful data access.
    Asp.Net MVC is lightweight, provide full control over markup and support many features that allow fast & agile development. Hence it is best for developing interactive web application with latest web standards.

    Asp.Net Web Form is not Open Source.
    Asp.Net Web MVC is an Open Source.

    11.Maximum how many parameters we can pass in mvc?
    I suspect that there is no limit on the number of arguments - your main limitation wouild be the maximum HTML request/header lengths imposed by both the browser and server.

    we can change path segment length setting UrlSegmentMaxLength in regedit.

    12. Views and forms in MVC?
    Each view having multiple forms.
    http://stackoverflow.com/questions/15788806/asp-net-mvc-4-multiple-post-via-different-forms

     13 MVC attributes?

    14.Request processing?
    Incoming request->Parse URL->find matching Route->Process request

    15. Server side binding dropdownlist in MVC?

    http://www.c-sharpcorner.com/UploadFile/3d39b4/dropdownlist-in-Asp-Net-mvc/


    @Html.DropDownList("Action", PathToController.GetUsers())
    then on the controller where you want to put this method
    public static List<SelectListItem> GetUsers(){
        List<SelectListItem> ls = new List<SelectListItem>();
        var result = //database call here
        foreach(var temp in result){
            ls.Add(new SelectListItem() { Text = temp.Name, Value = temp.ID });
        }
        return ls;
    }
    16. Overriding the Routing?
     
    public class HomeController : Controller
    {
           [Route("Users/about")]
           public ActionResult Aboutgo()
           {
               ViewBag.Message = "You successfully reached USERS/About route";
               return View();
           }
    }
    17.How many forms we can use in view of mvc?
    Yes we can have multiple forms inside one view.
    
    
    18.What is model ,view and control?
    MVC: View renders the data from model in response to the request made to the model by controlled events made by user interaction.
    Controller :Controller responds to events to command model and view to  change. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display
    Model is accessible by both controller and view
    Model can be used to pass data from controller to view
    View can be use model to display the data in page.
    View is an ASPX page without having code behind file.
    A request to view can be made only from a controller’s action method
    Controller can access  and use model class to pass data to views
    19.MVC 3 life cycle.
    20.What does Model, View and Controller represent in an MVC application?
    Model: Model represents the application data domain. In short the applications business logic is contained with in the model.
    View: Views represent the user interface, with which the end users interact. In short the all the user interface logic is contained with in the UI.
    Controller: Controller is the component that responds to user actions. Based on the user actions, the respective controller, work with the model, and selects a view to render that displays the user interface. The user input logic is contained with in the controller.
    21.Modal Binding?
    MVC Modal binding allows you to map http request data with a modal.
    MVC runtime uses default model binder to build the parameters
    Model binding implicitely goes to work when you have an action parameter
    Model binding can be explicitely invoke using updatemodel and tryupdatemodel methods

    Tuesday, May 7, 2013

    Web Services & WCF

    1.What is Service behavior?


    •The Service Behavior defines how the endpoint interacts with clients. Attributes like security, concurrency, caching, logging, etc. - those are all part of the behavior.

    2.How do you overload in WCF

    [OperationContract(Name = "GetIntegerData")]
    string GetData(int value);


    [OperationContract(Name = "GetStringData")]
    string GetData(string value);

    3.WCF concurrency modes?

    1.Single
    2.Multiple
    3.Reentraint


    WCF throttling helps you to put an upper limit on the number of concurrent calls, WCF instances, and concurrent sessions. WCF provides three ways by which you can define upper limits: MaxConcurrentCalls, MaxConcurrentInstances, and MaxConcurrentSessions.

    Below is a simple table which shows the default settings for throttling for different WCF versions:

    MaxConcurrentSessionsMaxConcurrentCalls MaxConcurrentInstances 
    WCF 3.0 / 3.562610
    WCF 4.016 * processorcount MaxConcurrentCallsMaxConcurrentCalls
    +
    MaxConcurrentSessions 100 * processorcount


    100 * processorcount


    4. What is the difference between WCF and ASMX Web Services?

    Simple and basic difference is that ASMX or ASP.NET web service is designed to send and receive messages using SOAP over HTTP only.

    While WCF can exchange messages using any format (SOAP is default) over any transport protocol (HTTP, TCP/IP, MSMQ, NamedPipes etc).

    5.What are the possible ways of hosting a WCF service? Explain?

    For a Windows Communication Foundation service to host, we need at least a managed process, a ServiceHost instance and an Endpoint configured. Possible approaches for hosting a service are:
    1. Hosting in a Managed Application/ Self Hosting
      1. Console Application
      2. Windows Application
      3. Windows Service
    2. Hosting on Web Server
      1. IIS 6.0 (ASP.NET Application supports only HTTP)
      2. Windows Process Activation Service (WAS) i.e. IIS 7.0 supports HTTP, TCP, NamedPipes, MSMQ.
    6. What is WSDL and Disco files? 
    WSDL is specification defining how to describe web service in a common XML grammar.
    a) Interface information describing all publicly available functions.
    b) Data type information for all messages requests and message responses.
    c) Binding information about the transport protocol to be used.
    d) Address information for locating the specified service web service transport protocol HTTP,SMTP,FTP
    XML Messaging protocol-Encodes message in a common XML ,SOAP
    (service) Description protocol: used to describe the public interfaces to a specific web service.
    (service) Discovery protocol:
    In most cases the protocol used in SOAP.
    7.What is remoting?

    In brief, .NET remoting is an architecture which enables communication between different application domains or processes using different transportation protocols, serialization formats, object lifetime schemes, and modes of object creation. Remote means any object which executes outside the application domain. The two processes can exist on the same computer or on two computers connected by a LAN or the Internet. This is called marshalling (This is the process of passing parameters from one context to another.), and there are two basic ways to marshal an object:

    Marshal by value: the server creates a copy of the object passes the copy to the client.

    Marshal by reference: the client creates a proxy for the object and then uses the proxy to access the object.

    protocols used in remoting http and tcp
    wcf along with named pipes and msmg

    wcf is faster than remoting

    8.WCF Security?

    Transport Security Mode Authentication Options

    The follow authentication options are available when using transport security mode:
    • None. When using this option, the WCF service does not authenticate the callers. This is not the recommended option from a security perspective–avoid using this option wherever possible.
    • Basic. This option is available with the HTTP protocol only. The client is authenticated using the username and password against Active Directory. The client credentials are transported using the Base64 encode string, which is literally like a clear string and therefore is not the most secure option. The service is authenticated by the SSL certificate used for secure communication.
    • NTLM. This option is available with the HTTP protocol only. The client is authenticated using a challenge-response scheme against Windows accounts. The NTLM option is well suited for a workgroup environment. NTLM authentication is more secure than either Digest or Basic authentication. The service is authenticated using the Windows credentials of the process identity or using an SSL certificate if you are using the HTTP protocol.
    • Windows. The Windows option tells the WCF service to use Kerberos when in a domain, or NTLM when deployed in a workgroup environment. This option uses a Windows token presented by the caller to authenticate against Active Directory. This is the most secure option compared to Basic, Digest, or NTLM authentication. The service is authenticated using the Windows credentials of the process identity or an SSL certificate if you are using the HTTP protocol.
    • Certificate. When using this option, the caller presents an X.509 client certificate that the WCF service either validates with peer trust or trusts based on the issuer of the certificate. This option should be used when Windows authentication is not possible, as in the case of business-to-business (B2B) scenarios. The service is authenticated with the service certificate or by using an SSL certificate if you are using the HTTP protocol.

    Message Security Mode Authentication Options

    The follow authentication options are available when using message security mode:
    • None. When using this option, the WCF service does not authenticate the callers. This is not the recommended option from a security perspective–avoid using this option wherever possible.
    • Windows. When using this option, the WCF service uses Kerberos when in a domain, or NTLM when deployed in a workgroup environment. This option uses the Windows token presented by the caller in order to authenticate against the Active Directory. The service is authenticated using the Windows credentials of the process identity.
    • Username. When using this option, the caller provides the username and password to the service. The service can authenticate against Windows, use membership providers such as SqlMembershipProvider, or use a custom validator to validate against the custom store. You should choose this option only when Windows authentication is not possible. The service is authenticated with a service certificate.
    • Certificate. When using this option, the caller presents an X.509 client certificate; the WCF service then looks up the certificate information on the host side and either validates it (peer trust) or trusts the issuer (chain trust) of the client certificate. This option should be used when Windows authentication is not possible, or in B2B scenarios. Service is authenticated with a service certificate.
    • Issue token. When using this option, the client and service depend on a secure token service (STS) to issue tokens that the client and service trusts. Microsoft Windows CardSpace™ is a typical example of an STS.
    9. WCF Binding?

    For example, you should go for basicHttpBinding or wsHttpBinding, if interoperability is your concern and you need to communicate with non-WCF systems. In some case, your service can reside on a single system, In such scenario netNamedPipeBinding will be the most efficient option. netTcpBinding or netPeerTcpBinding might be best options, if you need to communicate across multiple computers.And if the service needs support for disconnected or queued calls, netMsmqBinding or msmqIntegrationBinding will be the candidate options.

    10. WCF?

    http://www.codemag.com/article/0611051

    11.What are the protocols used in web service?

    1.XML
    2.SOAP,
    3.JSON
    4.REST.

    12. What is the difference between POST and PUT?

    POST-Used to modify and update a resource

    PUT-Used to create a resource, or overwrite it. While you specify the resources new URL.

    13. What are the endpoints?
    A Service Endpoint has an Address, a Binding, and a Contract.

    14.Huge data we need to transfer which protocol we need to use?
    using basichttpbinding by streaming.NetTcpBinding, and NetNamedPipeBinding

    15. Difference between wcf service and web services?

    Features Web Service WCF
    Hosting It can be hosted in IIS It can be hosted in IIS, windows activation service, Self-hosting, Windows service
    Programming [WebService] attribute has to be added to the class [ServiceContraact] attribute has to be added to the class
    Model [WebMethod] attribute represents the method exposed to client [OperationContract] attribute represents the method exposed to client
    Operation One-way, Request- Response are the different operations supported in web service One-Way, Request-Response, Duplex are different type of operations supported in WCF
    XML System.Xml.serialization name space is used for serialization System.Runtime.Serialization namespace is used for serialization
    Encoding XML 1.0, MTOM(Message Transmission Optimization Mechanism), DIME, Custom XML 1.0, MTOM, Binary, Custom
    Transports Can be accessed through HTTP, TCP, Custom Can be accessed through HTTP, TCP, Named pipes, MSMQ,P2P, Custom
    Protocols Security Security, Reliable messaging, Transactions