Sie sind auf Seite 1von 5

Major role of CLR for CAS It is a part of .

NET security model that determines whether or not a piece of code is allowed to run and what resources it can use while running CLR is considered as the heart of .net framework, if your CLR is not enable,you won't be to compile your application and the code that runs under CLR is known as managed code,this also ensures code access security by eliminating the objects those are no longer in use thus automatically manages memory. What?s SingleCall activation mode used for? If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode. interface is reference type and contain only abstract member. interface member can be Methods ,events, properties and indexer. but interface contain only declaration of members. interface can't contain constant ,data field, constructor ,static members, destructors. ----------If we want to allow only integers into a textbox then use "^\d{0,9}" expression. ex: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="RegularExpressionValidator" ValidationExpression="^\d{0,9}"></asp:RegularExpressionValidator> -------------Difference between assembly manifest & metadata assembly manifest - An integral part of every assembly that renders the assembly self-describing. The assembly manifest contains the assembly's metadata. The manifest establishes the assembly identity, specifies the files that make up the assembly implementation, specifies the types and resources that make up the assembly, itemizes the compile-time dependencies on other assemblies, and specifies the set of permissions required for the assembly to run properly. This information is used at run time to resolve references, enforce version binding policy, and validate the integrity of loaded assemblies. The self-describing nature of assemblies also helps makes zeroimpact install and XCOPY deployment feasible. metadata - Information that describes every element managed by the common language runtime: an assembly, loadable file, type, method, and so on. This can include information required for debugging and garbage collection, as well as security attributes, marshaling data, extended class and member definitions, version binding, and other information required by the runtime. -------------What is Global Assembly Cache (GAC) and what is the purpose of it? Each computer where the common language runtime is installed has a machinewide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to GAC(global assembly cache)is used where >net assembly reside.GAC is used to following situations -->>if the application has to be shared among several applications. --->>if the assembly has some special security security requirements like

only administrators can remove the assembly. ---------------How can we convert XML data into DataBase table IN .Net? DataSet ds=new DataSet(); ds.ReadXml(Server.MapPath("XMLFILENAME.xml")); DataTable tb=new DataTable(ds.Tables(0)); this tb(object) is Datatable contain XmlFileData. ----------Features of WCF 1. Service Oriented - Service-oriented architecture (SOA) is the reliance on Web services to send and receive data. The services have the general advantage of being loosely-coupled instead of hard-coded from one application to another. A loosely-coupled relationship implies that any client created on any platform can connect to any service as long as the essential contracts are met. 2. Interoperability - WCF implements modern industry standards for Web service interoperability. 3. Multiple Message Format 4. Service Meta data 5. Data Contracts 6. Security 7. Multiple Transports and Encoding 8. Reliable and Queued Messages 9. Durable Message 10. Transactions 11. Ajax and REST Support - REST is an example of an evolving Web 2.0 technology. WCF can be configured to process "plain" XML data that is not wrapped in a SOAP envelope. WCF can also be extended to support specific XML formats, such as ATOM (a popular RSS standard), and even non-XML formats, such as JavaScript Object Notation (JSON). 12. Extensibility Difference between WCF and web services Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type. Second web services are not flexible. However, WCF Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends. We develop WCF as contracts, interface, operations, and the developer we are more focused on the business logic worry about channel stack. WCF is a unified programming services so we create the service and use configuration the communication mechanism like HTTP/TCP/MSMQ etc ---------ASP.NET Web Application and Website Project data contracts. As services and need not API for any kind of information to set up

Introduction
This post explains about two project types in Visual studio ie Website and Web Application that we use to build the ASP.NET Applications and the fundamental differences between the two project types..

Background
Website project type was introduced in the VS 2005 and Web Application model introduced in VS 2003. Website project type is based on folder structure and does not require a project file. Later in VS 2005 sp1 project file was introduced for the VS 2005 website project type. Now in VS 2008 we can create both project types. 1. You can add Website or Webapplication project to your VS solution in VS 2008 as follows

2. I have added two project types to the solution and it looks like the following


Fundamentally the behavior of the application types is same but website project type is folder based and WebApp is project type like normal project types in VS studio. In WebApplication project type project file defines the structure of the project. WebSite project type contains the folders and anything that you put in the folder are dynamically compiled and be part in the website. More about ASP.NET Website Dynamic compilation here. WebApplication project type contains the designer for the ASPX page and you can find the bin folder which contains the compiled assembly. So First difference can be summarized like ASP.NET website project type is dynamic and WebApp is more like structured. 3. When you add a class file to the website project it will prompt you that it will place the file in App_code folder under root.

Notice In website project type namespace wont add to the class by default however you can define the namespaces explicitly where as in WebApp it creates the namespace for the class file when you added it to the project. 4. WebApp project type is restricted to one language where as Website you can add different language files to the App_Code folder which compiles the files dynamically. 5. Referring a user control in WebApp is straight forward.You can define the properties and can be accessed in class files like any other objects where as in website it is not. 6.We can put multiple language files in the Website but those files needs to be in same folder. If you change the location of the file then you need to mention in the Web.Config file as follows.. <codeSubDirectories> <add directoryName="Testfolder"/> </codeSubDirectories> In compilation process you will have the finer degree of control in WebApp and it is not in Website because everything is dynamically compiled. 7.When you deploy the WebApps you can just copy the Compiled Assembly and Visual elements to the IIS folder where as in Website you need to copy everything to the IIS to work.

8.You can see the following dialogue box when you publish the files in Website

If you select the precompiled option then you will find the precompiled folder in the published location there you find the multiple assemblies for each folder in the website. 9. If you use WebApplication project you can not access Profie at design time a workaround solution can be found here. 10. The following link helps you to choose which project type you have to user for the developing web applications.

Das könnte Ihnen auch gefallen