Monday, March 5, 2012

Online Products: Games, Laptops, Pen Drives, Mobiles

Flipkart.com

Flipkart.com

Wednesday, February 29, 2012

Chennai Customer Care Contact Details

Vodafone
Customer care: +91 98840 98840
vodafonecare.chn@vodafone.com


Standard Chartered Bank
Cards Helpline: 2811 1111

Other Cities



Citi Bank:

Phone Numbers:
Credit Card: 2852 2484
Suvidha: 2852 2484
Citibanking: 2852 2484
CitiBusiness: 2858 4653

Email-Id:
indiaservice@citicorp.com
For Other Cities



ICICI Bank:

Phone Number: 4208 8000
For Other Cities



Deutsche Bank:

Phone Number: 6601 6601
Email-Id: customer.care@db.com



SBI Credit Cards:
Phone Number: 3902 0202
Email-Id: feedback.gesbi@ge.com


ABN-AMRO:
Phone Number: 2821 5151


UTI Bank:
Phone Number: 2812 3888


IDBI Bank:
Phone Number: 2829 5550


HSBC:
Phone Number: 2526 9595


HDFC Bank:
Phone Numbers:
Credit Card: 6600 4332 Other Cities
Phone Banking: 6600 3333 Other Cities


Airtel:
Phone Number: 121 from your Airtel phone.
If you are calling from a landline, call: Postpaid:98400 12345, Prepaid:9840198401


Airtel Broadband:
Phone Number: 4211 2345

Aircel:
Postpaid Subscribers
Customer Care Centre : 98410 12345 Fax : 91 - 44 - 2849 5506
Prepaid Subscribers
Customer Care Centre : 98410 56789

BSNL-Chennai Telephones

B-Fone:
Name of
Service Centre
Address of
Customer Service
Centre
Contact
person
Phone
Numbers
Adyar Adyar Telephone Exchange
42 Dr Muthu Lakshmi Salai
Chennai - 600 020.
SDE
24411500
24411500
24903700
Alandur Area Office
South West Zone
No.6, New Street
Alandur
Chennai-600 016
(Opposite to RTO Office)
CRO
22315384
22315384
22316073
Ambattur Ambattur Telephone Exchange
241, MTH Road
Chennai - 600098
SDE
26524000
26524000
26259191
Anna Nagar Anna Nagar Telephone Exchange
105(Old E-6) 3rd Avenue
Anna Nagar East
Chennai-600102
SDE
26208000
26208000
26214848
26201900
Anna Nagar Area Office
North Peripheral Zone
M6 , 3rd Avenue
MK Building
Annanagar East
Chennai 600102
CRO
26206464
26287171
26206464
26206500
Anna Road Anna Road Telephone Exchange
10 Dams Road
Chennai-600002
SDE
28525050
28525050
28586010
28586011
Avadi MTH Road
Avadi
Chennai - 600 054
SDE
26384868
26384868
26381266
26381477
Chengalpattu Guntur Telephone Office
New Telephone Exchange
Guntur
Chengalpattu-603001
SDE
27432000
27430306
Chromepet No.7, Jagath Complex
2nd Main Road
New Colony
Chromepet
Chennai - 600 044
SDE
22382222
22382222
22414120
22414555
Ennore Ennore Telephone Exchange
404 T.H.Road
Ennore
Chennai 600019
JTO(Intl)
25726500
25726500
25736622
25736655
Flower Bazaar /Broadway Flower Bazaar Telephone Exchange
NSC Bose Road
Chennai 600001
SDE
25396969
25396969
Greams Road BSNL Teleshoppe
16-A,Greams Road
Chennai 600006
Manager
28294499
28294244
Greams Road Area Office
Central Zone
146, Greams Road
Chennai- 600006
CRO
28292447
28292535
28292445
Haddows Road Haddows Road Telephone Exchange
20, Haddows Road
Chennai 600006
SDE
28272000
28262000
28241789
28280303
Harbour/Beach Area Office
North East Zone
Wavoo Mansion
39 Rajaji salai
Chennai 600001
CRO
25219551
25219551
25212866
25212533
K.K. Nagar KK Nagar Telephone Exchange
99 Jawaharlal Nehru Road
KK Nagar
Chennai 600078
SDE
24711471
24711471
23717400
24852787
Kalmandapam Kalmandapam Telephone Exchange
21 GA Road
Old Washermanpet
Chennai 600021
SDE
25984499
25984499
25983200
25987171
Kellys Kellys Telephone Exchange
22 kellys Road
Chennai 600010
SDE
26442552
26442552
26442552
26606767
Kodambakkam Area Office
West Zone
36, Station Border Road
Kodambakkam
Chennai 600024
CRO
24849665
24849665
24844220
Madhavaram Madhavaram Telephone Exchange
1, E.B. Road
Sembium
Chennai-60011
SDE
26720100
25584040
26720100
Mambalam Telephone Exchange 484 Anna Salai
Nandanam
Chennai - 600 035.
SDE
24345000
24345000
24343397
24344247
Maraimalai Nagar MMDA Building
Maramalai Adigalar Salai-603209

