Thursday, 10 November 2011

WINDOWS COMMUNICATION FOUNDATION...!

Overview

Windows Communication Foundation takes many existing communication technologies, such as Web Services, Windows Remoting, Microsoft Message Queuing, and abstracts them into a single technology.  In most cases, this simplifies the way you communicate with other applications.  It also allows you to communicate with other applications without being coupled to a specific technology.  Therefore, you could use Web Services over SOAP to begin with, and later move to remote procedure calls (RPC) without changing your code, just the configuration of WCF.

The Basics

There are a few basic tasks when creating a WCF service.  The basic tasks that must be performed are, in order:

  1. Define the service contract. A service contract specifies the signature of a service, the data it exchanges, and other contractually required data.
  2. Implement the contract. To implement a service contract, create the class that implements the contract and specify some custom behaviors that the runtime should have.
  3. Configure the service by specifying endpoint information and other behavior information.
  4. Host the service in an application.
  5. Build a client application.


Example

To display a step-by-step enactment of the above steps, let’s define a web service that reports the current date/time:

1.1 Define a Service Contract

First, let’s create a project to house our service contract.  Let’s call it WCFDateTime.Service.

1.2 Define a Service Contract

Then, let’s define an interface that represents the service we’re going to provide.  In this case, let’s call it IDateTimeService.
public interface IDateTimeService
{
}

 

1.3 Define a Service Contract

            We need to add a method to our service that will return the current date/time:       
public interface IDateTimeService
{
DateTime GetCurrentDateTime();     
}    

 

1.4 Define a Service Contract

Now, we need to decorate our code with attributes so that WCF will recognize our interface and its methods.  Namely, we will add the following attributes:
·         ServiceContractAttribute
o        Identifies an interface as a WCF service contract
·         OperationContractAttribute
o        Identifies methods of an interface as WCF service operations, that is, methods that can be called through WCF
using System.ServiceModel;

[ServiceContract]
public interface IDateTimeService
{
      [OperationContract]
DateTime GetCurrentDateTime();     
}

In order to use the above attributes, you’ll need to add a reference to the System.ServiceModel assembly.  The service contract is now ready to be used.

 

2.1 Implement the Contract

Now that we’ve defined our service contract, we can move on to implementing it.  First, let’s create another project to house our server application.  Let’s call it WCFDateTime.Server, and make it a Console Application project.

2.2 Implement the Contract

Now, let’s implement the IDateTimeService.  The implementation is going to run on our server, to provide the date/time to whoever is going to consume our service.
In the WCFDateTime.Server project, let’s create a class called DateTimeService and have it implement IDateTimeService:
using WCFDateTime.Service;

public class DateTimeService : IDateTimeService
{
}
           
Remember to add a reference to the WCFDateTime.Service project so you can use IDateTimeService.

2.3 Implement the Contract

The above code will obviously not compile, because we did not implement the GetCurrentDateTime method:
public class DateTimeService : IDateTimeService
{
      public DateTime GetCurrentDateTime()
      {
            return DateTime.Now;
      }    
}
            That’s it!  The DateTimeService is now ready to be used.

3.1 Configure the Service

Now we need to configure our service so it can be consumed by client applications.  The simplest way to accomplish this is by adding an application configuration file (app.config or web.config) to the WCFDateTime.Server project:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <services>
            <service name="WCFDateTime.Server.DateTimeService">               
                <endpoint
                    address="http://localhost:8081/DateTimeService"
                    binding="wsHttpBinding"
                    contract="WCFDateTime.Service.IDateTimeService" />               
            </service>
        </services>
    </system.serviceModel>
</configuration>
            When defining an endpoint for WCF, remember your A-B-Cs:
1.      Address (where)
2.      Binding (how)
3.      Contract (what)

The address specifies the address where you want the service to be located.
The binding specifies the transport you want to use in order to provide the service.
The contract specifies what service will be provided

4.1 Host the Service in an Application

Now that WCF has been configured, the simplest way to host this service is to create a Console Application and use the ServiceHost class.  First, add a reference to the System.ServiceModel assembly.  Then, In the program.cs file of WCFDateTime.Server, do the following:

