Wednesday, April 8, 2015

How to get the Current URL of the page using C#

How to get the Current URL of the page using C#

Below example shows different ways of extracting different parts of URL
 " + HttpContext.Current.Request.Url.Host);
 " + HttpContext.Current.Request.Url.Authority);
 " + HttpContext.Current.Request.Url.AbsolutePath);
 " + HttpContext.Current.Request.ApplicationPath);
 " + HttpContext.Current.Request.Url.AbsoluteUri);
 " + HttpContext.Current.Request.Url.PathAndQuery);

Thursday, December 8, 2011

14 hive and other SharePoint 2010 directories

C:\Inetpub\wwwroot\wss - This directory (or the corresponding directory under the Inetpub root on the server) is used as the default location for IIS Web sites.

C:\ProgramFiles\Microsoft Office Servers\14.0 - This directory is the installation location for SharePoint Server 2010 binaries and data. The directory can be changed during installation.

C:\ProgramFiles\Microsoft Office Servers\14.0\WebServices - This directory is the root directory where SharePoint back-end Web services are hosted, for example, Excel and Search.

C:\ProgramFiles\Microsoft Office Servers\14.0\Data - This directory is the root location where local data is stored, including search indexes.

C:\ProgramFiles\Microsoft Office Servers\14.0\Logs – This directory is the location where the run-time diagnostic logging is generated.

14 hive folders :

Program Files\Common files\Microsoft Shared\Web Server Extensions\14 -
This directory is the installation directory for core SharePoint Server files.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\ADMISAPI -
This directory contains the soap services for Central Administration. If this directory is altered, remote site creation and other methods exposed in the service will not function correctly.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\CONFIG -
This directory contains files used to extend IIS Web sites with SharePoint Server. If this directory or its contents are altered, Web application provisioning will not function correctly.

Program Files\Common files\Microsoft Shared\Web Server Extensions\14\LOGS -
This directory contains setup and run-time tracing logs.

Program Files\Common files\Microsoft Shared\Web Server Extensions\Policy -

Program Files\Common files\Microsoft Shared\Web Server Extensions\UserCode -
This directory contains files used to support your sandboxed solutions.

Program Files\Common files\Microsoft Shared\Web Server Extensions\WebClients -
This directory contains files related to the new Client Object Model.

Program Files\Common files\Microsoft Shared\Web Server Extensions\WebServices -
This directory contains new wcf or .svc related files.

Wednesday, November 17, 2010

About Microsoft Dynamics CRM

Microsoft Dynamics CRM:
Microsoft Dynamics CRM made it possible to consolidate and access customer information much more quickly. Microsoft Dynamics CRM works within the MS outlook one of the most popular applications that people use every day.

In Sales, Customer Service, and Marketing makes Microsoft Dynamics CRM an effective way to stay in touch with your customers and drive your business goals.

Microsoft Dynamics CRM is designed to meet the needs of companies of all sizes—from small businesses to large enterprises. Today, Microsoft Dynamics CRM is used by more than 1 million people, including some of the world's largest organizations, in financial services, professional services, manufacturing, and the public sector.

History of MS Dynamics CRM:
- In Dec 2007, MS Dynamics CRM 4.0 launched
- In April 2008, MS Dynamics CRM Online , on an demand service was introduced.
- In Sep 2008, March 2009, and Nov 2009 Service updates for MS Dynamics CRM online were released.
- In July 2009, Free CRM Accelerators were launched with new functionality for analytics, e-Service, Enterprise Search, sales forecasting, sales methodology and support.

Friday, January 29, 2010

Difference between synchronous and asynchronous communication?

-asynch comm there is no need to establish a connection before data transmission.
-asynch comm is used in packet swithed networks
-widely used for PC communication and is commonly used for e-mail applications, Internet access, and asynchronous PC-to-PC communications.
-data is transmitted one byte at a time with each byte containing one start bit, eight data bits, and one stop bit, thus yielding a total of ten bits.
- Disadvantage: overhead because every byte sent contains two extra bits (the start and stop bits) and therefore a substantial loss of performance.

-first connection will be established and the communication
will take place.
-synch comm is used in circut swithed netwoks.
-data is transmitted as frames of large data blocks rather than bulky individual bytes. One advantage of synchronous is that control information is easily inserted at the beginning and end of each block to ensure constant timing, or synchronization.
-Another advantage of synchronous is that it is more efficient than asynchronous. For example, a 56 Kbps dial-up synchronous line can carry 7000 bytes per second (56000/8) compared to a 56 Kbps dial-up asynchronous line which can only carry 5600 bytes per second (56000/10).When transmitting large amounts of information, this translates into a significant increase in speed and performance.

Wednesday, January 6, 2010

Web Part Life Cycle:

- OnInit – Configuration values set using WebBrowsable properties and those in web part task pane are loaded into the web part.
- LoadViewState – The view state of the web part is populated over here.
- CreateChildControls – All the controls specified are created and added to controls collection. When the page is being rendered for the first time the method generally occurs after the OnLoad() event. In case of postback, it is called before the OnLoad() event. We can make use of EnsureChildControls() - It checks to see if the CreateChildControls method has yet been called, and if it has not, calls it.
- OnLoad
User Generated Event – for e.g. button click on the web part.
- OnPreRender – Here we can change any of the web part properties before the control output is drawn.
- RenderContents – Html Output is generated.
- SaveViewState - View state of the web part is serialized and saved.
- Dispose
- UnLoad.

Tuesday, August 25, 2009

Query for getting the Constraint Information

SELECT AS ForeignKey,
OBJECT_NAME(f.parent_object_id) AS TableName,
fc.parent_column_id) AS ColumnName,
OBJECT_NAME (f.referenced_object_id) AS ReferenceTableName,
fc.referenced_column_id) AS ReferenceColumnName
FROM sys.foreign_keys AS f
INNER JOIN sys.foreign_key_columns AS fc
ON f.OBJECT_ID = fc.constraint_object_id

ALTER TABLE Insurance.Contract DROP CONSTRAINT FK_Contract_AccountID