27454666
Mylapore Mylapore Telephone Exchange
166, Luz Church Road
Chennai 60004
SDE
24996111
24996111
24994500
Nandanam Area Office
South East Zone
Old 407/408 New 808
Anna Salai
Nandanam
Chennai 600035
CRO
24330532
24330532
24347564
24330431
Padi BSNL Teleshoppe
Padi Telephone Exchange
96, Moorthy Nagar Main Road
Padi, Chennai-600050
SDE
26546000
26549000
Poonamallee Ponamallee Telephone Exchange
1 Bye-Pass Road
Chennai -600056
SDE
26490000
26490000
26494600
26494500
Porur Porur Telephone Exchange
78 Arcot Road
Chennai 600116
SDE
24765000
24766066
23860708
R.K. Nagar R.K.Nagar Telephone Exchange
238/164
R.K.Mutt Road
Chennai 600028
SDE
24615656
24956789
24934545
24955941
Vepery Area Office
North West Zone
52 EVK Sampath Salai
Periyar Building
Chennai - 600 007.
CRO
26618060
26618060
26618064


CellOne:

Location Address Phone Numbers
Adyar Adyar Telephone Exchange,42 Dr Muthu Lakshmi Salai,Chennai - 600 020. 24467923
24469890
Ambattur Ambattur Telephone Exchange, 241, MTH Road, Chennai 600098 26243900
26254848
Anna Nagar Anna Nagar Telephone Exchange, 105(Old E-6) 3rd Avenue, Anna Nagar East,Chennai-600102 26190300
26190555
26190808
Anna Road Anna Road Telephone Exchange,10 Dams Road, Chennai-600002 28411314
28414232
28411101
Chengalpattu Guntur Telephone Office, New Telephone Exchange, Guntur, Chengalpattu-603001 27429500
27429200
Chromepet Chromepet Telephone Exchange, 79, GST Road, Chennai 600044 22385657
22410100
Flower Bazaar /Broadway Flower Bazaar Telephone Exchange,NSC Bose Road, Chennai 600001 25396633
25397171
Greams Road BSNL Teleshoppe,16-A,Greams Road, Chennai 600006 28294244
28294488
K.K. Nagar KK Nagar Telephone Exchange, 99 Jawaharlal Nehru Road,KK Nagar, Chennai 600078 23710033
23710066
Kaladipet Kaladipet Telephone Exchange,85, T.H. Road, Chennai 600019 25995252
25992323
Kellys Kellys Telephone Exchange,22 kellys Road, Chennai 600010 26442552
26452444
26420404
Kodambakkam Area office West Zone,No.36, Station Border Road,Near Kodambakkam Railway Station, Chennai 600024 24732090
24732090
Madhavaram Madhavaram Telephone Exchange,1, E.B. Road, Sembium,Chennai-60011 25583030
26720100
Nandanam Area Office,South East Zone,Old 407/408 New 808, Anna Salai, Nandanam, Chennai 600035 24314001
24314002
24314003
Nanganallur B3 Lakshmi Nagar, 1st main Road,Nanganallur, Chenna-600061 22240000
Padi Padi Telephone Exchange,96, Moorthy Nagar Main Road,Padi, Chennai-600050 26546000
Porur Porur Telephone Exchange,78 Arcot Road, Chennai 600116 23860708
23862099
R.K. Nagar R.K.Nagar Telephone Exchange,238/164, R.K.Mutt Road, Chennai 600028 24621121
24934545
Vadapalani Rahat Plaza, Near Kamala Theatre,Opp. Vadapalani Bus Stand 24804499

