Showing posts with label Visual Studio 2011. Show all posts
Showing posts with label Visual Studio 2011. Show all posts

Tuesday, March 18, 2014

Basic and architecture Windows and SQL Azure interview questions and answers...

Here is the list of basic and architectural Windows Azure interview questions and answers. Will uncover and add some more as we move along and learn. Intend to grow this list further....

What are the services provided in Cloud Computing/Azure?
Services provided would be basically three fundamental models: Infrastructure as a service (IaaS), Platform as a service (PaaS), and Software as a service (SaaS).
 
What are the steps involved in creating a Windows Azure Project with Visual Studio?
Refer for detailed steps here -http://msdn.microsoft.com/en-us/library/windowsazure/ee405487.aspx 

What are various roles available in Windows Azure?
There are three roles (Web, worker, VM) available. Web and Worker roles are nearly identical: With Web and Worker roles, the OS and related patches are taken care for you; you build your app's components without having to manage a VM.

What are the three main components of Windows Azure Platform?  
  1. Compute
  2. Storage
  3. AppFabric
What are the benefits of Azure?
  • Platform as a Service (PaaS) / Infrastructure as a Service (IaaS) / Software as a Service (SaaS)
  • Variable pricing - see here (Azure retail subscription pricing calculator
  • On demand and simple service procurement
  • More predictable solution environments
  • Small infrastructure management responsibility
  • Scalability with Global model - 15 global data centers (to date) and growing...
  • Security/privacy compliance – HIPAA, PCI DSS, SOC 1, SOC 2, ISO 27007
  • Compatibility with existing development tools
What are the capabilities that are provided with Visual Studio?
  • Windows Azure Cloud Service Visual Studio Template
  • http://msdn.microsoft.com/en-us/library/windowsazure/ee405487.aspx
  • ASP.Net web role
  • WCF Service web role
  • Worker Role with Service Bus Queue
  • Worker Role
  • Cache Worker Role – provides a dedicated cache
  • Integration with Emulators
  • Sophisticated debugging and tracing capability including remote debugging w/- SDK 2.2
  • Publish capability
  • Basic Azure component management in Server Explorer
  • Azure storage error log and application diagnostic analysis
What is Windows Azure compute emulator? 
The compute emulator is a local emulator of Windows Azure that you can use to build and test your application before deploying it to Windows Azure. 
  
What is the difference between Web Sites versus Web Roles (Azure Compute Services)?
  • Web site uses .azurewebsites.net versus .cloudapp.net for web roles
  • Web sites offer very quick deployment, scaling and rollback
  • Web sites have out of box support for Git and other continuous publishing tools
  • Web sites have less capability than web roles e.g. no remote management, no traffic manager
  • Web sites are good for a 2-tier application architecture
  • 10 per region multi-tenant web sites are free
Which is the latest version of Microsoft Windows Azure? (March 2014) and what are some of the key features/capabilities that come along with SDK v2.2?

SDK v2.2 -
•BizTalk Services: EDIFACT protocol support, Service Bus Integration, Backup and Restore
•Web Sites: Backup and Restore Support
•HDInsight: Hadoop 2.2 support
•Mobile Services: .NET support, Notification Hub Integration, PhoneGap support
•Management: Co-admin limit increased from 10->200 users
•Monitoring: Service Outage Notifications Integrated within Management Portal
•Virtual Machines: VM Agent and Background Information Support
•ExpressRoute: Dedicated, private, high-throughput network connectivity with on-premises.
Pricing - $5000 per month for 10GBps connection 
•Active Directory: More SaaS apps, more reports, self-service group management
 
What are Windows Azure Data Services? 
Windows Azure SQL Database Service provides -
  • Data replication – backups are only required for user / application errors
  • Relational data structures
  • Only SQL authentication
  • No always-on availability groups
  • SQL Data Sync for mirroring
  • No SQL Server Agent – use worker roles and windows workflow foundation (WWF)
  • Data Sharding – SQL Azure Database federation:
  • http://msdn.microsoft.com/en-us/library/windowsazure/hh597452.aspx
  • Database backup and auomatic scheduled data backup to Azure Storage
What is Blob?
BLOB stands for Binary Large Object. Blob is file of any type and size.
The Azure Blob Storage offers two types of blobs –
1. Block Blob
2. Page Blob 
                                         
What is Windows Azure AppFabric? What are various services provided?
  • Windows Azure AppFabric is a part of the Microsoft Windows Azure Platform. Positioned by Microsoft as middleware, it provides several cloud computing services:
  • Access Control Service: Provides an easy way for web applications and web services to identify users, and grant access control to the applications and services.
  • AppFabric Applications: Provides tools and APIs for developing and hosting a composite application expressly for deployment through the service.
  • Service Bus: Provides secure connections between distributed and disconnected applications in the cloud.
  • Caching: Provides a distributed, in-memory, application cache service for Windows Azure and SQL Azure applications.
  • Integration: Leverages several capabilities of Microsoft BizTalk Server such as transforming messages from one format to another, or providing a queue for message passing.
What is a Queue in Azure terminology?
http://www.windowsazure.com/en-us/documentation/articles/storage-dotnet-how-to-use-queues-20/

Features provided by HDInsight?
Here's a quick start tutorial to get started and learn basics on HDInsight - http://www.windowsazure.com/en-us/documentation/articles/hdinsight-get-started/
  •  Provides nice way to also use Microsoft Office tools like Excel to view output using power query and more with power BI features.
  • HDInsight is our 100% compatible Apache Hadoop-based distribution for Windows Azure.  With HDInsight you can leverage data stored in Windows Azure Blob Storage or the native HDFS file system local to the compute nodes and crunch massive amounts of data.
    We now support Hadoop 2.2 clusters (in preview mode) with our HDInsight service.  This new update provides an order of magnitude (up to 40x) faster query response times, much better data compression (up to 80%), and enables you to leverage the benefits of YARN.
What are Azure app Services?
1 Media Services
.Net libraries (Media Services SDK) for uploading, storing, encoding, format converting, protection and delivery of media
2 Azure content delivery network (CDN) for Azure storage accounts -
http://www.windowsazure.com/en-us/documentation/articles/media-services-dotnet-get-started/
3 Service Bus Explorer- .Net library and components for message communication processing. Architecture approach for communicating between on premise and private cloud to Azure Components.
http://code.msdn.microsoft.com/Service-Bus-Explorer-f2abca5a

4 Queues (FIFO)  -
http://www.windowsazure.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/

5 Topics and Subscriptions – Topic filters– Special implementation of a queue that uses a subscriber model -
 
6 Relays – provides capability to communicate to existing WCF corporate domain web services
7 Notification Hubs – pushing cross-platform back end notifications to mobile clients. Get started building these applications on Windows Azure and learn about notification hubs here -
http://www.windowsazure.com/en-us/documentation/articles/notification-hubs-windows-phone-get-started/
8 Scheduler (new) -
This is an exposed API for job operations and helps create jobs on a schedule:
http://msdn.microsoft.com/en-us/library/windowsazure/dn495651.aspx
9 BizTalk Services -B2B EDI in Azure
EAI in Azure
10 Active Directory -
Identity management in Azure
Can sync with access control service (ACS)
Can sync with on premise Active Directory
11 MSFT Active Directory Federated Services - https://corp.sts.microsoft.com/Onboard/ADFSOnboard.htm
http://sharepoint/sites/windowsazure/windowsazureinternal/Pages/ADFSAuthentication.aspx

.... Cheers - DJ
  

Saturday, December 29, 2012

Entity Framework 6: now available

Entity Framework 6: Preview Alpha 2 released recently... few key features:

  • Async language support is now available for queries and updates when running on .NET 4.5.
  • Custom conventions now provide the ability to override the default conventions that Code First uses for mapping types, properties, etc. to your database.
  • Multi-tenant migrations allow the same database to be used by multiple contexts with full Code First Migrations support for independently evolving the model backing each context.
  • Using Enumerable.Contains in a LINQ query is now handled much more efficiently by EF and the SQL Server provider resulting greatly improved performance.
  • All features of EF6 (except async) are available on both .NET 4 and .NET 4.5. This includes support for enums and spatial types and the performance improvements that were previously only available when using .NET 4.5.
  • Start-up time for many large models has been dramatically improved thanks to improved view generation performance. 
Entity Framework 6 is the first open source release of Entity Framework being developed in CodePlex. The preview release of EF6 is also available on NuGet, and contains some really great features for you to try.

Entity Framework 5 release is available on NuGet and has following key features:

  • Enum support allows you to have enum properties in your entity classes. This new feature is available for Model, Database and Code First.
  • Table-valued functions in your database can now be used with Database First.
  • Spatial data types can now be exposed in your model using the DbGeography and DbGeometry types. Spatial data is supported in Model, Database and Code First.
The following new features are also available in the Entity Model Designer in Visual Studio 2012:
  • Multiple-diagrams per model allows you to have several diagrams that visualize subsections of your overall model.
  • Batch import of stored procedures allows multiple stored procedures to be added to the model during model creation.
- DJ

Monday, September 26, 2011

How to create Silverlight applications using Expression Studio - basics and fun learning

Learn how to create Silverlight applications using Expression Studio and to apply user interface design principles with the toolbox integrated course. Learn practical techniques to master creating Silverlight applications using Expression studio.


http://www.microsoft.com/design/toolbox/


School learning and helpful for fun study projects -
http://www.microsoft.com/design/toolbox/school/


- Dipesh Joshi

Sunday, September 25, 2011

WCF Interview questions and answers (reference only, uuber level)

The intent to draft this list of questions is for learning purpose only and at very high level understanding of WCF services. This is not a dump :)

