1. What is Message contract in WCF?
A message contract defines the elements of the message (like as Message Header, Message Body), as well as the message-related settings, such as the level of message security.
Message contracts give you complete control over the content of the SOAP header, as well as the structure of the SOAP body.
2. What is Fault Contract in WCF?
A fault contract defines errors raised by the service, and how the service handles and propagates errors to its clients. An operation contract can have zero or more fault contracts associated with it.
3. What is duplex service or contract?
In WCF, a service can call back to its clients. That is to say that, at the time of call back, the service behaves as a client as well as the client becomes the service, and the client must assist hosting the call back object. To support call back, the underlying transport of the binding must support bidirectional. So, for the nature of connectionless, we cannot use all bindings for the call back operation. For instance, BasicHttpBinding or WsHttpBinding does not support callback while WsDualHttpBinding supports it, because this binding establishes two HTTP channels to do that; one for client to service another for service to client. Also, NetTcpBinding and NetNamedPipeBinding supports callback since their underlying transport is bidirectional.
Callback service can be supported by using CallbackContract property in the ServiceContract attribute. Only one callback contract is allowed for a service contract. After defining a callback contract, we require to set up the client for up keeping the callback and also to offer the callback endpoint to the service for each and every call.
4. What is Authentication in Asp.Net?
Authentication is the process of identifying and validating the identity of client when accessing an application.Simply–It is the process of identifying “WHO” the end user is when they visit the a website.
5. What is Authorization in Asp.Net?
Authorization is the process of identifying whether the authenticated user has permission/ access to certain page/resources.
6. Short story about types of Authentications in Asp.Net..
For Internet web applications, the most common authentication scenario to use it called Forms Authentication. Forms Authentication enables a developer to provide a standard HTML login form within their application, and then validate the username/password an end-user submits against a database or other credential store. Assuming the username/password combination is correct, the developer can then ask ASP.NET to issue an encrypted HTTP cookie to identify and track the user.
For Intranet web applications, the most common authentication scenario to use is called Windows Authentication. Windows Authentication avoids the need to create a login form within an application, and does not require end-users to manually enter their username/password credentials to login to the application. Instead, ASP.NET and IIS can automatically retrieve and validate the Windows username of the end-user visiting the site in a secure way. The benefit of this approach is that it improves the end-user customer experience since users don’t have to re-type their passwords, and/or maintain separate accounts. It also allows companies to re-use a common security identity system across their entire corporate networks (Windows clients, servers, file-shares, printers, and web apps).
7. What is FormsAuthentication?
FormsAuthentication is a class which is available in System.Web.Security namespace.
Manages forms-authentication services for Web applications. This class cannot be inherited.
8. Where does we find the WCF contracts?
All contracts of WCF is available in System.ServiceModel;
9. When JQuery ScriptManager is not recognized by the .cs file, What could be the Solution?
Use the namespace as using System.Web.UI;
10. What is End-Points in WCF?
End-Point in Microsoft Windows Communication Foundation depicts the way to interact with the service.It comprises of three components named as ABCs of WCF Service.
WCF Service is a program that exposes collection of EndPoints.Each endpoint is a portal for communicating with the world.EndPoint consists of three components they are:
1) Address :
Defines where a service is located
ex – http://www.test.com:8001/MyService
2) Bindings :
A binding that specifies how a client can communicate with the endpoint.
ex – BasicHttpBinding,WSHttpBinding,WSDualHttpBinding etc
3) Contracts :
A contract that identifies the operations available
Endpoints will be mentioned in the web.config file on the created service.
11. Does Wcf supports Overloading and overriding?
This is a limitation of WSDL. It does not support the same overloading concepts as C#/.NET, so that method names on services have to be unique. You have two option to resolve your problem.
First one is to use diffrent names for your methods. The other one is to set the Name property on one of your OperationContracts like so
UserAccount GetUser(Int32 id);
UserAccount GetUser(string username, string password);
12. How do I know current user from SQL Command?
Select user from dual;
13. How do I know the current database name from sql command?
Select name from v$database;
14. How do you connect to oracle database sys user from command prompt?
Sqlplus / as sysdba;
15. How to create user in oracle 11g?
Create user identified by ;
in addition to this we neeed also to grant permission as:
grant create session to aejaaz;
16. How do I check where particular software is installed in windows pc?
Start->Run->Type “regedit”->HKEY_LOCAL_MACHINE->SOFTWARE->YOU will find all directories of softwares that were installed..
17. When you are working with .Net and Oracle db, When you insert data in table that would not reflect on UI until and unless you fire commit statement @ db.
18. To know the size of the clob datatype column field in table fire the below command:
select (dbms_lob.getlength(column_name)) from table_name;
19. The generic query to find the size of the column field in table is:
select length(column_name) from table_name;