What should be done to make a session cookieless

Thursday, June 25, 2009

Change the web.config file with the following setting to create a ASP.NET cookieless session ,



set the cookieless attribute to 'false', as

<sessionstate timeout='20' cookieless='false' mode='InProc'>

how will u check whether the user is supportig cookies?

The only way to check whether a client accepts cookies or not is , to create a cookie and read it back.

If you are able to read it back then , its accepting else not.

what does '()' denote in the object creation statement

what does '()' denote in the object creation statement?

It denotes the constructor.

How to call a base class constructor from a derived class?

How to call a base class constructor from a derived class?

using System;
using System.Collections.Generic;
using System.Text;

namespace OOPTest7
{
class A
{
public A()
{
Console.Out.Write("base A");
}
public A(string s)
{
Console.Out.Write(s);
}

}

class B : A
{

public B() : base("base cons called from Derived")
{
Console.Out.Write("B");
}

}



class Program
{
static void Main(string[] args)
{
B b= new B();
Console.In.Read();
}
}
}

interface ,the class which implemented it and its object, with interface in left hand side during creation

If a class IA is implementing an interface I which is having a method a, then
can is the following allowed? Will that have all the methods of IA apart from that of interface I?

I a = new IA();

Yes. always the base class or interface can contain derived class, but it will have
only those of the base. So it will not have members of IA which are not from interface I.

using System;
using System.Collections.Generic;
using System.Text;

namespace OOPTest6
{
interface I
{
void a();
}

class IA : I
{
public void a()
{
Console.Out.Write("a");
}
public void nonintfacemeth()
{
Console.Out.Write("nonintfacemeth");
}


}


class Program
{
static void Main(string[] args)
{
I i = new IA();
i.a();

}
}
}

If A is the base class and B inherits B and C inherits B and an object is created for C , whats order of constructor

If A is the base class and B inherits B and C inherits B and an object is created for C , then what will be the order of
the constructor being called?

A then B then C.

using System;
using System.Collections.Generic;
using System.Text;

namespace OopTest5
{
class A
{
public A()
{
Console.Out.Write("A");
}

}

class B : A
{
public B()
{
Console.Out.Write("B");
}

}

class C : B
{
public C()
{
Console.Out.Write("C");
}

}


class Program
{
static void Main(string[] args)
{
C c = new C();
Console.In.Read();
}
}
}

Does C# (.NET) support partial implementation?

Does C# (.NET) support partial implementation?
No.

the following program will throw an error.

using System;
using System.Collections.Generic;
using System.Text;

namespace OPPTest3
{
interface IA
{
void x();
void y();
}

class IAClass : IA
{
public void x()
{
Console.Out.Write("test x");
}

}
class Program
{
static void Main(string[] args)
{
IAClass m = new IAClass();
m.x();
m.y();
}
}
}

Can we leave a virtual function in an abstract class without implementing in the derived class

Does c# support pure virtual function?
No.
Instead you can use abstract function which is also called as a pure virtual function.
abstract class abTest
{
public abstract void a();

}

Can we leave a virtual function in an abstract class without implementing in the derived class ?
No. It will throw an error.

using System;
using System.Collections.Generic;
using System.Text;

namespace OppTest4
{
abstract class abTest
{
public abstract void a();

}

class UsesabTest : abTest
{
//public override void a()
//{
// Console.Out.Write("a");
//}

public void x()
{
Console.Out.Write("x");
}
}

class Program
{
static void Main(string[] args)
{
}
}
}

Can a base class contain its derived class?

Can a base class contain its derived class?
Yes. But the reverse is not possible.

using System;
using System.Collections.Generic;
using System.Text;

namespace OppsTest
{
class A
{
int i = 1;

public A()
{
}

public void testa()
{
Console.Out.Write(i);
}
}

class B : A
{
int j = 3;
public B()
{
}

public void testb()
{
Console.Out.Write(j);
}

}




class Program
{
static void Main(string[] args)
{
A a = new B();
a.testa();
Console.In.Read();
}
}
}

Class implementing Interface

using System;
using System.Collections.Generic;
using System.Text;

namespace OppTest2
{
interface IA
{
void x();
void y();
}

class IAClass : IA
{
public void x()
{
Console.Out.Write("test x");
}
public void y()
{
Console.Out.Write("test y");
}
}
class Program
{
static void Main(string[] args)
{
IAClass m = new IAClass();
m.x();
m.y();
}
}
}

how to implement a pure virtual function in c#?

how to implement a pure virtual function in c#?

