. NET Interview Basics

Source: Internet
Author: User
Tags soap ticket what is asp

1.    What is ASP. A: ASP. NET is a dynamic Web development technology that is based on the codebehind, which uses the code behind technology to effectively separate the foreground rendering from the background code.  2.    What is WebService? A: WebService is a cross-platform distributed technology that uses XML format data to pass through the firewall (because it is a 80 port) using the SOAP protocol.  3.    What is the difference between ASP and ASP? A: ASP is not just a simple upgrade version of ASP, but it uses the VBScript language for development, and ASP. ASP uses the C #, vb.net, and other languages to develop it; ASPs use Innercode (code built-in) technology, While ASP. ASP is an interpretive programming framework that is executed at the side of the interpretation, the execution is inefficient, and the ASP. NET is a compiled framework, and the server runs on the compiled code, once for a lifetime, so it is more efficient to execute.  4.    The life cycle of an ASP page? A: Object initialization-page_init        Load view state data-loadviewstate        process callback data-loadpostdata       Object loading---page_load        triggering raisepostdatachanged events       handling client backhaul events- raisepostbackevent      Object pre-rendering-page_prerender      Saving view state-saveviewstate      Rendering html-page_render      release-unload 5.    ASP. NET life cycle (operating mechanism)? A: 1. Access 2.IIS via URL request to ASPNETISAPI.dll execution 3.aaspnetisapi.dll pass the pipeline to the worker process 4.Asp. NET generate HTML and other code return Web server (IIs) 5.IIS returns HTML to the user response browser  6.    application, Session, Cookie in ASP. ViewState difference? A: Because the HTTP protocol is a stateless access protocol, it is not possible to record the state of a user, so you need to use Application, Session, Cookie, viewstate, etc. to record the status. Application is a global variable, exists on the server side, the entire application is valid, used to record the entire, application process information; session and Cookie are global session-level variables used to record session information. The server side of the session, the server pressure is relatively large, and the cookie has a client, the server pressure is relatively small; the session stores a large amount of data and is quite secure, while the cookie is stored on the client, the amount of data is small; ViewState is page-level, Used to store the state of the control on the page, the same page is valid  7.    how does ASP. A: Windows Authentication, form authentication (form authentication), Passport authentication, none certification  1.    What is Ajax? What are the common Ajax frameworks? A: Ajax is not a language, it is a multi-language combination of a technology; Ajax is asynchronous JavaScript and XML, it uses XMLHttpRequest objects in JavaScript for data transfer, using DOM and CSS to render, The format for passing data is in XML format and JOSN format. Common AJAX frameworks include: Prototype, JQuery, Ext-js, MooTools, Yui, Dojo, GWT, and more.  2.    What is the difference between JavaScript and jquery? A: jquery is a JavaScript framework that uses the JavaScript language, which is the JavaScript class library.  3.    ASP (Form authentication) principle and configuration process? A: The principle of asp: When a user logs on to a Web site with a user name and password, the formauthentication (form validation mechanism) creates an authenticated ticket (Ticket) that verifies that the user has access to it. Configuration process: In the Web. config file in the project <Under the System.web> node, set properties Mode= "Forms" in <authentication>, and then configure nodes <forms> node properties. You also need to configure user access permissions in the <authorization> node. How can page permissions be used to inherit page mode or pipe configuration (httpmodule)  4.    ASP. How many ways to store session state? A: There are 5 configurations in the <sessionState> node in Web. config, namely: Custom, InProc, OFF, SQL Server, StateServer. Custom is the meaning of the client, that is, the sessionstate state exists in the client, that is, stored in a cookie, off that is to shut down the storage state, InProc is to store the session information in the process of IIS, when IIS shut down or restart, This information will disappear. The biggest benefit of this model is the highest performance, the fastest, but not the ability to store shares across multiple servers. SessionState mode in this way. SQL Server is storing the information about the session of the servers in SQL, which needs to start the Agent service (SQL Server Agent) Executing a footstep file called InstallSqlState.sql in SQL Server creates a database dedicated to storing session information. This method of storage is characterized by the ability to maintain information about user sessions across servers, without loss of information, but with a large workload. StateServer is the session information stored outside the process, not only can store information in the local process, but also the information stored on other servers (need to configure the corresponding parameters in stateConnectionString, and start the ASP. NET State Services service on the storage server. This approach is characterized by the need to maintain user session information across servers, and once the storage state server fails, the information will be lost.  5.    What is LINQ? A: LINQ is the abbreviation for (Language Integrated query), a language-level integrated query that can use a SQL-like syntax to query any form of data with LINQ technology. There are currently LINQ to SQL, LINQ to Datasets, LINQ to XML, and so on.  1.  &NBsp How to be in. NET project Call Web service? Answer: In. NET can use the built-in type Web service and the WebMethod feature to implement Web service, in ASP. Add a new Web reference, enter the address of its corresponding Web service, and complete the call to the Web service.  2.    What is asynchronous request Web service? A: (due to processing speed and network transmission speed and so on, will use a webservice from the start of the request to get response results between waiting for a period of time, the thread will be in a blocking state, the program will wait for the result of the request that the client cannot do other actions or processing, This is the time to use WebService asynchronously. The asynchronous invocation is actually the process of executing the caller's thread in parallel with the thread that is executing the call. The method called in ASP. WebService uses the method name +async () as the method name of the asynchronous call. The invoked. aspx page sets a property that allows asynchronous invocation of async= "true".  3.    How do I cache Web service data? A: Setting the bufferresponse of the WebMethod attribute to true will serialize the response of the Web service method into the cache of memory until the response is fully serialized or the buffer is full, thus enabling caching of the Web service. What is the transaction processing for  4.    WEB service? A: When using transactions, System.EnterpriseServices.dll is referenced first, and then TransactionOption can be used. The WEB service supports 5 levels for transactional processing: Disabled, notsupported, support, required, and requiresnew. Disabled, which means that the Web service method does not run within the scope of the transaction, and when the request is processed, the Web service method is executed without a transaction. NotSupported, a Web service method that does not run within the scope of a transaction, executes the method of a Web service without a transaction when the request is processed. Support, which refers to a Web service method that is not running within a transaction scope, creates a Web service without a transaction when the request is processed. Required, refers to a Web service method that requires transactions due to web servThe ice method can only participate in transactions as a root object, so a new transaction is created for the Web service method. RequiresNew, the Web service method requires a new transaction, and when the request is processed, a Web service is created within the new transaction.  5.    WEB service security mechanisms? A: Web service security follows the principles of the ASP. NET security mechanism, such as Windows, forms authentication, and so on. You can configure SSL on a Web service server to use the SOAP header to customize the identity can be set on IIS or in the program IP address can be an electronic certificate, CA certification  6.    Have you ever used a Web service? What is the use of Web service? A: Used, the Web service can do the system API interface, you can integrate different platforms, Ajax can be called. (The following are different people, just a case, such as e-commerce-the webservice used by the supplier interface to provide the product data required by the supplier)  1.    What is a process? What is a thread? What is the difference between a process and a thread? A: A process is a program activity entity with independent functionality, in fact an application is a process. A thread is the smallest unit of execution, or an entity, which is the basic unit of dispatch and dispatch by the system independently, and a process contains multiple threads. The difference between a process and a thread is that the child process and the parent process have different code and data spaces, while multiple threads share the data space, and each thread has its own stack and program counter for its execution context. Multithreading is mainly to balance the use of CPU time, at the same time reasonable allocation of resources used by each thread, to avoid simultaneous running of multiple threads of the program when there is a program waiting or suspended animation phenomenon.  2.    What is multithreading? What is Hyper-threading? A: Multithreading is a separate process execution unit, divided into a number of different threads to execute, when a thread in the handler for a logical unit, another thread can also handle other logical units, and when the first thread is temporarily idle, other threads can continue to process the logical unit. Multithreading technology can be used to support multi-threaded operating system and software, effectively enhance the processor in the multitasking, multithreading aspects of processing power. The advantage of multithreading is that it can improve CPU utilization. Hyper-Threading, a new technology released by Intel in 2002, is actually using special hardware instructions to simulate two logical cores inside a multithreaded processor into two physical chips, enabling a single processor to "enjoy" the processor technology of thread-level parallel computing.  3.&nbsp   What is reflection? Answer: Reflection is. NET, which implements the ability to rely on metadata, review metadata, and gather information about its type. Metadata details the structure within an assembly or module, the type of reference and the assembly and manifest, and so on.  4.    What is a heap? What is a stack? The difference between heap and stack? A: The heap is allocated from the top down, so the space is used below the free space. All reference type objects in C # are allocated in the managed heap, the managed heap is continuously allocated in memory, and the release of the memory objects is managed by the garbage collection mechanism, which is much less efficient than the stack. Stacks, also known as stacks, are actually populated from top to bottom, that is, a high memory address points to a low memory address population, and the stack's allocations are contiguous. All of the value type objects in C # and references to reference type objects are allocated in the stack, and the stack allocates and frees memory objects, in turn, based on the advanced post-out principle of the object. The stack allocates memory based on a pointer to the tail of the stack and performs more efficiently. The difference: The heap is allocated from the bottom up, so the space is used below the free space. The stack is actually populated from top to bottom. The execution efficiency of the heap is much lower than the stack. In C #, the stack is self-sustaining, and the memory management of the stack can be done through the operating system. and heap management requires a GC to do it.  5.    What deadlock? A: Deadlock refers to two or more than two processes in the execution process, because of the competition for resources caused by a mutual waiting phenomenon, if there is no external force, they will not be able to proceed. At this point the system is in a deadlock state or the system generates a deadlock, and these processes, which are always mutually equal, are called deadlocks. (Simply put, it is a wait for the state of B is B1 to set the state to A1, while B waits for a's state to be A1 when the state is set to B1, this logic is generally in multithreaded programming, and multi-thread sharing the same resource when it occurs.  1.    Please describe the use and characteristics of the queue. A: Queue, queues, this collection is characterized by FIFO, generally used for processing mail queues, you can use server resources in a balanced manner, to avoid the same time when a large number of messages sent, the server is slow or even lost mail. Message Queuing is the use of this principle.  2.    Please describe the use and characteristics of stack. A: Stack, stack, this set is characterized by advanced post-out principle. The first data is pushed into the bottom of the stack, and the final data is ejected from the top of the stack when the data is read.  3.    How to control in the program. NET's thread pool? Answer: In. NET Framework, for each process to provide a thread pool, a thread pool has several waiting operation state, when a wait operationUpon completion, the worker thread in the thread pool executes the callback function. Multithreaded programming is often associated with user-interface-based applications that need to perform time-consuming operations without impacting the end user. In a. NET environment, the thread pool's control is passed to QueueUserWorkItem through the ThreadPoolCallback () method, and an available thread is assigned to execute this method.  4.    Explain concurrency in multiple threads? A: Concurrent execution in multithreaded programming does not execute CPUs at the same time, and only one thread can occupy the CPU at any given time. Just because the CPU switching frequency between multiple threads is faster, the feeling is that the multi-threaded running at the same time.  5.    What is a delegate? What is an event? A: A delegate is similar to a function pointer in C + +, but more secure than a pointer, the delegate uses the keyword delegate definition, and the delegate requires that the type and argument list of the passing method be consistent with the delegate. The event is. NET programmers often use a mechanism in which an event is a member of an object or class that can provide notification, and the client can add executable code to the corresponding event by providing an event handler that can be understood as a special delegate.  6.    What is a multicast delegate? A: A multicast delegate is a linked list that is chained to a delegate, and when a delegate on the list is called back, subsequent delegates to that delegate on all the linked lists are executed sequentially. Note, however, that the multicast delegate must be of the same type, the return value type must be void, and the output parameter cannot be taken. What is the difference between  7.    class and structure? A: Structs are value types, and classes are reference types; structs cannot be inherited, and classes can be inherited; structs have no default constructors, no destructors, and cannot have protected modifiers, but they can be initialized without using new. The class has a default constructor, there is a destructor, you can use the protected modifier, and you must initialize it with new.  8.    Please describe the characteristics of static class construction methods in C #. A: There are 4 main features of static class construction methods in C #:1.    Only allow one parameterless static constructor to exist in a class 2.    static construction methods are not inherited 3.    Static construction methods are executed before all static members are referenced 4.    is first executed in all constructor methods the static constructor method is the most important characteristic: the static construction method is the newest constructed method, and only one non-parametric static is allowed in a class.Construction method.  1.    Briefly describe the constructors in C # derived classes? A: There are two types of inheritance in C #, one is stealth inheritance, and one is display inheritance. When a derived class inherits a base class, the derived constructor can inherit the default parameterless constructor without naming the constructor that inherits that base class. Derived classes can also specify a constructor that inherits the base class through the keyword base, which is the display inheritance.  2.    What is. Private assemblies in the net? A: A private assembly is a relatively simple type of assembly. Private assemblies are typically shipped with some software and can only be used in the software. When programmers use such assemblies in other client applications, they simply need to add a reference to make the call.  3.    What is. Shared Assemblies in net? A: Shared assemblies provide the ability for multiple application domains to access the same assembly, where only the same copy of the assembly exists in memory, and this non-domain-specific code share can greatly conserve memory resources.  4.    What is unit testing? What is automated testing? What is a performance test? A)     unit testing: is the lowest level of test activity to be performed during the software development process and is a test for the smallest testable software element. b)     Automated Testing: a process of converting human-driven test behavior to machine execution C)     Performance testing: An important reference for software development, Performance testing typically uses a number of automated test tools to simulate the various volt conditions in a software operation to test the system's performance indicators. Performance tests include the difference between a load test and a stress test  5.    class and interface? A)     classes and interfaces are reference types, classes use the keyword class definition, interfaces use interface definitions, B)     classes have default constructors, and interfaces do not; c)     classes can have variables, attributes , methods, indexes, delegates, and so on, while interfaces cannot define variables; d) the variable attributes defined in the     class can be decorated with an access modifier, and any content in the interface cannot have an access modifier, and the content defined in the interface cannot have an implementation body; e)     Classes and interfaces are inherited, but because C # is a single-inheritance mechanism, a class can inherit only one class, but multiple interfaces may be implemented; f)     Interfaces can inherit multiple interfaces, and the inheritance of interfaces is transitive. 6.  &nbsP What is the difference between an interface and an abstract class? A) The concept of     is different, abstract class is a kind of high aggregation of things, interface is defined behavior Specification B)     abstract class when defining a type method, can give the implementation part of the method, or can not be given, and for the interface, None of the methods defined here can give the implementation part. c)     Inheritance classes have different implementations of the methods involved. The abstract method that the inheriting class defines for the abstract class can be used without rewriting, that is to say, the method of the abstract class can be used, and for the method or property defined by the interface class, the corresponding method and property must be implemented in the inheriting class. d)     in an abstract class, a new method can be used without any processing in the inheriting class, and for the interface it is necessary to modify the inheriting class to provide the newly defined method.  7.    The role of ref and out and the use difference? A: Ref and out are passed by converting a value method to a reference, that is, Passbyvalue is converted to passbyreference. Ref focuses on input, requires initialization when used, out focuses on output, without initialization.  1.    What is the Richter replacement principle? A: The Richter substitution principle occurs after the inheritance relationship, its subclass object can replace the parent class object, but its parent class object cannot replace the subclass object . 2.    What is a property? What is an attribute? The difference between the two? A)     properties: Properties are the basic concept of object-oriented programming, providing access to private fields Encapsulation B)     features: The common language runtime allows to add similar keywords to the description declaration, called attributes, which labels the elements in the program, such as types, fields, methods, and properties, etc. c)     differences: attributes are used to modify the static behavior of a class from the point of view of the design class, and the attribute is used for programming or run-time information, such as the WebMethod feature in WebService.  3.    What is an iterator? What interfaces do I need to inherit? A)     iterator mode (Iterator), which provides a way to sequentially access individual elements in an aggregated object without exposing the representation inside the object. Iterators provide a unified interface for traversing different aggregation structures, such as start, next, end, current, and so on. b)     need to inherit the IEnumerable interface and implement all the methods inside it  4.  &nbsP What is overloading? What is rewriting? What is the difference between overloading and rewriting? A: Overloading is overload, under the same class, the method name is the same, the parameter list is different, the return type can be different, only the argument list is different, not overloaded. Overrides are override, which occurs after an inheritance relationship, in which the subclass overrides an abstract or virtual method of the parent class. The difference: The overload is under the same class, the purpose is to facilitate the developer to manage the method of the class, but also convenient for callers to call; overrides occur after the inheritance relationship in order to be polymorphic.  5.    What is a static method? What is an instance method? What is the difference between a static method and an instance method? A: A static method is a method that uses the static modification, and the life cycle is the existence of the program running. An instance method is a method called an instance method that uses an instance object. The difference is: a)     static method uses static modification, while instance method does not need; b)     static method is called with class name, and instance method uses instance object invocation; c)     static method does not have direct access to instance members , while instance methods can access the instance members directly, static methods and instance methods can access static members, and D)     static method calls before initialization, and instance methods are initialized when the object is instantiated.  6.    What is a value type? What is a reference type? The difference between the two? A: Value type is stored in the stack, such as: int, enum, struct, etc., the reference type is to store the data in the heap, the address is stored in the stack, such as: Class, String, interface, etc., the difference is: a)     Data of value types are stored in the stack, data for reference types is stored in the heap, b) data reads for     value types are fast, while data for reference types is slow; c)     value types represent actual data, Whereas a reference type represents an address or pointer to data in memory, D)     value types inherit from System.ValueType, whereas reference types inherit from System.object;e)     value type data is automatically released in the stack While reference type data is in the heap, GC recycling is required; In layman's words, the value type is cash, and the reference type is the passbook.  7.    What is the difference between generic collection list<t> and ArrayList? A)     list<t> can only add data of type T, and ArrayList can add any typeb)     list<t> operations do not require packing and unpacking, and ArrayList need to be boxed and disassembled, so list<t> execution is relatively efficient and safe, while ArrayList is relatively inefficient and unsafe. c)     list<t> and ArrayList can all use indexes to add and remove elements from the collection.  1.    What is the difference between generic collection dictionary<k,v> and Hashtable? A)     dictionary<k,v> There is a type constraint when adding data, only data of the K,V type can be added, and Hashtable may add any type of data; b)     DICTIONARY&LT;K ,v> does not require boxing and unpacking operations, the execution efficiency is relatively high, and relatively safe, while the Hashtable needs to be boxed and unboxing operation, the execution efficiency is relatively low, and relatively unsafe. c)     They can find the value of the corresponding value by the key value, and the addition data and the convenience data method are the same.  2.    What is the difference between static and non-static classes? A)     static class uses the keyword static modifier, not static class does not use the keyword static modifier b)     Static class contains only static members, not static classes can contain static members C)     Static classes cannot contain instance members, not static classes can contain instance members D)     Static classes can use class names to call static members instead of static classes to invoke non-static members using instance members e)     Static classes cannot be instantiated, and non-static classes can be instantiated F     Static classes do not contain instance constructors, and non-static classes contain instance constructors  3.    What is polymorphic? A: polymorphic, refers to the angle of the parent class, the behavior of a parent class with different subclasses.  4.    What is the difference between virtual and abstract methods? Both virtual and abstract methods are intended to be overridden by inheritance and are used to implement polymorphism. The virtual method uses the keyword Virtul adornment, can have the method body, but the abstract method uses the keyword Asbstract adornment, cannot have the method body. Abstract methods must be placed in an abstract class, because the class containing the method must be abstract and the virtual method different.  5.    How to design the processThe bottom of the sequence? Is it an interface or an abstract class? A: Generally at the bottom of the design program, you need to consider the program's refactoring, extensibility and maintainability. The design principle of "high cohesion and low coupling" should also be considered. Generally in the extraction of the underlying object, if it is a clear description of the property has behavior, you can consider the underlying use of abstract classes, if the lower level of design considerations are more than the specification or the relationship between objects, you can consider the use of interfaces as the underlying design. Interfaces can be used to design interfaces, since interfaces are more abstract than abstract classes.  6.    How to design a class? A: General design class, we will have a set of common attribute characteristics, can be described a set of objects, designed into a class, the group of objects in the static can be described as a property in the class, the group of objects in the behavior of the action design method.  7.    What is serialization? What is deserialization? A: Serialization is the process of storing the state of an object in a specific medium storage mass. Deserialization is the process of rebuilding an object from data in a particular medium.  8.    What is an assembly? What is an application domain? A: Assembly (assembly), generally we think of a project as an assembly, but the project does not represent the assembly. An assembly is a logical collection of type definitions, data files, and resource files (not a physical collection), each containing a manifest for a program that is usually attached to a file header, or a separate file to contain the manifest. Application domains (application domain), which are logical units in the CLR that provide code run scope, error isolation, and security isolation, are similar to processes in the operating system.  9.    What is a GC? Answer: GC (garbage Collector) garbage collector. It means in the. NET cleans up the memory occupied by objects that are no longer used on the managed heap (hibernating objects), and moves the active objects that are still being used, thus keeping the space they occupy continuously.  1.    What is an index? What are the indexes and the principles of use? A: An index is a structure that sorts the values of one or more columns in a database table into a clustered index, a nonclustered index. A clustered index is a physical index, and a nonclustered index is a logical index. Clustered indexes can increase the speed of multiple rows of retrieval, while nonclustered indexes are faster for single-row retrieval. A table can have only one clustered index, and multiple nonclustered indexes. Advantages of using indexes: a)     creating a unique index guarantees the uniqueness of each row of data in a database table. b)     can greatly improve the speed of data retrieval. C    can speed up the connection between tables and tables. d)     When you use grouping and sorting clauses to retrieve, you can also significantly reduce the time to group and sort. e)     by using an index you can significantly improve system performance by using the Hide optimizer during the query process. Disadvantages of using indexes: a)     creating indexes and maintaining indexes takes time, and this time increases with the data. b)     Index to occupy a certain amount of physical space. c)     when the data in the table is added and modified, the index is also maintained dynamically. The following conditions are not appropriate for indexing: D)     for those columns that are rarely used or referenced in queries, you should not create an index e)     You should not increase the index for columns that have very few data values (f)     For those columns defined as text, the image and bit data types should not increase the index g)     When the performance of the modification is far greater than the retrieval performance, you should not create an index  2.    what is a cursor? How do I use cursors? A) cursors in the     database are similar to pointers in C, and are actually a mechanism for extracting one record at a time from a result set that includes multiple data records. b)      1) define the CURSOR clause Declare < cursor name > cursor for 2) Create a banner sentence Open < cursor name >3) Extract the pointer column values, move the record pointers fetch < Column list > from < cursor name > [into < variable list >]4) Delete cursor and release statement Close < cursor name using @ @Fetch_Status using the while loop to handle row 5 in cursor >/ deallocate < cursor name > 3.    What is a trigger? What is the use of triggers? A: a trigger (trigger) is a special kind of stored procedure that is executed either by the program or not by hand, but by the event. When the data in a table in a database changes, including insert,update,delete arbitrary action, the trigger executes automatically if we write a corresponding DML trigger on the table. The primary role of DML triggers is to enforce business rules, as well as extend SQL Server constraints, default values, and so on. SQL SerVER2005 new DDL triggers are used primarily for auditing and standardizing operations on structures such as tables, triggers, and views in a database. For example, in modifying tables, modifying columns, adding tables, adding columns, and so on. Triggers can implement cascading changes through related tables in the database, but these changes can be performed more efficiently by cascading referential integrity constraints. Triggers can enforce more complex constraints than constraints defined with a CHECK constraint. Unlike CHECK constraints, triggers can reference columns in other tables. Misuse can cause problems with database and application maintenance. Excessive reliance on triggers will inevitably affect the structure of the database and increase the complexity of maintenance.  1.    What is transaction processing? What are the principles of transaction processing? Under what circumstances did you use transaction processing? A: Transaction is a logical unit of work in SQL Server that will be processed as a whole. A transaction guarantees that successive operations must all succeed, or it must return immediately to the state where no action has been performed, that is, the result of executing the transaction does not all complete the operation of the data, or all the data is not modified. Principles: Atomicity (Atomicity), consistency (consistency), isolation (isolation), persistence (durability) Use cases: such as the e-Commerce Order section, the Order Master table and the order sub-table, the use of transaction processing, etc. As long as it is executed at the same time or not at the same time.  2.    How do I handle concurrency problems with my database? A)     View database connections, number of processes, check for deadlocks, b)     View connections in the database, such as: Number of concurrent connections, maximum number of connections, number of connections for different users, c)     View unused connections that are not released in a timely manner; d)     View a connection that a user has not released in time, e)     Kill Invalid Connection dialog, F)     View the connection pool in the program, optimize the program.  3.    Database Optimization principle A: Use stored procedures as much as possible, query parts consider using indexes, optimize the structure design of the database, reduce data redundancy, minimize the use of loops, use fewer cursors, and use transactions rationally (note: Transaction processing has little impact on performance) You can consider splitting the database when appropriate.  4.    What is a stored procedure? Have you ever used a stored procedure? What are the advantages of using stored procedures? A: A stored procedure is similar to a method in C #, putting together a set of SQL statements to perform administrative tasks or apply complex business rules. Used stored procedures, generallyWe develop programs that use stored procedures. Advantages: Fast execution, allows modular programming, improves system security (because it prevents SQL injection), and reduces network liquidity.  5.    What is SQL injection and how to prevent it? A: SQL injection is the process of executing SQL statements, the SQL statements are spliced with offensive sensitive characters, resulting in data leakage. such as SELECT * FROM tablename where uid= ' or 1=1-', this sentence can take out all the data in the table. You can use SQL statements that contain parameters, you can use stored procedures, or you can filter out sensitive characters between parameter submissions.  6.    What memory leaks? How to prevent? A: A memory leak refers to a previously used piece of memory that is not released when it is not needed or accessed. For processes, memory is relatively reduced, and memory leaks occur at this time. Memory leaks typically occur when data types are converted, especially when converting from a large data to a small data format (memory leaks and memory overflows are a means). Note that in the process of data conversion, strict judgment is made.  7.    How to prevent the website from hanging "Trojan"? A: In the event of file interaction with the site, especially when users upload files, such as uploading pictures, will happen ' hanging horse ' phenomenon. Prevent: 1. Limit the format of uploaded files; 2. Limit the size of uploaded files; 3. Restrict user permissions (privilege minimization principle)

. NET Interview Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.