using System.ServiceModel;

namespace WCFDateTime.Server
{
    class Program
    {
        static public void Main(string[] args)
        {
            // Get a host for our service
            ServiceHost serviceHost = new ServiceHost(
                typeof(DateTimeService)
            );
   
            // Open the service host to start listening for incoming requests
            serviceHost.Open();

            // The service can now be accessed
      Console.WriteLine("The service is ready.");
      Console.WriteLine("Press <ENTER> to terminate service.");
      Console.ReadLine();

            // Close the service host
            serviceHost.Close();
        }
    }
}

By simply running this application, we expose our service so that client applications can use it.


5.1 Build a Client Application

To build a client application, we must create a new project for it.  Let’s call it WCFDateTime.Client, and make it a Console Application as well.

 

5.2 Build a Client Application

Now, we need to add an Application Configuration file, and give it some settings that will allow us to connect to the service we just created:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>       
        <client>
            <endpoint
                address="http://localhost:8081/DateTimeService"
                binding="wsHttpBinding"               
                contract="WCFDateTime.Service.IDateTimeService"
                name="MyDateTimeService">
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>
           
Now that our we’ve configured our WCF client, we can connect to it.  There are two ways to connect to the WCF service we previously created:
1.      Client proxy generation
2.      Channel factories
Most Microsoft articles will point you in the direction of using client proxies; however, for our purposes, channel factories are quicker to implement and more robust in a Model/View/Presenter architecture.


5.3 Build a Client Application

Now, add a reference to the System.ServiceModel and WCFDateTime.Service assemblies, and then add the following to the program.cs file:
using System.ServiceModel;
using WCFDateTime.Service;

class Program
{
    public static void Main(string[] args)
    {
        // Get a channel factory for our service,
        // using the configuration for "MyDateTimeService"
        // in the application configuration file.
        ChannelFactory<IDateTimeService> channelFactory =
            new ChannelFactory<IDateTimeService>("MyDateTimeService");

        // Get an instance of our service
        IDateTimeService service = channelFactory.CreateChannel();
       
        // Get the server’s date/time
        DateTime dt = service.GetCurrentDateTime();

        // Write the current server date/time
        Console.WriteLine("The current server time is " + dt);

        // Close the connection to our service
        channelFactory.Close();
    }
}

5.4 Build a Client Application

Your client application is now ready to run!  Simply start the WCFDateTime.Server application, and once it’s running, run the WCFDateTime.Client application to see it work!

Tuesday, 1 November 2011

How To Safely Delete SQL Server ErrorLog Files

Closes the current error log file and cycles the error log extension numbers just like a server restart. The new error log contains version and copyright information and a line indicating that the new log has been created.

One of my SQL Server ErrorLog files has grown to a very large size.  I'd like to delete it to free space on my hard drive.  Can the SQL Server ErrorLog file be safely deleted without harming SQL Server?


ANSWER:
By default SQL Server stores seven ErrorLog files named:
  • ErrorLog
  • ErrorLog.1
  • ErrorLog.2
  • ErrorLog.3
  • ErrorLog.4
  • ErrorLog.5
  • ErrorLog.6

In SQL server 2008, the ErrorLog files are stored in the C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log folder.  The ErrorLog file contains the newest information; the ErrorLog.6 file contains the oldest information.
Every time SQL Server is restarted, the log files cycle as follows:
  • All data in the ErrorLog.6 file is deleted and a new ErrorLog file is created. 
  • All data in the previous ErrorLog file is written to the ErrorLog.1 file. 
  • All data in the previous ErrorLog.1 file is written to the ErrorLog.2 file. 
  • All data in the previous ErrorLog.2 file is written to the ErrorLog.3 file. 
  • All data in the previous ErrorLog.3 file is written to the ErrorLog.4 file. 
  • All data in the previous ErrorLog.4 file is written to the ErrorLog.5 file. 
  • All data in the previous ErrorLog.5 file is written to the ErrorLog.6 file.