using System;
using System.Collections.Generic;
using System.Text;

namespace OppTest4
{
abstract class abTest
{
public abstract void a();

}

class UsesabTest : abTest
{
public override void a()
{
Console.Out.Write("a");
}

public void x()
{
Console.Out.Write("x");
}
}

class Program
{
static void Main(string[] args)
{
UsesabTest mn = new UsesabTest();
mn.a();
}
}
}

FxCop – Part III (A detailed explanation over Project)

FxCop – Part III (A detailed explanation over Project and its functionalities)


In the Part I we saw the introduction to FxCop and in Part II we saw about the startup usage of FxCop. In this Part III we are going to see in detail about FxCop Project and its features.



Here we dived the explanations over the Project into 2, they are:

· Basics of Project

· Advanced features of Project



Basics of Project:

In this we will see the basics of FxCop Project which needs little explanation. The topics we are going to cover here are:

1. Creating a new project

2. Open an existing project

3. Saving project

4. Opening Recent Projects

5. Saving Reports

6. Importing Reports

7. Adding Targets

8. Adding Rules

9. Analyzing a Project

10. Viewing Analysis Summary



1. Creating a new Project:

To create a new project,

Click File > New Project.



2. Open an existing project

To open an exiting project,

· File > Open Project

· Select the project file you want to open from the location you stored it or the location in which it is available.

· Click Open button.



3. Saving project

You can save the project in 2 ways, as follows,

i) When you are saving it for the first time

ii) When you are saving one more copy of the project.



a) When you are saving it for the first time

· Click File > Save Project or Ctrl S

· Select the path where you want to save it

· Enter the name of the project you want to save in

· Click Save





b) When you are saving one more copy of the project

· Click File > Save Project as

· Select the path where you want to save it

· Enter the name of the project you want to save in

· Click Save



4. Opening Recent Projects

To open Opening Recent Projects,

a) Click File > Recent Projects

b) Select the desired project



5. Saving Reports

To save reports,

· Click File > Save Report as

· Select the path where you want to save it

· Enter the name of the Report you want to save in

· Click Save



6. Importing Reports

To Import Reports,

· Click File > Import Reports or Ctrl I

· Select the Report file you want to open from the location you stored it or the location in which it is available.

· Click Open button



7. Adding Targets

To add Target,

· Project > Add Targets.

· Select the desired assembly you want to analyze(it can either be a dll or an exe).



8. Adding Rules

To Add Rules,

· Project > Add Rules.

· Select the desired Rules dll from the location you are having the rules.



9. Analyzing a Project

To analyze a project, its given in detail in the earlier chapters. Anyhow its given here once more for continuity or completeness of the topic.

· Select the desired assembly you want to analyze (it can either be a .dll or an .exe).

· For example, I am selecting here a .net application (Which was downloaded from internet)

· If you have selected multiple assemblies then select any one of them (the one you want to analyze first) and then click Project > Analyze or press F5 or Click Analyze from toolbar.

· Analyzing with introspection Engine dialog box will appear when the analysis is under process.

· Then it will display list of messages in the right pane.



10. Viewing Analysis Summary

To view Analysis Summary report,

· Click Project > Analysis summary

· Analysis summary window will appear.

· Click ok to close the window.



Advanced features of Project:

In this we will Advanced features of FxCop Project which needs some explanation. The topics we are going to cover here are:

1. General Project settings

2. Saving and Compression settings

3. Spelling and Analysis settings

4. Preferences Settings

5. Font and colors settings

6. Analysis Engine settings



1. General Project settings
For doing General Project settings,

· Click Project > Options

· Select General tab



Here you can do the things like:

(1) Changing Project name

(2) Changing Report style sheet path

(3) Save messages settings for Project and Reports



2. Saving and Compression settings

For doing this,

· Click Project > Options

· Select Saving and Compression tab



Here you can do the things like:

(1) Project Save settings

(2) Project File name Rule settings

(3) Compression settings



3. Spelling and Analysis settings

For doing this,

· Click Project > Options

· Select Spelling and Analysis tab



Here you can do the things like:

(1) Multithreading settings

(2) GAC settings

(3) Spelling and analysis settings





4. Preferences Settings
For doing this,

· Click Tools > Settings

· Select Preferences tab



Here you can do the things like:

(1) General preference settings like checking for updates in startup,etc

(2) Filtering messages

(3) Launching in source code editor

(4) Command line settings



5. Font and colors settings

For doing this,

· Click Tools > Settings

· Select Font and colors tab



As the name implies, it does the font and color related settings.



