Friday, November 9, 2012

Difference between Web Site and Web application in ASP.NET


• Development Wise Difference


Web Site
1. We can code one page in C# and one page in vb.net (Multiple programming languages allowed).
2. We cannot call (access) public functions from one page to other page.
3. Utility classes / functions must be placed in a special ASP.NET folder (the App_Code folder)
4. Web Sites do not have a .csproj/.vbproj file that manages the project (the folder that contains the site becomes the project root).
5. In the Web Site project, each file that you exclude is renamed with an exclude
keyword in the filename.
6. Explicit namespaces are not added to pages, controls, and classes by default, but you can add them manually.


Web Application
1. Only one programming language allowed per project (Need to decide on programming language when starting project).
2. We can access public functions from one page to other page.
3. Utility classes / function can be placed anywhere in the applications folder structure.
4. Web Applications are treated like other .NET projects and are managed by a project file (.csproj or .vbproj) .
5. One nice feature of the Web Application project is it's much easier to exclude files from the project view.
6. Explicit namespaces are added to pages, controls, and classes by default.




• Deployment wise difference


Web Site
1. It has its code in a special App_Code directory and it's compiled into several DLLs (assemblies) at runtime.
2. No need to recompile the site before deployment.
3. We need to deploy both .aspx file and code behind file.
4. Small changes to the site do not require a full re-deployment. (We can upload the code file that was changed) 

Web Application
1. web application is precompiled into one single DLL.
2. Site has to be pre-compiled before deployment .
3. Deploy only .aspx page, but not associated code file (the pre-compiled dll will be uploaded) .
4. Even small changes require a full re-compile of the entire site(i.e. if the code for a single page changes the whole site must be compiled) (It requires careful planning to ensure new bugs aren't introduced to the production site when uploading bug fixes or other changes.)




sample format of .CSPROJ file in web application
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectView>ProjectFiles</ProjectView>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>CheckboxListTest.aspx</StartPageUrl>
          <StartAction>SpecificPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <PublishCopyOption>RunFiles</PublishCopyOption>
          <PublishTargetLocation>
          </PublishTargetLocation>
          <PublishDeleteAllFiles>False</PublishDeleteAllFiles>
          <PublishCopyAppData>True</PublishCopyAppData>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
 

Wednesday, June 29, 2011

SharePoint:error while accessing SSP

Issue:
When i tried to go to default SSP it is showing the below error message:
Service Unavailable
HTTP Error 503. The service is unavailable.

And i thought of creating new SSP and routing it to existing web application
But we see the following error message:

An unhandled exception occurred in the user interface. Exception Information: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed

If we want to find the root cause we need to change the web.config file, but it may cause the space issue in the WFE servers....so what to do.

Resolution:

If you are facing the current issue, check this steps

If its a 503 error, check the credentials of the application pool whether its matching or not change the identity to Built-In accout or specify the particular accout
you can see this in the right hand side of Application pool Actions-->your app-->identity
change the identity

and if you have corrupted SSP or the secon error message you need to do the following steps:

  1. Create new SSP using STSADM command.

Syntax

stsadm -o createssp
   -title <SSP name>
   -url <Web application URL>
   -mysiteurl <MySite URL>
   -ssplogin <user name>
   -indexserver <index server>
   -indexlocation <index file path>
   [-ssppassword <password>]
   [-sspdatabaseserver <SSP database server>]
   [-sspdatabasename <SSP database name>]
   [-sspsqlauthlogin <SQL user name>]
   [-sspsqlauthpassword <SQL password>]
   [-searchdatabaseserver <search database server>]
   [-searchdatabasename <search database name>]
   [-searchsqlauthlogin <SQL user name>]
   [-searchsqlauthpassword <SQL password>]
   [-ssl <yes|no>]
  1. route all the exsting webapplications to the new SSP using central admin.
  2. make the new SSP as default one.
  3. Delete the exsting one using STSADM command.

Syntax

stsadm -o deletessp
   -title <SSP name>
   [-deletedatabases]
   [-force]

thats it its works fine.

Friday, June 17, 2011

SharePoint:Different types of Content Types in SharePoint 2007

These are the different content types available in Sharepoint 2007
Bussiness Intelligence
Custom
Document
Folder
List
Microsoft Project
Page Layouts
Publishing
Special

Wednesday, June 15, 2011

SharePoint:Creating a Form based authentication(FBA)

check this links
http://www.devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-1.aspx
http://www.devcow.com/blogs/jdattis/archive/2007/02/23/Office-SharePoint-Server-2007-Forms-Based-Authentication-FBA-Walkthrough-Part-2.aspx



SharePoint: Configuring Indexing Server

In this section I am gonna tell you how to configure index server. Basically index server is required when configuring SSP (Shared Service Provider) in SharePoint. So we need to have index server configured before configuring SSP. Following are the series of steps to configure index server.
  1. Open Central Administration; navigate to Operations--> Topology and Services--> Servers in Farm.
  2. Click server on which you want to run indexer service.
  3.  Click on Office SharePoint Server Search listed in the service list.
  4.  Fill in the details and in Web Front End And Crawling section select Use a dedicated web front end computer for crawling, select server name from dropdown list, and press OK.



Now you have done with configuring index server, it's time to start it. Click on the 'start' link in the action column in front of Office SharePoint Server Search.
  1. Configure Office SharePoint Server Search Service Settings on server creativitybox’ form will be opened, fill in required fields and press Start

SharePoint: Adding content database to Webapplication

  1. Verify that the user account that is being used to perform this operation is a member of the Farm Administrators SharePoint group. If you are using Windows authentication to connect to SQL Server, the user account must also be a member the SQL Server dbcreator fixed server role on the SQL Server instance where the database will be created. If you are using SQL authentication to connect to SQL Server, the SQL authentication account that you specify when you create the content database must have dbcreator permission on the SQL Server instance where the database will be created.
  2. On the SharePoint Central Administration Web site, click Application Management.
  3. In the Databases section, click Manage content databases.
  4. On the Manage Content Databases page, click Add a content database.
  5. On the Add Content Database page:
    1. Specify a Web application for the new database.
    2. Specify a database server to host the new database.
    3. Specify the authentication method that the new database will use and supply an account name and password, if they are necessary.
    4. Specify the name of the failover database server, if one exists.
    5. Specify the number of top-level sites that can be created before a warning is issued. By default, this is 9,000.
    6. Specify the total number of top-level sites that can be created in the database. By default, this is 15,000.
    7. Click OK.

SharePoint - Cannot convert a primitive value to the expected type 'Edm.Double'. See the inner exception for more details If y...

Ad