Question 1: What is the difference WCF and Web services?
Answer: -
Web services can only be invoked by HTTP. While Service or a WCF component can be invoked by any protocol and any transport type. Second web services are not flexible. However, Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends.
Question 2: What are different bindings supported by WCF?
Answer: -
WCF includes predefined bindings. They cover most of bindings widely needed in day-to-day application. However, just incase you find that you need to define something custom WCF does not stop you. So let us try to understand what each binding provides.
BasicHttpBinding: - This binding is used when we need to use SOAP over HTTP. This binding can also be configured to be used as HTTPS. It can be also configured to send data in plain text or in optimized form like MTOM.
WsHttpBinding: - It is same like BasicHttpBinding. In short, it uses SOAP over HTTP. But with it also supports reliable message transfer, security and transaction. WS-Reliable Messaging, security with WS-Security, and transactions with WS-Atomic Transaction supports reliable message.
NetTcpBinding: - This binding sends binary-encoded SOAP, including support for reliable message transfer, security, and transactions, directly over TCP. The biggest disadvantage of NetTcpBinding is that both server and client should be also made in .NET language.
NetMsmqBinding: - This binding sends binary-encoded SOAP over MSMQ. This binding can only be used for WCF-to-WCF communication.
NetNamedPipesBinding:-Ths binding Sends binary-encoded SOAP over named pipes. This binding is only usable for WCF-to-WCF communication between processes on the same Windows-based machine.