6. Analysis Engine settings

For doing this,

· Click Tools > Settings

· Select Analysis Engine tab



Here you can do the things like:

(1) Engine related settings

(2) Some more advanced settings.

SharePoint for all – Chapter I (Introduction to the basics of SharePoint)

SharePoint for all – Chapter I (Introduction to the basics of SharePoint)
This will be a series of articles on SharePoint, which explains from the basics to advanced usage of SharePoint and its group of products. This article is the first of them which gives an introduction to SharePoint. In the coming chapters, we will see the features of SharePoint in depth.

SharePoint is said to be one of the fastest growing technologies from Microsoft.

Definition:
It is a browser-based Content Management System with collaboration features from Microsoft.
It can be configured to run intranet, extranet and internet sites.

Microsoft’s Definition:
Microsoft Office SharePoint Server 2007 is an integrated suite of server capabilities that can help improve organizational effectiveness by providing comprehensive content management and enterprise search, accelerating shared business processes, and facilitating information-sharing across boundaries for better business insight. Additionally, this collaboration and content management server provides IT professionals and developers with the platform and tools they need for server administration, application extensibility, and interoperability.

SharePoint Products:

Microsoft lists the following as the SharePoint Products and Technology family:
1. WSS (Windows SharePoint Services)
2. MSS (Microsoft Search Server)
3. Forms Server
4. MOSS (Microsoft Office SharePoint Server)

IDE’s for developing SharePoint Products:

1. Visual studio
2. Microsoft Office SharePoint Designer

1. WSS

Windows SharePoint Services is foundation for all SharePoint based products. It is an object model for creating web pages which does document management and collaboration and centralized document repository.

The latest version of WSS is 3.0. You can download WSS 3.0 from the following link,

http://msdn.microsoft.com/en-us/sharepoint/default.aspx

2. MSS

Microsoft Search Server is an enterprise search platform from Microsoft, based on the search capabilities of Microsoft Office SharePoint server. –Wiki.
You can download MSS from the following link,

http://msdn.microsoft.com/en-us/library/bb931107.aspx

3. Forms Server

It is a server which allows InfoPath forms to be used on a browser. It allows even database operations.

4. MOSS

Microsoft Office SharePoint Server (MOSS) 2007 is a portal-based platform built over Windows SharePoint Services (WSS) 3.0. It organizes and aggregates an organization's information in one central, web-based application. MOSS enables users to create portals, has enterprise-level services, such as business intelligence and business process integration, etc.

Used for:
It is primarily used for Content Management, Collaboration, organizing and aggregating an enterprise's data into web-based portal. For e.g. Knowledge Management Portal.

Advantages:
Many built-in features, Rich Security, Content Management, Integration with Office products, business process can be integrated with workflows, less effort to create basic sites with standard functionalities such as search etc.

Hierarchy:
Web Application -> Site Collection -> Sites->database (Content db, Config db, SSO db). An interesting point to note here is that the equivalent of .Net website here is Web Application and not the sites under site collection. Also the databases are encrypted hence developers can't view data.

Study Material from Microsoft:

http://office.microsoft.com/en-us/sharepointserver/FX100492001033.aspx

http://sharepoint.microsoft.com/Pages/Default.aspx

Study Material from Others:

http://www.fpweb.net/sharepoint-hosting/free-sharepoint-tutorials.asp

http://blog.sharepointhosting.com/Downloads/SharePoint-Tutorials.aspx

http://www.cudenver.edu/RESOURCES/WEBDEVELOPMENT/CMSRESOURCES/TUTORIALS/CREATESPSITE/Pages/CreateaSharePointsite.aspx

http://www.softwaretrainingtutorials.com/ms-sharepoint.php

System Requirements:

Hardware Requirements suggested by Microsoft:

Component Minimum Recommended
Processor 2.5 gigahertz (GHz) Dual processors that are each 3 GHz or faster
RAM 1 gigabyte (GB) 2 GB
Disk NTFS file system–formatted partition with a minimum of 3 GB of free space NTFS file system–formatted partition with 3 GB of free space plus adequate free space for your Web sites
Drive DVD drive DVD drive or the source copied to a local or network-accessible drive

Display 1024 × 768 1024 × 768 or higher resolution monitor
Network 56 kilobits per second (Kbps) connection between client computers and server 56 Kbps or faster connection between client computers and server


For detailed information on the System requirements for SharePoint, see the following link,

http://technet.microsoft.com/hi-in/library/cc288751(en-us).aspx

LinkWithin

Blog Widget by LinkWithin

Recommended Books