Monday, September 2, 2013

Advantages of Using a Server Side Technology

The following are the advantages of using Server-Side Technology 

  1. Allows you to run programming languages that are not supported by your browser
  2. Enable browser independent application, without using browser client side programming features suck as using Java applets , ActiveX components
  3. Can provide client with data that is reside only on server but not on client
  4. Page can load faster than with Client side such as Java applet or ActiveX components, because in the end you are actually downloading a page of HTML
  5. It also provide increased security, since your code can never be viewed on browser
With all these advantages it doesn't mean that we should always use Server side technology, for example the workload on your server will increase if your web site become popular and you will need to buy expensive hardware to full fill your viewers requirement, so in that case Client Side Technology will do the trick

Sunday, September 1, 2013

How to Publish Web Service In IIS

Hello,
         In this post I will show you how to publish your web service in IIS so that users on other computer can access it.

In the previous tutorial I showed you how to publish web service in Visual Studio, If you don't know how to do that than please look at this POST first

1. Ok First open up IIS Manager
I'm using IIS version 6.1

2. Now on the left side expand Site Folder than Default Web Site

3. Here You will find a folder name as webservice2, this is the name of my web service, this might be different for you if you set your web service name something else.

4. Now right click on your web service and click on Convert to Application

5. A window will pop-up just leave everything as it as, and click on OK


Now You have successfully published you web service.

Thanks

Friday, August 30, 2013

HOW TO ACCESS YOUTUBE ON PTCL DSL WITHOUT PROXY OR SOFTWARE

Hello,
        
As You already know that PTCL (Pakistan Telecom Corporation Limited) has blocked the access of Youtube.com


Most people use hotspot shield, VPN or other types of proxies to access youtube.com.

Although it allows them to access blocked content but there is also a risk of security breach, as all your data go through a 3rd party server which can be decrypt or trace easily

So In this tutorial I will show you guys how to access youtube.com without using any proxy server OR Software.

This tutorial will mainly focus DSL technology OR precise PTCL DSL, I haven't tried this on cable-Net .

Ok So lets start

1. Open up control panel and click on Network And Sharing Center

2. On the left side click on Change Adapter Settings

3. Now right click on your LAN connection and click on properties

4. Now select Internet Protocol Version 4 (TCP/IPv4) and than click on Properties


5. Select Use the following DNS server addresses, and enter the following DNS
  • Prefered DNS Server    8.8.8.8
  • Alternate DNS Server 8.8.4.4

6. Click on OK, than again OK

Now open up your firefox,OR if it is already opened than restart it and in the address bar type

https://youtube.com

Remember it's https not http, so if you type http without s than youtube will not open.

Enjoy youtube

Thanks

Monday, August 26, 2013

System.IO.FileInfo cannot be serialized because it does not have a parameterless constructor.


Today I was working on Web Service in C#, my task was to get total number of files from specific directory their name, extension and than return this information to calling program.
This is the code I wrote for the above purpose


   1:  [WebMethod]
   2:          public FileInfo[] getDirectory(string dir)
   3:          {
   4:              DirectoryInfo objDI = new DirectoryInfo(dir);
   5:              FileInfo[] files= objDI.GetFiles();
   6:              return files;
   7:          }

 

But On execution I had the following error

Basically this error is straight forward the purpose of XML serialization is to encode the data so that it can be send over the internet, and at the receiving end can be decoded easily.



Now to re-create the data, the receiving end would call the default constructor, since no default constructor(parameter less) is defined, the data cannot be re-created, so the compiler is warning that serialization is not possible

To fix this error I created a custom class, assign data to the class than add the class in list, Finally return the list.





   1:  [WebMethod]
   2:   
   3:          public List<myClass> getDirectory()
   4:          {
   5:              List<myClass> objlist = new List<myClass>();
   6:              DirectoryInfo objDI = new DirectoryInfo(@"d:\magicdisc");
   7:              FileInfo[] files = objDI.GetFiles();
   8:              myClass c;
   9:              foreach (FileInfo f in files)
  10:              {
  11:                  c = new myClass();
  12:                  c.Name1 = f.Name;
  13:                  c.Extension = f.Extension;
  14:                  objlist.Add(c);
  15:              }
  16:              return objlist;
  17:          }

This way you can return all those classes which can't be serialized.

If you have further queries than do comment.

Thanks

Friday, August 23, 2013

Optical TDM Advantages & Disadvantages

OTM was introduced because TDM Time Division Multiplexing couldn't be use for Optical Links

OPTICAL TDM NETWORKS

  • OTDM requires the use of very short optical pulse because these network operates at a rate of 100 Gbps & above
  • At such high rates transmission properties of the optical fiber interact with optical signal
  • In particular , dispersion has a great impact on distance bandwidth product OR BL product
DRAWBACKS OF OTDM

  • OTDM is synchronization dependent
  • To maintain synchronization at rate of 100 Gbps & above is challenging
  • Lack of synchronization may result in collision on the channel
  • TDM frame structure dictates the transmissions & reception of client traffic & thereby destroy the transparency against different protocol
  • Protocol transparency is a problem in OTDM network
Three types of networks

      1.Transparent DWM Network

A network which doesn't require any OEO Optical-Electric-Optical conversion

      2.OPAQUE DWM Network

A network which completely blocks a signal

      3.Translucent DWM Network 

 A network which doesn't block the signal, signal is sent using optical bypass