Note: - An interprocess control (IPC) protocol is used for exchanging information between two applications, possibly running on different computers in a network. The difference between Named pipes and TCP is that named pipes have good performance in terms of communication with in processes. But when it comes to communicate across network TCP holds the best choice. So if you are using WCF to communicate with process it’s the best choice to use in terms for performance. Named pipes do not perform when the traffic is heavy as compared to TCPIP.

Question 3: What are the main components of WCF?
Answer: -
We need to define three main components in WCF:-
• Service class. • Hosting environment • End point

Question 4: What are the various ways of hosting a WCF service?
Answer: -
There are three major ways to host a WCF service:-
• Self-hosting the service in his own application domain. This we have already covered in the first section. The service comes in to existence when you create the object of Service Host class and the service closes when you call the Close of the Service Host class.
• Host in application domain or process provided by IIS Server.
• Host in Application domain and process provided by WAS (Windows Activation Service) Server.

Question 5: What is a service level message and transport level message?
Answer: -
You can log WCF message at two levels one is service level and the other is transport level. Service level:-In this the messages are logged as they enter the user code or leave the user code. Transport level: - In this the messages are logged as they are ready to be encoded / decoded. All transport level, infrastructure messages and also reliable messaging is logged. You specify the message levels in the diagnostics node as shown in the below code snippet.

