The C# struct is a lightweight alternative to a class. It can do almost the same as a class, but it's less "expensive" to use a struct rather than a class. The reason for this is a bit technical, but to sum up, new instances of a class is placed on the heap, where newly instantiated structs are placed on the stack. Furthermore, you are not dealing with references to structs, like with classes, but instead you are working directly with the struct instance. This also means that when you pass a struct to a function, it is by value, instead of as a reference
↧
C# struct
↧
What are the differences between System.String and System.Text.StringBuilder classes?
A)System.String is immutable. When we modify the value of a string variable then a new memory is allocated to the new value and the previous memory allocation released. System.StringBuilder was designed to have concept of a mutable string where a variety of operations can be performed without allocation separate memory location for the modified string.
↧
↧
Difference between an interface and abstract class?
Interface :
-all the methods having only declaration but no definition.(We have to override all the methods to add definition)
-all the methods are public.(If you have private methods, we can't inherit that method in child class, then we can't override it. In interface all methods should be override in child class)
Abstract
-we can have some concrete methods. (Mean some methods will have definition, some are no definition).
-An abstract class may have private methods.
↧
What is difference between the “throw” and “throw ex” in .NET?
“Throw” statement preserves original error stack whereas “throw ex” have the stack trace from their throw point. It is always advised to use “throw” because it provides more accurate error information.
↧
How .Net web services work when we add web services in any project
Let's assume, i have a project(ABC) where i have added SharePoint web services.
After adding the web services in the project(ABC)....
Microsoft's wsdl.exe utility will generate a spurce code file (C#) based on the web services's WSDl (web service definition language).
Microsoft's csc.exe utility will compiles the code into a proxy (DLL).
Generated proxy(DLL) will register into my project, bin directory.
Now i am good to access any methods inside ABC project, which are there in SharePoint web services...
After adding the web services in the project(ABC)....
Microsoft's wsdl.exe utility will generate a spurce code file (C#) based on the web services's WSDl (web service definition language).
Microsoft's csc.exe utility will compiles the code into a proxy (DLL).
Generated proxy(DLL) will register into my project, bin directory.
Now i am good to access any methods inside ABC project, which are there in SharePoint web services...
↧
↧
How to find the IP Number and MAC Address of a Network Card
Open command prompt window from your system
Type ipconfig /all at the command prompt to check the network card settings
The IP number and MAC address are listed by ipconfig under IP Address and Physical Address.
IP number = IP Address
MAC address= Physical Address
Type ipconfig /all at the command prompt to check the network card settings
The IP number and MAC address are listed by ipconfig under IP Address and Physical Address.
IP number = IP Address
MAC address= Physical Address
↧
How to enable mixed authentication in sql server
Login to SQL Server
Start SQL Server Management Studio
Enter the Server name and select Windows authentication.
Make sure you are logged in with administrator credentials.
Right click on the server name and select properties.
Go to Security and select SQL Server and Windows Authentication Mode.
Right click on the server name and select Restart to restart the SQL services.
Start SQL Server Management Studio
Enter the Server name and select Windows authentication.
Make sure you are logged in with administrator credentials.
Right click on the server name and select properties.
Go to Security and select SQL Server and Windows Authentication Mode.
Right click on the server name and select Restart to restart the SQL services.
↧
SharePoint Update Manage Metadata Column
↧
Alternate Access Mappings in Sharepoint
First get your IP or Public URL or Host Name.
Open IIS (Click Run-->inetmgr-->Expand Sites)
Right click on web site which you want to make to Public
Click "Edit Binding"
Select your web site in the new window. Ex: if it is 80 port just select that..)
Click "Edit" option in the new window.
Provide the Host name: which collected in the Step1.
We have done Host name configuration in IIS
Now we have to do Alternate access map in sharepoint Central Admin
GO to Central Admin-->Application Management
Under Web Application
Select "Config Alternate Access Mappings"
Click on "Edit Public URLs"
In "Alternate Access Mapping Collection:" select web application which you have mapped Host Name in IIS
Provide all the Details and Save
Open IIS (Click Run-->inetmgr-->Expand Sites)
Right click on web site which you want to make to Public
Click "Edit Binding"
Select your web site in the new window. Ex: if it is 80 port just select that..)
Click "Edit" option in the new window.
Provide the Host name: which collected in the Step1.
We have done Host name configuration in IIS
Now we have to do Alternate access map in sharepoint Central Admin
GO to Central Admin-->Application Management
Under Web Application
Select "Config Alternate Access Mappings"
Click on "Edit Public URLs"
In "Alternate Access Mapping Collection:" select web application which you have mapped Host Name in IIS
Provide all the Details and Save
↧
↧
HTTP Error 500.19 - Internal Server Error
IIS Manager
Sites
Select your root web site
In the center section pane, Select "Features View"
Right page Under the Actions
Basic Settings
Click on Connect as...
You will see prompt
In the prompt, it should be "Specific user". Click on "Set", you can enter your service account User Id and Password.
Click OK
Now Click "Test Settings.."
It should pass Authentication and Authorization test.
Some times you will see "Authorization" error because of access issue.
If you get Access related issue, try below steps.
1.In Windows Explorer, locate the folder that contains the ApplicationHost.config file that is associated with the Web site, or locate the virtual directories or the application directories that contain the Web.config file that is associated with the Web site.
2.Right-click the folder that contains the ApplicationHost.config file, or right-click the virtual or application directories that may contain the Web.config file.
3.Click Properties.
4.Click the Security tab, and then click Edit.
5.Click Add.
6.In the Enter the object names to select box, type computername\IIS_IUSRS, click Check Names, and then click OK.
Note Computername is a placeholder for the computer name.
7.Click to select the Read check box, and then click OK.
8.In the Properties dialog box for the folder, click OK.
Note Make sure the folder's properties are inherited by the ApplicationHost.config and Web.config files so that IIS_IUSRS has the Read permission for those files.
Or
Add computername\IIS_IUSRS to Administrator group in the system where Application is located.
Sites
Select your root web site
In the center section pane, Select "Features View"
Right page Under the Actions
Basic Settings
Click on Connect as...
You will see prompt
In the prompt, it should be "Specific user". Click on "Set", you can enter your service account User Id and Password.
Click OK
Now Click "Test Settings.."
It should pass Authentication and Authorization test.
Some times you will see "Authorization" error because of access issue.
If you get Access related issue, try below steps.
1.In Windows Explorer, locate the folder that contains the ApplicationHost.config file that is associated with the Web site, or locate the virtual directories or the application directories that contain the Web.config file that is associated with the Web site.
2.Right-click the folder that contains the ApplicationHost.config file, or right-click the virtual or application directories that may contain the Web.config file.
3.Click Properties.
4.Click the Security tab, and then click Edit.
5.Click Add.
6.In the Enter the object names to select box, type computername\IIS_IUSRS, click Check Names, and then click OK.
Note Computername is a placeholder for the computer name.
7.Click to select the Read check box, and then click OK.
8.In the Properties dialog box for the folder, click OK.
Note Make sure the folder's properties are inherited by the ApplicationHost.config and Web.config files so that IIS_IUSRS has the Read permission for those files.
Or
Add computername\IIS_IUSRS to Administrator group in the system where Application is located.
↧
HTTP Error 404.17 - Not Found
HTTP Error 404.17 - Not Found
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
If you want to serve this content as a static file, add an explicit MIME map.
Solution:
Open Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
Check .Net Framework 4.5 Advanced Serices.
In the Windows features list, expand Internet Information Services, and then expand Application Development features
Check ASP.NET 4.5
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
If you want to serve this content as a static file, add an explicit MIME map.
Solution:
Open Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
Check .Net Framework 4.5 Advanced Serices.
In the Windows features list, expand Internet Information Services, and then expand Application Development features
Check ASP.NET 4.5
↧
The requested page cannot be accessed because the related configuration data for the page is invalid
<handlers accessPolicy="Read, Script" />
Solution:
On the Start menu, choose Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
Expand Application Development Features, and select the following features:
.NET Extensibility
ASP.NET
ISAPI Extensions
ISAPI Filters
Expand Security, and then select the following features:
Request Filtering
Windows Authentication
Expand Common HTTP Features, and then select the Static Content feature.
To install Internet Information Service (IIS) Manager, under Internet Information Services, expand Web Management Tools, and then select IIS Management Console.
This step is optional. You use Internet Information Service IIS Manager to manage local and remote web servers and sites.
Choose the OK button to complete the installation.
In the Windows features list, expand Microsoft .NET Framework, and then select Windows Communication Foundation HTTP Activation.
↧
This configuration section cannot be used at this path
Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Solution
Open Control Panel
Click on Programs
Click on "Turn windows features on or off"
in the features window, Click Expand: "Internet Information Services"
Click Expand: "World Wide Web Services"
Click Expand: "Application Development Features"
Check (enable) the features. I checked all but CGI.
Still it was not working
I tried below option also...
Browse to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here)
Open applicationHost.config
Find the section that showed up in the “config source” part of the error message page. For me this has typically been “modules” or “handlers”
Change the overrideModeDefault attribute to be “Allow”
So the whole line now looks like:
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
After saving the file, the page loaded up fine in my browser.
Solution
Open Control Panel
Click on Programs
Click on "Turn windows features on or off"
in the features window, Click Expand: "Internet Information Services"
Click Expand: "World Wide Web Services"
Click Expand: "Application Development Features"
Check (enable) the features. I checked all but CGI.
Still it was not working
I tried below option also...
Browse to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here)
Open applicationHost.config
Find the section that showed up in the “config source” part of the error message page. For me this has typically been “modules” or “handlers”
Change the overrideModeDefault attribute to be “Allow”
So the whole line now looks like:
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
After saving the file, the page loaded up fine in my browser.
↧
↧
Arrays in Javascript
↧
Difference between XML and JSON
Note: JSON is a format and not a language
↧
Read JSON file data
↧
How to check in which language the SharePoint was installed?
First and easy set is. Go to sharepoint central admin 15 hive folder (For SharePoint 2013), 14 for 2010, 12 for 2007.
2007
c:\program files\common files\microsoft shared\web server extensions\12\resources
2010
c:\program files\common files\microsoft shared\web server extensions\14\resources
2013
c:\program files\common files\microsoft shared\web server extensions\15\resources
You can see all folder with numbers..
If you see 1033 mean it is English language has installed.It would be en-us, en-uk.. check resource file you will find which english.
1036- French - France (fr-fr)
1031-German - Germany(de-de)
1034-Spanish - Spain(es-es)
1040-Italian - Italy(it-it)
....................
Ref:https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
Another way is you can check the registry also..
2007
c:\program files\common files\microsoft shared\web server extensions\12\resources
2010
c:\program files\common files\microsoft shared\web server extensions\14\resources
2013
c:\program files\common files\microsoft shared\web server extensions\15\resources
You can see all folder with numbers..
If you see 1033 mean it is English language has installed.It would be en-us, en-uk.. check resource file you will find which english.
1036- French - France (fr-fr)
1031-German - Germany(de-de)
1034-Spanish - Spain(es-es)
1040-Italian - Italy(it-it)
....................
Ref:https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx
Another way is you can check the registry also..
↧
↧
Syntel SharePoint Interview
asp.net execution with IIS
http handlers and modules
custom web part using user control
what is the best way to use user control in SharePoint
GC external calling
dispose, finalize
feature creation and deployment in SharePoint
SharePoint designer
form installation in SharePoint
ensure child control use?
shall i migrate sub site from SP 2010 to SP 2013
how can i do load and stress testing in SharePoint
performance testing in SharePoint
how to write custom workflow using WWF
http handlers and modules
custom web part using user control
what is the best way to use user control in SharePoint
GC external calling
dispose, finalize
feature creation and deployment in SharePoint
SharePoint designer
form installation in SharePoint
ensure child control use?
shall i migrate sub site from SP 2010 to SP 2013
how can i do load and stress testing in SharePoint
performance testing in SharePoint
how to write custom workflow using WWF
↧
Scale-up Scale-out in computers
Scale-up: x-->X
Scale-up mean you are going to increase or change the existing environment. Ex: If you 1TB 60GB Server, if you add 1TB 60GB additional then it will be Scale-up. To do scale-up, you have Shutdown the server. It will leads to down time the application.
In scale-up, ip address of the system will not change. So no need to bother about ip address.
Scale-out: x + x + x + x....
Scale-out mean you are going to add additional capacities to exiting system, without disturbing the existing system. No need of down time, you can add or remove without down time.
In scale-out, ip address of the each server will be different, so how can we connect different servers?
Ans is load balancer. Load balancer will provide one public address, so always we have to connect that publiv address, no need to bother about individul server ips.
Scale-up mean you are going to increase or change the existing environment. Ex: If you 1TB 60GB Server, if you add 1TB 60GB additional then it will be Scale-up. To do scale-up, you have Shutdown the server. It will leads to down time the application.
In scale-up, ip address of the system will not change. So no need to bother about ip address.
Scale-out: x + x + x + x....
Scale-out mean you are going to add additional capacities to exiting system, without disturbing the existing system. No need of down time, you can add or remove without down time.
In scale-out, ip address of the each server will be different, so how can we connect different servers?
Ans is load balancer. Load balancer will provide one public address, so always we have to connect that publiv address, no need to bother about individul server ips.
↧
Windows Azure Endpoints
↧