Sunday, May 30, 2010

How to get the id of a webpart?


WebPartManager1.WebParts(0).ClientID
this will get the ID of the first webpart in the webparts collection.


www.codecollege.NET

What is an Anti-Pattern?


In software engineering, an anti-pattern (or antipattern) is a pattern that may be commonly used but is ineffective and/or counterproductive in practice.


www.codecollege.NET

what are the 2 programming models supported by Silverlight?


1. JavaScript API for Silverlight
2. Managed API for Silverlight


www.codecollege.NET

Solution for WCF Configuration Editor error : "Configuration binding extension 'system.serviceModel/bindings/basicHttpBinding ' could not be found. "

<h4>
Change the binding from "WsHttpBinding" to "basicHttpBinding" in the web.config file or app.config file as follows,

<endpoint address="" binding="basicHttpBinding"
</h4>
<a href="http://www.codecollege.NET">www.codecollege.NET</a>

What are the transport mechanisms supported by WCF?


1. HTTP (ex : http:// or https:// )
2. TCP (ex : net.tcp :// )
3. Peer network (ex: net.p2p://)
4. IPC (Inter-Process Communication over named pipes) (ex: net.pipe://)
5. MSMQ (ex: net.msmq://)


www.codecollege.NET

Thursday, May 27, 2010

Tell some of the key priciples of Enterprise Application Development ?


1.SOC ( Separation Of Concerns)
2.SRP (Single Responsibility Principle)
3.Dependency Inversion
4.Inversion of Control


www.codecollege.NET

Sunday, May 23, 2010

What is called a "Control State" in asp.net ?


Even when EnableViewState is set to false, the control can still hold some smaller data, which is called as "control state".


www.codecollege.NET

Daily Tips- Tip #49 - How to add a "TODO" task list in VS ?


Type the comment marker (//) followed by the word TODO where ever you want in the .cs or .vb file. Then it will appear in the Task List window. Later on you can see all the todo list you have added and then do the task correspondingly.


www.codecollege.NET

Tuesday, May 18, 2010

How do we configure "WebGarden"?


"Web garden" can be configured by using process model settings in "machine.config" or "Web.config" file. The configuration section is named and is shown in the following example. The process model is enabled by default enable="true"). Below is the snippet from config file.


enable="true"
timeout="infinite"
idleTimeout="infinite"
shutdownTimeout="0:00:05"
requestLimit="infinite"
requestQueueLimit="5000"
memoryLimit="80"
webGarden="false"
cpuMask="12"
userName=""
password=""
logLevel="errors"
clientConnectedCheck=”0:00:05"
/>

From the above processModel section for web garden we are concerned with only two attributes "webgarden" and "cpuMask".

webGarden : Controls CPU affinity. True indicates that processes should be affinitized to the corresponding CPU. The default is False.

cpuMask : Specifies which processors on a multiprocessor server are eligible to run ASP.NET processes. The cpuMask value specifies a bit pattern that indicates the CPUs eligible to run ASP.NET threads. ASP.NET launches one worker process for each eligible CPU. If webGarden is set to false, cpuMask is ignored and only one worker process will run regardless of the number of processors in the machine. If webGarden is set to true, ASP.NET launches one worker process for each CPU that corresponds to a set bit in cpuMask. The default value of cpuMask is 0xffffffff.

Use 1 for the processor that you want to use for ASP.NET. Use 0 for the processor that you do not want to use for ASP.NET. For example, if you want to use the first two processors for ASP.NET of a four-processor computer, type 1100.


www.codecollege.NET

Monday, May 17, 2010

What are different IIS isolation levels?


IIS has three level of isolation:

* Low (IIS process) In this main IIS process and ASP.NET application run in same process. So if any one crashes the other is also affected. So all application and the IIS process runs on the same process. In case any website crashes it affects everyone.
* Medium (Pooled) In Medium pooled scenario the IIS and web application run in different processes. So in this case there are two processes process1 and process2. In process1 the IIS process is running and in process2 we have all Web applications running.
* High (Isolated) In high isolated scenario every process is running is there own process. This consumes heavy memory but has highest reliability.


www.codecollege.NET

Wednesday, May 5, 2010

What is a WebTest Container?


A .webtest file or .loadtest file is considered a test container in the same way that a dll which contains unit tests is a test container.


www.codecollege.NET