Question 6: For which bindings are transport, message and mixed mode supported?
Answer: -
Below is a table which shows for which binding which mode is supported. We did not discuss the mixed mode. It’s nothing but combination of transport and mixed mode. For instance data encrypted and passed over WsHttp using HTTPS is a mixed mode of security. Encryption is nothing but message security and HTTPS is a transport mode. In a combination they form mixed mode.

Question 7: Which bindings in WCF support the message streaming?
Answer: -
Following bindings supports the streaming in WCF:
1. basicHttpBinding 2. netTcpBinding 3. netNamedPipeBinding

Question 8: What are the various ways of hosting a WCF Service?
Answer: - 1.IIS 2.Self Hosting 3.WAS (Windows Activation Service)

Question 9: What is the use of ServiceBehavior attribute in WCF ?
Answer: -
ServiceBehaviour attribute is used to specify the InstanceContextMode for the WCF Service class (This can be used to maintained a state of the service or a client too).

There are three instance Context Mode in the WFC PerSession : This is used to create a new instance for a service and the same instance is used for all method for a particular client. (eg: State can be maintained per session by declaring a variable) PerCall : This is used to create a new instance for every call from the client whether same client or different. (eg: No state can be maintained as every time a new instance of the service is created) Single : This is used to create only one instance of the service and the same instance is used for all the client request. (eg: Global state can be maintained but this will be applicable for all clients)

Question 10: How the concurrency mode is specified in WCF service?
Answer: - The concurrency mode is specified using the ServiceBehavior attribute on the class that implements the service. Ex. [ServiceBehavior(ConcurrencyMode=ConcurrencyMode.Single)] Public class ServiceClass : IServiceInterface{ //Implementation Code } There are 3 possible values of ConcurrencyMode enumeration Single Reentrant Multiple.

Question 11: hat the different transaction options ?
Answer:-

We can specify transaction in 3 ways in WCF:-
TransactionFlowOption.NotAllowed This is a default option. Using this option no transaction will be propagated across the binding. If any client attempts to call the WCF service in a transaction it will be ignored for this option. This option specifies that client can call this WCF service in a transaction. It’s not compulsory that the service needs to be called in a transaction. You can call without the transaction also. TransactionFlowOption.Mandatory This option specifies that client must call the WCF service in a transaction mode. If the WCF service is called without transaction, ‘FaultException’ will be raised.

Question 12: Wat are the advantages of hosting WCF Services in IIS as compared to self-hosting?
Answer: - There are two main advantages of using IIS over self-hosting:-


Automatic activation IIS provides automatic activation that means the service is not necessary to be running in advance. When any message is received by the service it then launches and fulfills the request. But in case of self hosting the service should always be running.
Process recycling If IIS finds that a service is not healthy that means if it has memory leaks etc, IIS recycles the process. Ok let us try to understand what is recycling in IIS process. For every browser instance, a worker process is spawned and the request is serviced. When the browser disconnects the worker, process stops and you loose all information. IIS also restarts the worker process. By default, the worker process is recycled at around 120 minutes. So why does IIS recycle. By restarting the worker process it ensures any bad code or memory leak do not cause issue to the whole system. In case of self-hosting both the above features, you will need to code yourself.

Question 13: What is trace listener?

Answer - ‘Tracelistener’ are objects that get tracing information from the trace class and they output the data to some medium. For instance you can see from the figure ‘TraceListener’ how it listens to the trace object and outputs the same to UI, File or a windows event log. There are three different types of ‘tracelistener’ first is the ‘defaulttracelistener’ (this outputs the data to UI), second is ‘textwritertracelistener’ (this outputs to a file) and the final one is ‘Eventlogtracelistener’ which outputs the same to a windows event log.

Question 14: What is service host factory in WCF?
Answer-

1. Service host factory is the mechanism by which we can create the instances of service host dynamically as the request comes in.
2. This is useful when we need to implement the event handlers for opening and closing the service.
3. WCF provides ServiceFactory class for this purpose.

Question 15: What are the advantages of hosting WCF service in WAS?

Answer- WAS (Windows Activation Service) is a component of IIS 7.0. Following are few advantages : 1. We are not only limited to HTTP protocol. We can also use supported protocols like TCP, named pipes and MSMQ 2. No need to completely install IIS. We can only install WAS component and keep away the WebServer.

Question 16: In WCF which bindings supports the reliable session?

Answer- In WCF, following bindings supports the reliable session - 1. wsHttpBinding 2. wsDualHttpBinding 3. wsFederationHttpBinding 4. netTcpBinding

Reference - Prasham on dotnetfunda.com and Pro WCF: Practical Microsoft SOA Implementation -- Chris and Denis Mulder – Apress 2007.

- DJ

Friday, September 23, 2011

Asp.net migration to Sharepoint

ASP.NET web developers who are moving to SharePoint site creation. This article will explain in detail how an ASP.NET webpage developed in Visual Studio can be converted into a SharePoint site. If there is a requirement for a website created in Visual Studio, just the old fashioned way with the code-behind logic and other layers like Data Access and Business Logic, to be converted into a SharePoint site, and still make it work the same way with the same code-behind, you are in the right place. The article here along with the code explains 3 core steps that will help you to transform your ASP.NET Web Application into a SharePoint site. Step1: Add a Web Deployment Project to your website solution that will create a single DLL for the website. This step will give us the code-behind DLL and other dependency DLLs for the website. Step2: Copy the bin folder items (DLLs) into the SharePoint site, and tweak the web configuration file of the SharePoint site to use the copied DLLs. Step3: Open your created SharePoint site in SharePoint Designer and import the web pages from our web application and link it to the appropriate DLLs. Code and detail step by step instructions on code project - http://www.codeproject.com/KB/sharepoint/ASPNET_to_Sharepoint.aspx There are more instructions @ http://aspnet2sp.codeplex.com/ http://weblogs.asp.net/bsimser/pages/spsmigration.aspx

Tuesday, September 20, 2011

Vipersmart with Microsoft Azure and Visual Studio for car application tracking and automation

Viper smart start with new Windows 8 and connected with Cloud/Azure - building live tracking applications and alert systems with Microsoft Visual Studio = good for police and justice departments :) http://www.viper.com/smartstart/ key note @ timeframe - 1:10 http://channel9.msdn.com/Events/BUILD/BUILD2011/KEY-0002