If one of the ErrorLog files has grown to a large size, the ErrorLog files can be manually cycled by running the sp_cycle_errorlog Stored Procedure.   
Note:  The data in the older ErrorLog files will be overwritten!  Copy the older ErrorLog files to some external media if they must be saved.
In SQL,the sp_cycle_errorlog Stored Procedure can be run from SQL Server Management Studio.

EXAMPLE :

EXEC sp_cycle_errorlog ;
GO
 

Saturday, 29 October 2011

uCertify Rapid Start Guide For Microsoft Exam 70-562-CSHARP

uCertify Rapid Start Guide For Microsoft Exam 70-562-CSHARP: This Microsoft certification exam measures your ability to develop applications using ASP.NET in a development environment that uses Microsoft Visual Studio 2008 and Microsoft .NET Framework 3.5. Maximize your performance on 70-562, a requi

Saturday, 17 September 2011

When to Use Inheritance

       Inheritance is a good choice when: 


  • Your inheritance hierarchy represents an "is-a" relationship and not a "has-a" relationship.
  • You can reuse code from the base classes.
  • You need to apply the same class and methods to different data types.
  • The class hierarchy is reasonably shallow, and other developers are not likely to add many more levels.
  • You want to make global changes to derived classes by changing a base class.

    Inheritance and "Is a" Relationships

    Two ways to show class relationships in object-oriented programming are "is a" and "has a" relationships. In an "is a" relationship, the derived class is clearly a kind of the base class. For example, a class named PremierCustomer represents an "is a" relationship with a base class named Customer because a premier customer is a customer. However, a class named CustomerReferral represents a "has a" relationship with the Customer class because a customer referral has a customer, but a customer referral is not a kind of customer.
    Objects in an inheritance hierarchy should have an "is a" relationship with their base class because they inherit the fields, properties, methods, and events defined in the base class. Classes that represent a "has a" relationship with other classes are not suited to inheritance hierarchies because they may inherit inappropriate properties and methods. For example, if the CustomerReferral class were derived from the Customer class discussed previously, it might inherit properties that make no sense, such as ShippingPrefs and LastOrderPlaced. "Has a" relationships such as this should be represented using unrelated classes or interfaces. The following illustration shows examples of both "is a" and "has a" relationships.

    Base Classess and code Reuse

    Another reason to use inheritance is the advantage of code reuse. Well-designed classes can be debugged once and used over and over as a basis for new classes.
    A common example of effective code reuse is in connection with libraries that manage data structures. Suppose, for example, that you have a large business application that manages several kinds of in-memory lists. One is an in-memory copy of your customer database, read in from a database at the beginning of the session for speed. The data structure might look something like the following:

    Global Changes to Derived Classes Through the Base Class 

    One of the most powerful features of inheritance is the ability to make changes in a base class that propagate to derived classes. When used carefully, you can update the implementation of a single method, and dozens—or even hundreds—of derived classes can use the new code. However, this can be a dangerous practice because such changes may cause problems with inherited classes designed by other people. Care must be taken to ensure that the new base class is compatible with classes that use the original. You should specifically avoid changing the name or type of base class members.





Tuesday, 13 September 2011

how to rename file when upload (change file name when upload)

  asp.net FileUpload example: how to rename file when upload (change file name when upload) 