Friday, December 30, 2011

Convert string to Enum instance

public void EnumInstanceFromString()
{
   // The .NET Framework contains an Enum called DayOfWeek.
   // Let's generate some Enum instances from strings.

   DayOfWeek wednesday = 
      (DayOfWeek)Enum.Parse(typeof(DayOfWeek), "Wednesday");
   DayOfWeek sunday = 
      (DayOfWeek)Enum.Parse(typeof(DayOfWeek), "sunday", true);
   DayOfWeek tgif = 
      (DayOfWeek)Enum.Parse(typeof(DayOfWeek), "FRIDAY", true);

   lblOutput.Text = wednesday.ToString() 
      + ".  Int value = " + ((int)wednesday).ToString() + "
";
   lblOutput.Text += sunday.ToString() 
      + ".  Int value = " + ((int)sunday).ToString() + "
";
   lblOutput.Text += tgif.ToString() 
      + ".  Int value = " + ((int)tgif).ToString() + "
";

}
 
 
The Enum.Parse method takes two or three arguments. The first is the 
type of the enum you want to create as output. The second field is the 
string you want to parse. Without a third input, the case of the input 
string must match an enum instance or the conversion fails. But the 
third input indicates whether to ignore case. If true, than wEdNEsDAy 
will still get converted successfully.
 
 

Example: Output

Wednesday. Int value = 3
Sunday. Int value = 0
Friday. Int value = 5
 

Cannot load the X.509 certificate identity specified in the configuration

You have a WCF application and trying to run it but it would not start.
In application event log you see Error event logged with Event ID 0:
2011-02-02 13:46:52 [(null)] [ApplicationName] [FATAL] -

— Exception data associated with the Log entry —System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.

at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement element)

at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)

at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)

at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)

at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName)

at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()

at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()

at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)

at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()