Project Management using new Visual Studio 2011 Rosyln

Project Management using new Visual Studio 2011 developer preview - raw notes from Build Session 2 - 1 Visual Team foundation server as a service instead of setting up servers 2 Sprint planning and tracking user stories, tasks 3 All productivity tools are now part of Visual studio 2011 4 jQuery bundled with Visual studio 5 Image editor - making game development interesting Also works with VS 2010 and onto the cloud. More here - http://channel9.msdn.com/Events/BUILD/BUILD2011/KEY-0002 Cheers -Dipesh

Monday, September 19, 2011

Build event for Microsoft 2011 - Keynotes, sessions and excerpts

Keynotes and sessions from Build event day1 -
Speakers: Chris Jones , Steven Sinofsky , Antoine Leblonde , Mike Angiulo , Julie Larson-Green
http://channel9.msdn.com/events/BUILD/BUILD2011/KEY-0001

Keynotes and sessions from Build event day2 -

http://channel9.msdn.com/events/BUILD/BUILD2011/KEY-0002

o Windows Server 8 and Azure
o Virtualization & Cloud
o VS 2011 Developer Preview, Windows Azure SDK, Windows Azure Toolkit 1.5 available
o Visual Studio TFS on Azure

Mobile Device + Cloud
• Advance debugging in windows azure - (ability to do performance profiling on code deployed)
• Find Matching Clones(find copies of source code)
• Alpha blending

Demo by Scott Gutherie - Web and Mobile Reach - ASP.Net MVC 4 Preview
• Page Inspector/DOM Explorer/Source View
• Unification/Bunding feature, folder reference
• Shipping jquery as part of ASP.NET/visual studio Roslyn - jQuery.Mobile.MVC
• WebSocket API exposed with .NET 4.5 that allows connection to websocket from anywhere

Web and Mobile Reach/Web TFS
• SaaS for TFS and Windows Server 8 infrastructure

Tools for building Metro style applications

Video on channel 9 as part of Build event for Microsoft 2011 here on tools to build Metro style applications quickly.

http://channel9.msdn.com/events/BUILD/BUILD2011/BPS-1006

Platform for understanding Metro style apps here -
http://channel9.msdn.com/events/BUILD/BUILD2011/BPS-1005