string extension = Path.GetExtension(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(@"C:\Test\" + FileUpload1.FileName.Replace(FileUpload1.FileName, "Mandar" + extension));

Tip : To use Path.GetExtension() method ,Add namespace System.IO namespace at the top

Thursday, 8 September 2011

how to know about modified Stored procedure in database

How to see modified SP's in Database :

For SQL Server 2005 and 2008

SELECT
        [name]
       ,create_date
       ,modify_date
FROM
        sys.objects
order by modify_date Desc

For SQL Server 2000

SELECT
        [name]
       ,create_date
       ,modify_date
FROM
        sysobjects
order by modify_date Desc

SQL Script: Search all tables for a specific field

To Search specific column from all tables of databases, use following Query

USE database_name
GO
SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%SupplierID%'
ORDER BY schema_name, table_name;

Tuesday, 30 August 2011

Understanding the Dynamic Keyword in C# 4

The dynamic keyword and the Dynamic Language Runtime (DLR) are major new features in C# 4 and the Microsoft .NET Framework 4. These features generated a lot of interest when announced—along with a lot of questions. There were a number of answers as well, but they’re now spread throughout documentation and on various technical blogs and articles. So people continue asking the same questions again and again on forums and at conferences.
This article provides a general overview of the new dynamic features in C# 4 and also delves into some more in-depth information about how they work with other language and framework features, such as reflection or implicitly typed variables. Given there’s a lot of information available already, I’ll sometimes reuse classic examples with links to the original sources. I’ll also provide plenty of links for further reading

What Is Dynamic?

Programming languages are sometimes divided into statically typed and dynamically typed languages. C# and Java are often considered examples of statically typed languages, while Python, Ruby and JavaScript are examples of dynamically typed languages.
Generally speaking, dynamic languages don’t perform compile-time type checks and identify the type of objects at run time only. This approach has its pros and cons: Often the code is much faster and easier to write, but at the same time you don’t get compiler errors and have to use unit testing and other techniques to ensure the correct behavior of your application.
Originally, C# was created as a purely static language, but with C# 4, dynamic elements have been added to improve interoperability with dynamic languages and frameworks. The C# team considered several design options, but finally settled on adding a new keyword to support these features: dynamic.
The dynamic keyword acts as a static type declaration in the C# type system. This way C# got the dynamic features and at the same time remained a statically typed language. Why and how this decision was made is explained in the presentation “Dynamic Binding in C# 4” by Mads Torgersen at PDC09 . Among other things, it was decided that dynamic objects should be first-class citizens of the C# language, so there’s no option to switch dynamic features on or off, and nothing similar to the Option Strict On/Off in Visual Basic was added to C#.

A common example looks like this:
  1. dynamic d = "test";
  2. Console.WriteLine(d.GetType());
  3. // Prints "System.String".
  4.  
  5. d = 100;
  6. Console.WriteLine(d.GetType());
  7. // Prints "System.Int32".
As you can see, it’s possible to assign objects of different types to a variable declared as dynamic. The code compiles and the type of object is identified at run time. However, this code compiles as well, but throws an exception at run time:
  1. dynamic d = "test";
  2.  
  3. // The following line throws an exception at run time.
  4. d++;
The reason is the same: The compiler doesn’t know the runtime type of the object and therefore can’t tell you that the increment operation is not supported in this case.
Absence of compile-time type checking leads to the absence of IntelliSense as well. Because the C# compiler doesn’t know the type of the object, it can’t enumerate its properties and methods. This problem might be solved with additional type inference, as is done in the IronPython tools for Visual Studio, but for now C# doesn’t provide it.
However, in many scenarios that might benefit from the dynamic features, IntelliSense wasn’t available anyway because the code used string literals. This issue is discussed in more detail later in this article.

Dynamic, Object or Var?

So what’s the real difference between dynamic, object and var, and when should you use them? Here are short definitions of each keyword and some examples.
The object –keyword represents the System.Object type, which is the root type in the C# class hierarchy. This keyword is often used when there’s no way to identify the object type at compile time, which often happens in various interoperability scenarios.
You need to use explicit casts to convert a variable declared as object to a specific type:
  1. object objExample = 10;
  2. Console.WriteLine(objExample.GetType());
This obviously prints System.Int32. However, the static type is System.Object, so you need an explicit cast here:
  1. objExample = (int)objExample + 10;
You can assign values of different types because they all inherit from System.Object:
  1. objExample = "test";
The var keyword, since C# 3.0, is used for implicitly typed local variables and for anonymous types. This keyword is often used with LINQ. When a variable is declared by using the var keyword, the variable’s type is inferred from the initialization string at compile time. The type of the variable can’t be changed at run time. If the compiler can’t infer the type, it produces a compilation error:
  1. var varExample = 10;
  2. Console.WriteLine(varExample.GetType());
This prints System.Int32, and it’s the same as the static type.
In the following example, no cast is required because varExample’s static typed is System.Int32:
  1. varExample = varExample + 10;
This line doesn’t compile because you can only assign integers to varExample:
  1. varExample = "test";
The dynamic keyword, introduced in C# 4, makes certain scenarios that traditionally relied on the object keyword easier to write and maintain. In fact, the dynamic type uses the System.Object type under the hood, but unlike object it doesn’t require explicit cast operations at compile time, because it identifies the type at run time only:
  1. dynamic dynamicExample = 10;
  2. Console.WriteLine(dynamicExample.GetType());
This prints System.Int32.
In the following line, no cast is required, because the type is identified at run time only:
dynamicExample = dynamicExample + 10;
You can assign values of different types to dynamicExample:
dynamicExample = "test";
There’s a detailed blog post about differences between the object and dynamic keywords on the C# FAQ blog (bit.ly/c95hpl).
What sometimes causes confusion is that all of these keywords can be used together—they’re not mutually exclusive. For example, let’s take a look at this code:
  1. dynamic dynamicObject = new Object();
  2. var anotherObject = dynamicObject;
What’s the type of anotherObject? The answer is: dynamic. Remember that dynamic is in fact a static type in the C# type system, so the compiler infers this type for the anotherObject. It’s important to understand that the var keyword is just an instruction for the compiler to infer the type from the variable’s initialization expression; var is not a type.

The Dynamic Language Runtime

When you hear the term “dynamic” in regard to the C# language, it usually refers to one of two concepts: the dynamic keyword in C# 4 or the DLR. Although these two concepts are related, it’s important to understand the difference as well.
The DLR serves two main goals. First, it enables interoperation between dynamic languages and the .NET Framework. Second, it brings dynamic behavior to C# and Visual Basic.
The DLR was created based on lessons learned while building IronPython (ironpython.net), which was the first dynamic language implemented on the .NET Framework. While working on IronPython, the team found out that they could reuse their implementation for more than one language, so they created a common underlying platform for .NET dynamic languages. Like IronPython, the DLR became an open source project and its source code is now available at dlr.codeplex.com.
Later the DLR was also included in the .NET Framework 4 to support dynamic features in C# and Visual Basic. If you only need the dynamic keyword in C# 4, you can simply use the .NET Framework and in most cases it will handle all interactions with the DLR on its own. But if you want to implement or port a new dynamic language to .NET, you may benefit from the extra helper classes in the open source project, which has more features and services for language implementers.

Using Dynamic in a Statically Typed Language

It’s not expected that everybody should use dynamic whenever 
possible instead of the static type declarations. Compile-time checking is a powerful instrument and the more benefits you can get from it, the better. And once again, dynamic objects in C# do not support IntelliSense, which might have a certain impact on overall productivity.
At the same time, there are scenarios that were hard to implement in C# prior to the dynamic keyword and the DLR. In most cases they used System.Object type and explicit casting and couldn’t get much benefit from compile-time checking and IntelliSense anyway. Here are some examples.
The most notorious scenario is when you have to use the object keyword for interoperability with other languages or frameworks. Usually you have to rely on reflection to get the type of the object and to access its properties and methods. The syntax is sometimes hard to read and consequently the code is hard to maintain. Using dynamic here might be much easier and more convenient than reflection.
Anders Hejlsberg gave a great example at PDC08 (channel9.msdn.com/pdc2008/TL16) that looks like this:
  1. object calc = GetCalculator();
  2. Type calcType = calc.GetType();
  3. object res = calcType.InvokeMember(
  4.   "Add", BindingFlags.InvokeMethod, 
  5.   nullnew object[] { 1020 });
  6. int sum = Convert.ToInt32(res);
The function returns a calculator, but the system doesn’t know the exact type of this calculator object at compile time. The only thing the code relies on is that this object should have the Add method. Note that you don’t get IntelliSense for this method because you supply its name as a string literal.
With the dynamic keyword, this code looks as simple as this one:
  1. dynamic calc = GetCalculator();
  2. int sum = calc.Add(1020);
The assumptions are the same: There’s some object with an unknown type that we expect to have the Add method. And similar to the previous example, you don’t get IntelliSense for this method. But the syntax is much easier to read and use and looks similar to calling a typical .NET method.

Friday, 26 August 2011

Insert Values from One table anothertable in another database

INSERT INTO database1.dbo.table (column1, column2)
SELECT column1, column2 FROM database2.dbo.table

Tuesday, 19 July 2011

Multi select ListBox with OR search using SP---Amazing!

FUNCTION [dbo].[StringSplit](@String varchar(8000), @Delimiter char(1))     
returns @temptable TABLE (items varchar(8000))     as     begin     
        declare @idx int     
        declare @slice varchar(8000)     
    
        select @idx = 1     
                if len(@String)<1 or @String is null  return     
    
        while @idx!= 0     
        begin     
                set @idx = charindex(@Delimiter,@String)     
                if @idx!=0     
                        set @slice = left(@String,@idx - 1)     
                else     
                        set @slice = @String     
                
                if(len(@slice)>0)
                        insert into @temptable(Items) values(@slice)     

                set @String = right(@String,len(@String) - @idx)     
                if len(@String) = 0 break     
        end return     end

Wednesday, 13 July 2011

How To Find any procedure or table name

SELECT name, create_date, modify_date,*
FROM sys.objects
WHERE type = 'P'
AND name = 'HVS_Sp_SetVoucherBalanceAmountforBookingReference'

Tuesday, 28 June 2011

IEnumerable in .Net 3.5

IEnumerator is the base interface for all nongeneric enumerators.
For the generic version of this interface see IEnumerator<T>.
The foreach statement of the C# language (for each in Visual Basic) hides the complexity of the enumerators. Therefore, using foreach is recommended instead of directly manipulating the enumerator.
Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.
Initially, the enumerator is positioned before the first element in the collection. The Reset method also brings the enumerator back to this position. At this position, calling the Current property throws an exception. Therefore, you must call the MoveNext method to advance the enumerator to the first element of the collection before reading the value of Current.
Current returns the same object until either MoveNext or Reset is called. MoveNext sets Current to the next element.
If MoveNext passes the end of the collection, the enumerator is positioned after the last element in the collection and MoveNext returns false. When the enumerator is at this position, subsequent calls to MoveNext also return false. If the last call to MoveNext returned false, calling Current throws an exception. To set Current to the first element of the collection again, you can call Reset followed by MoveNext.
An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an InvalidOperationException. If the collection is modified between MoveNext and Current, Current returns the element that it is set to, even if the enumerator is already invalidated.
The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads

Friday, 24 June 2011

WCF Security

1. Add foolowing tag to web.config

 <bindings >
      <webHttpBinding >
        <binding name="TransportSecurity">
          <security mode ="Transport">
            <transport clientCredentialType ="None"/>
          </security> </binding>
      </webHttpBinding>
    </bindings>

2. Tie up the binding and specify HTTPS configuration

We need now tie up the bindings with the end points. So use the ‘bindingConfiguration’ tag to specify the binding name. We also need to specify the address where the service is hosted. Please note the HTTS in the address tag.

Change ‘mexHttpBinding’ to ‘mexHttpsBinding’ in the second end point.

<service name="WCFWSHttps.Service1" behaviorConfiguration="WCFWSHttps.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="https://localhost/WCFWSHttps/Service1.svc" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="WCFWSHttps.IService1"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
</service>

In the ‘serviceMetadata’ we also need to change ‘httpGetEnabled’ to ‘httpsGetEnabled’.

<serviceBehaviors>
........
.........
<serviceMetadata httpsGetEnabled="true"/>
.........
.........
</serviceBehaviors>


3.

Make the web application HTTPS enabled


 

So click on the server certificate tab and you will then be walked through an IIS certificate wizard. Click ‘Assign a existing certificate’ from the wizard








You can see a list of certificates. The  certificate is the one which we just created using ‘makecert.exe’.




Suppress the HTTPS errors

using System.Net.Security;
using System.Security.Cryptography.X509Certificates;