at System.ServiceModel.ClientBase`1..ctor()


Obviously the problem is with the certificate but the question is which one.
If application was developed by someone else it might be the case that developers were using certificates that don’t exist on your system, so you need to identify them.
WCF applications come with config file which are plain text. Usually they are in the same location as the application itself but with config extension. So if your WCF application name is ApplicationName.exethe config file should be ApplicationName.exe.config.

Open that file in notepad and look for
If the application is looking for the certificate or certificates then you should see something like:

In this line the certificate that the application is looking is called *.certificate.local. There might be more than one line like this but with different certificate names. Open management console and see if that certificate or certificates exists on your computer and are valid. If the certificate is not on the computer there are 2 posible option that you can try:
First: locate and install the missing certificate
Second: delete the line in the config file that is looking for the certificate. When deleting toy need to delete not only that one line but also before and after the line.

Also you could try to change the name of the certificate in config file to the one that exists on your system and is valid but I have not tried this option.

C# : get the Data Source Value in Connection string

return new SqlConnectionStringBuilder(Settings.Default.OperatorsConnectionString).DataSource;

Exposing a WCF Service With Multiple Bindings and Endpoints

Windows Communication Foundation (henceforth abbreviated as WCF) supports multiple bindings that allows developers to expose their services in a variety of ways.  What this means is a developer can create a service once and then expose it to support net.tcp:// or http:// and various versions of http:// (Soap1.1, Soap1.2, WS*, JSON, etc).  This can be useful if a service crosses boundaries between intranet and extranet applications for example.  This article walks through the steps to configure a service to support multiple bindings with Visual Studio 2008 and the .Net 3.5 framework.  For those that want to jump directly to the sample solution it can be found at the end of this article.

Setting Up The Test Solution

Below you will find the steps used to create the sample solution.  I’ll explain a few WCF concepts along the way but probably not all of them.  I will however link to relevant documentation where applicable.  To get started, within Visual Studio 2008 create a new WCF Service Application project.  This template can be found within the web section of Visual Studio 2008 as seen here.
image
After the project is initialized modify it so it contains four files, note this will require deleting the default files:  IMyService.cs, Service.cs, Service.svc, and Web.Config.  Once you have cleaned up the default template, it should look like this:
image
Creating Our Service Contract
The IMyService.cs file will contain our service contract.   In old ASMX services, in order to expose a method as a service one would attribute the method with the attribute of [WebMethod].  In WCF, everything is tied to a Service Contract.   By defining our service contract as an interface, any class that implements that interface can be exposed as a WCF service.  In order to achieve this a ServiceContract attribute will be placed on the interface and an OperationContract attribute will be placed on the method we want to expose for our service.  Our interface is going to be simple and will just contain one method to add two numbers.  Here is the sample.
[ServiceContract(Namespace="http://keithelder.net/Learn/WCF")]

    public interface IMyService

    {

        [OperationContract]

        int AddTwoNumbers(int x, int y);

    }
Implementing The Contract
The Service.cs file will contain the implementation of the IMyService interface.  Again, since we defined our contract as an interface our service class doesn’t need or have any attributes on it.  Here is the code:
    public class Service : IMyService    {        public int AddTwoNumbers(int x, int y)        {            return x + y;        }    }
Creating The Service Host
The file Service.svc will provide the endpoint for our URL that will be exposed by IIS.   Within this file, we only need one line which identifies the class that contains our service using the ServiceHost directive.  Here is the code for this file.
<%@ ServiceHost Language="C#" Debug="true" Service="WcfService1.Service" CodeBehind="Service.cs" %>
Now that we have the contract specified and implemented along with an endpoint to host the service everything from here on out is just configuration.  This is the beauty of WCF.   How we want the service to be exposed is stored within the web.config file.  There a lot of options in WCF and those just learning WCF are typically overwhelmed at the amount of options.  Luckily Microsoft has a tool to help us along.  The upside to this approach is we do not have to code how our service is secured as we did in older ASMX services.

Setting Up Basic Http Binding

Before we add multiple bindings to our single service, let’s focus on adding one binding.  In order to configure our service we are going to use the Microsoft Service Configuration Editor.  This editor allows us to configure our WCF service and can be launched right from Visual Studio.  To launch the editor, right click on the web.config file.  An option should be in the menu that says “Edit WCF Configuration”.  If it doesn’t don’t worry, sometimes, Visual Studio doesn’t pickup this option.  A trick is to go to the tools menu in Visual Studio and select the editor from there.  After the editor is launched it will then show up in the menu when you right click the web.config file.
For this example I have removed everything from the web.config file before launching so I can configure the service completely from scratch.  Opening the web.config with the editor shows a blank configuration as follows.
image
Follow the steps to initialize the configuration.
Step 1
Make sure your solution builds.
Step 2
Click “Create a New Service” in the right panel of the editor.
Step 3
Browse to the bin directory and select the WcfService1.dll (if the file doesn’t show up, go back to step 1)
image
Double click this file and select your service implementation.
image
Step 4
The service type should be displayed on the previous screen.  Press Next->.
Step 5
Select the contract.  This should automatically be selected to WcfService1.IMyService.  Press Next->.
Step 6
Since we are using IIS to host our service select the HTTP option for the communication mode.
image 
Step 7
Select the basic web services interoperability.  We’ll come back later on and add advance web services interoperability.
image
Step 8
Delete the “http://” from the address field.  Since we are developing we don’t know which port this will get assigned as of yet.
image
Press Next->.  A dialog will appear.  Select Yes.
image
Press Finish on the next screen.
At this point we have an almost configured service.  If you drill down into the Services folder within the tool down to the end point the configuration should look something like this.
image
Step 9
Let’s clean up our configuration.  In the screen shot above in the configuration section.  Give this endpoint a name of “Basic”.  This will let us know later on this endpoint is our BasicHttpBinding configuration which supports the SOAP1.1 protocol.
Step 10
Click on the “Services” folder in the editor.
image
Step 11
Next to the binding configuration there is a link that says “Click to Create”.  Click this link to create a binding configuration.  While this isn’t necessary in all instances it is a good practice to have a binding configuration.  This gives you more control over how your binding is configured and is a good practice to initialize early on.
Clicking this link will create a new binding.  In the name field under the configuration section, give it a name of “Basic”.  The defaults for this example are fine.
image
Note:  Clicking on the Security tab in the above screen the Mode should be set to None. 
At this point you should be able to save your configuration and press F5 in Visual Studio to launch your service in debug mode.  You should be presented with a web page that looks like the following:
image

Exposing Our Service’s WSDL

Unlike previous ASMX services, the WSDL (web service definition language) for WCF services is not automatically generated.  The previous image even tells us that “Metadata publishing for this service is currently disabled.”.  This is because we haven’t configured our service to expose any meta data about it.  To expose a WSDL for a service we need to configure our service to provide meta information.  Note:  The mexHttpBinding is also used to share meta information about a service.  While the name isn’t very “gump” it stands for Meta Data Exchange.  To get started configuring the service to expose the WSDL follow the following steps.
Step 1
Under the Advanced folder in the editor, select the “Service Behaviors”.
image
Click the “New Service Behavior Configuration” link in the right pane.
Step 2
Name the behavior “ServiceBehavior”.  In the bottom section press the add button and select the “serviceMetaData” option and press Add.
image
The end result should look like the following.
image
Step 3
Under the “Service Behaviors” folder, select the newly created “ServiceBehavior” option and then the “serviceMetadata” option underneath that.  In the right pane change the HttpGetEnabled to True.
image
Step 4
Select the service under the Services folder and apply the new service behavior to the service.
image
Step 5
Save the configuration and reload the service in the browser.  The page should be changed to the following:
image
Clicking on the link should display the WSDL for the service.
At this point our service is configured to support the SOAP1.1 protocol through the BasicHttpBinding and is also exposing the WSDL for the service. What if we want to also expose the service with the SOAP1.2 protocol and support secure and non-secure messages?  No problem.  We can expose the service all of those ways without touching any code only the configuration.

Adding More Bindings and Endpoints To Our Service

Now that we have the basic binding working let’s expose two additional endpoints for our service which support the WS* protocol but are configured differently.  We’ll expose a plain SOAP1.2 protocol message using the wsHttpBinding that is a plain message as well as a secured message using the wsHttpBinding.
Step 1
Under the Services folder select the EndPoints folder for the service and add a new service endpoint.  Give it a name of WsPlain.  This endpoint will serve as a standard SOAP1.2 message that isn’t encrypted.  Change the binding to wsHttpBinding.  In the address field, copy the address from your browser.  In my case, my project used the address of http://localhost:5606/Service.svc.  Paste this into the address field and add /WsPlain to the end of it so it looks like the following:
Each binding for each endpoint has to have a separate address.  Doing it this way allows us to keep our one service file and offer it up in various configurations.  In the contract option browse to the DLL in the bin directory and select the contract used previously.  The end result should look similar to this:
image
Step 2
Just as we did previously, click on the Services folder and create a binding configuration for this endpoint.  Refer to step 10 and 11 above.
Provide a name of WsPlain for the new binding.  In the security tab change the mode to “None” and set all other options to false or none.  This is setting up our binding so there is no security on our message.  By default the binding is configured to be secure.
image
The final settings for the WsPlain endpoint should be similar to this.
image
Step 3
To configure a secure binding using wsHttpBinding follow these same steps above but leave the default values in the security tab of the binding configuration.  Call this end point and binding WsSecured.  The new endpoint should look like this:
image
That’s it, our service is now configured three different ways and is configured to support SOAP1.1, SOAP1.2 and WS*.  Pretty cool huh?

Testing Our Service

Now that our service is configured with three different bindings, let’s look at the messages as they go back and forth across the wire.  In order to do this we are going to borrow knowledge from a previous article I did called “How to Get Around WCF’s Lack of a Preview Web Page and Viewing WCF Messages“.  From this article we are going to borrow the MessageViewerInspector class and build a small windows application to view our messages.
If you are still following along, add a new project of type Windows Application to the existing solution and then copy the MessageViewerInspector class from the referenced article and add it to the project.
If you have been following along you may have noticed that we only have one WSDL.  The WSDL contains all of our endpoints.  Even though we have three endpoints, we still only have one WSDL.  In testing with some third party clients my experience has been that clients only generate proxies for the endpoints they understand.  Add a service reference to the service to the windows application.
For the user interface I decided to use several split panels and create a three panel layout.  Here is what it looks like.
image
The idea is simple.  When I click on each button I want it to invoke my service and then display the request and response messages the service is using.  To do this I created one service method called CallService which is passed the end point name the service is to invoke.
        private void CallService(string endPoint)        {            MessageViewerInspector inspector = new MessageViewerInspector();

            ServiceReference1.MyServiceClient proxy = new WindowsFormsApplication1.ServiceReference1.MyServiceClient(endPoint);

            proxy.Endpoint.Behaviors.Add(inspector);            proxy.AddTwoNumbers(12332, 12323);            proxy.Close();

            richTextBox1.Text = inspector.RequestMessage;            richTextBox2.Text = inspector.ResponseMessage;        }
The endpoint is the name of the endpoint we specified in our configuration.  For example to invoke the secure wsHttpBinding it is called like this.
CallService("WsSecured");
The first thing created is create the inspector so messages can be viewed coming in and out of the proxy class.  Once the proxy method is called we can then grab the messages and put them into the RichTextBox control on the form.  Here are screen shots of each call to the service.
BasicHttpBinding – SOAP1.1
image
WsHttpBinding – SOAP1.2 Plain / Unsecured
image
WsHttpBinding – SOAP1.2 Secured
image

Conclusion

WCF services are powerful as you have just seen.  It is possible to expose a single service in more ways than just one.  This allows developers to support things like net.tcp binary messages and SOAP messages from the same service.  If you are an enterprise developer supporting multiple clients this is a blessing since it means .Net consumers of your service can use TCP while other consumers use WS*.  The nice thing is the developer doesn’t have to code it, just declaratively express how he wants the service configured. 

Intellisense not working in Visual Studio

"IntelliSense is Microsoft's implementation of autocompletion, best known for its use in the Microsoft Visual Studio integrated development environment. In addition to completing the symbol names the programmer is typing, IntelliSense serves as documentation and disambiguation for variable names, functions and methods using metadata-based reflection." (Wikipedia

So, I can't quite remember when exactly Intellisense stopped working for me in Visual Studio 2008, but I know I have been without (automatic) Intellisense for quite a while.When typing a dot after an object or method, it used to just show up automatically... I could however have it come up by pressing and eventually got in the habit of just doing that when I needed it, without attempting to find out exactly why it was broken in the first place...
So, several months later, I stumble upon an entry by Richard Fennell, who explains how to fix it. I thought I'd post it for when it breaks again, I know where to find the answer... 


In Visual Studio 2008, select Tools > Options > Text Editor > All Languages. Ensure that the checkboxes in the Statement Completion section are actively checked (not grayed out). 


That is it!. Click Ok and try it.