Showing posts with label Windows Azure. Show all posts
Showing posts with label Windows Azure. Show all posts

Wednesday, June 21, 2017

In-Memory OLTP in Azure SQL Database

Hey guys, good news for you all who use Azure SQL Database.

Below are some of the cool features Microsoft added in Azure SQL Database:

  • Earlier including the index created with the primary key, the memory-optimized table can have up to 8 indexes only. Now with the changes incorporated in June 2017 we can create more than eight indexes on memory-optimized tables
  • No more alter table command to change the memory-optimized objects, sp_rename can be used for renaming memory-optimized objects
  • You will no longer see the Error 41839 – “Transaction exceeded the maximum number of commit dependencies and the last statement was aborted. Retry the statement.” Microsoft eliminated the limit on the number of commit dependencies
  • Now we are free to use the CASE expression, the CROSS APPLY operator, and all JSON functions, isn't it interesting!
  • Did you even think of using computed columns in memory-optimized tables, if you think in such direction then please start using computed columns in memory-optimized tables

Wednesday, March 11, 2015

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. - WCF IIS Hosting error

“Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format” is an error which you get while hosting the WCF service in IIS.

Lets see the complete exception details first,

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.

image

Reason for this error:

You get this error normally when you try to host a WCF service developed in Windows 32 bit machine and you are trying to host this in a 64 bit machine.

Solution to this issue is a simple one, you just need to change the settings in IIS to enable 32 bit application hosting.

Lets see the step step by actions to change this settings.

Open IIS --> Press Start button + R and then type inetmgr.

Expand your server and then click on Application Pools

In the list of application pools select the application pool which is being used by your new WCF service. And then click on the “Advance Settings…”

image

In Advance Settings dialog change the Enable 32-Bit Applications settings from False to True and Click OK.

image

Now you browse your WCF service and see the result. I am sure your error would have disappeared.

Monday, March 2, 2015

Where to find log files for the ASP.NET web application hosted in Windows Azure?

If you are a developer then definitely one of the question haunting you once you deploy your web application in Windows Azure is where is the log file? How can I go through the default log files which we have in IIS or in any other web server.

In this article all your such query will be answered. Once you login to your windows Azure account and open the web application configuration section you will find the option to configure all the log files, but there is no options available there to download or to view the log files. You may find all below options under Configure Menu but not the option to view the log files.

image

Lets see the available options to view the log files.

There are two ways you can view the log files related to your web applications deployed in Windows Azure.

1. Kudu Console. If you are hearing this first time then you may read my earlier article “” Once you open KUDU console you just need to go to the Tools menu and then you will find an option “Diagnostic dump” By clicking on this item will download the whole log files dump in your local system. Once you have the dump then nothing more to write about what you have to do.

image

2. Using Visual Studio: This one is interesting as you will be seeing the log files from your Visual Studio itself. In order to view the log files first you need to connect your Visual Studio with your Windows Azure account. If you are not aware of this feature, I have already written an article for you “”.  

Once you connect to your Visual Studio to your Windows Azure account then Expand Azure—>Websites—>Now expand the website name which you wanted to view the log files.

image
As soon as you expand your website which you wanted to view the log files you might have noticed a folder named “Log Files” This is our target today.
 
Lets expand the files and see the subfolders inside Log Files.
 
One thing you have to remember is this folder structure under log files in totally depends on the logging mechanism you have enabled for your application.
 
If you have enabled all the available logging then you may find many folders for each logs.
 
For your information I have expanded few of my already deployed in applications in my Windows Azure account.
image
Try to pen each log files under each folder if you like to explore more about the log files.

I hope you are now clear about the available log files in Windows Azure and how you can download or view this log files for debugging the issues.

Thanks a ton for reading my article and I hope it will help in your application development.

As usual you are always welcome to give feed back to my articles which may help me to improve next time.

Thursday, February 26, 2015

How to Enable Failed-Request Tracing / Not able to find Failed-Request Tracing option in IIS

Sometimes we have to enable Failed request tracing in order to trace the issues in the server. Normally we use Failed Request tracing to know what exactly is happening with the request. Best examples to enable Failed Request tracing is to find out the performance issues, authentication failures, Server 500 error, 404 error etc.

Sometimes when you try to configure the Failed Request Tracing you may not find that option because you may not have installed the IIS components to enable that feature. So first lets see the place where you will find this option.

Lets open IIS first, press Window + R button or Start –>Run and then type inetmgr.
Expand your system name—>Sites—> Click on Default Web Site.

Now look at your right side window “Actions” In Actions pane under Configure section you should get “Failed Request Tracing…. “ option.

Sometimes as I mentioned above you may not see this option. It will be like below screen.

 image
In such cases first we will install the required component.

Go to Control Panel\All Control Panel Items\Programs and Features and then click on Turn Windows features on or off.

Go to Internet Information Service-->World Wide Web Services--> Application Development Features—> Select ASP.NET

Expand Health and Diagnostics—>Select Tracing

Click OK to install this component.

image

Once you install above components open IIS again and go to the Action and under Configure section you can see Failed Request Tracing…

image
To enable Failed Request Tracing Click on the link “Failed Request Tracing…. “ and select the Enable button. You can also change the path in case you wanted to save this log file in a different location than the default location. Also as you can see you will be able to change the Maximum number of trace files as well. This is to avoid your Disk getting full with trace files. Last 50 or 100 file would be sufficient to investigate any issues.
image
I hope now you are clear on how to enable Failed Request tracing and were you can see the Trace log files.

Wednesday, February 18, 2015

App Suspended feature in .NET Framework 4.5.1

Today we will go through one of the new feature added in .NET framework 4.5.1. This feature is currently available only in Windows Server 2012 R2. Microsoft may add this in other operating systems later but currently this is restricted to Windows Server 2012 R2.

App Suspend is a new configuration in IIS in Windows Server 2012 R2. We will see what is the advantage we are going to get if use this configuration and also will see where we have to change this configuration.

First thing first! What is the advantage of using app suspend?

If you enable this great feature your application start up will be much faster and in single webserver server you can host multiple application without impacting the performance.
image
Now, lets see how enable this feature.

In order to enable first we will open IIS from your Windows Server 2012 R2. Open IIS—> Select Application Pools—> Right Click on Application Pools and then select the “Advance Settings…”.

In advanced Settings window you will not see this feature anywhere! isn’t it? Yes you cannot see this feature directly. This feature is part of the “Idle Time-out” settings.
 
You would have noticed a special configuration here that is nothing but the “Idle Time-Out Action” this is currently available only Windows Server 2012 R2. This is the configuration we have to change. By default it will be selected as “Terminate”.
 
Just click on this dropdown to see that the new option “Suspend”. and select the same and click on OK to return.
image
That’s all you have to do, you are done!!!

If you like to test this feature then change the default time to 2 min or something and access the application. Also change the setting back to terminate and see your application start up time difference.
I hope you understood the advantage of this App Suspend feature and you will try this in your application.

Monday, February 16, 2015

Visual Studio In-built Support for Windows Azure

As you are aware Visual Studio has evolved a lot and every new release Microsoft adds many features. Since Windows azure is the hot cake in the market, of course Microsoft added many inbuilt features in Visual Studio 2013. Today we are going to explore few important features which will help you to debug your application.
 
Lets go through one by one, lets connect to Windows Azure website form Visual Studio.

Now you can directly connect to your Azure website from Visual Studio. IN order to connect to the windows azure, first you need to sign in to your Azure account. If you are already connected then you can directly open the server explorer form View Menu.

image

Once you open Server Explorer, you can find an option named “Azure”. You may expand the Azure to find the available options under that. This links nothing but what you see once you login to your Azure account.
 
You can compare the feature list below. Except Visual Studio online everything can be found there. Visual Studio online is a different configuration so that is available under Team explorer in Visual Studio.

 image image
Now what we are going to explore is the features available under Websites.
 
Lets expand the Websites, you will notice that all the websites which is already hosted in your Azure account will listed there.
image
We will concentrate on one website now and will see what we can do directly from Visual Studio.
 
Lets right click on one website and select View Settings. You will be amazed to see the options which is opened in your right panel. Lets explore one by one now.
image
First one you would see is the Stop Website and Restart Website. If the website is in the stopped state you will find an option Start Website in place of Stop Website. As you are aware you stop the application inn windows Azure as well same like the way you do it in IIS.

I believe nothing more to explain this feature as it has got its literal meaning.

Next options which shows under Website Settings are mainly for debugging.

First option is definitely the Framework version. You will have two options either V4.5 or V3.5

image
You may choose the framework version depends on the one you want to run your application.

Next four settings are related to remote debugging.
1. Web Server Logging
2. Detailed Error Messages
3. Failed Request Tracing
4. Application Logging (File System)
5. Remote Debugging

You may enable all or the require logging options in case you are facing any issues with the application. It is very easy to know what exactly is the issue your application is facing by going through this log files. As soon as you change this logging options it will reflect in Windows Azure as well. Which means instead of logging-in to your windows Azure  account you may manage all these options from Visual Studio itself.

I will be stopping today, there are much more to explain about the log files which you are going to get by enabling this logging mechanism.

I will be writing a separate articles for each logs.
Thanks a lot of reading my article.

Wednesday, February 4, 2015

How to add team members and share code in Visual Studio online

This seems to be a small topic and a simple. Since I have been continuing the Visual Studio Online series I thought this is also important. If you don’t know how to add members and how to share the code which is already upload in your Visual Studio Online account then the whole idea is going to be waste.

Lets login to the Visual Studio online account first. Once you login you will find all the projects under your account. In this demo you will find only one project that is DemoVSOnline.

image

Just click on the project where you wanted to add the user and share the code. When you click on the project new page will be opened. I have highlighted two sections below. because first highlighted section is interesting.
image
You might have noticed “Team rooms” which has been highlighted. What exactly is Team room? Here comes the new idea from Microsoft. Suppose you have 5 to 6 members working on the same project and they are connected from remote locations. How do you contact them??? that is a challenge. So Microsoft thought about that and added a team room where you can interact with the whole team working on this project.

Second highlighted section is of course to add the members to your project.

Click on the “Manage…” button to open the page to add the uses.
image

Select “Add user” option to add the user. The screen which opens to add the user is self explanatory.

image

As an additional note, In order to add user to your project first you need to add the user to your Visual Studio online account.
 
If you haven’t read my earlier article related to this, the process is very simple, Go to your Visual Studio Account Home page. Now you will find a menu Users. Just click on that link to open the Manage Users page where you can add/delete/modify any users.
 
You can use Microsoft account or even other account as well. If you use Microsoft account there will be an added advantage. You may see the actual window which you have to use to add the user below.
image 

I hope now you are confident enough to add the user to your visual studio online account and to your project and also you learned how to chat with your team member via Team room.

Any doubt or questions related to this topic is always welcome.

Monday, February 2, 2015

How to create projects in Visual Studio Online

I hope you would already heard what is Visual Studio online and what is the purpose and advantages of using Visual Studio online. This is one of the simplest easy way to manage your code across the world without any headache of transferring code from one server to another. You create a visual Studio online account add the projects to it and then share with your team member who is sitting anywhere in the world.

In this article I am going to explain you how to create/Add projects in Visual Studio online and then how to share with your team member.

First I have created a simple website with a single page. While creating the project now in Visual Studio 2013 you can find a new option called “Team Project”.

You can use Visual Studio 2012. You can also use Visual Studio 2010, but you'll need to install Service Pack 1 and KB2662296 first. Or, you can use Visual Studio 2008 SP1, with this GDR update.
Select this option to create a new project which can be added to your Visual Studio online account.

image
If you already connected with your MSDN account then your Visual Studio online URL will show in the Team Foundation Server dropdownlist. See the window which I see when try to create a new projects in Visual Studio online.
image
If it is not connected then you can click on the “Servers…” button and then click on the “Add…” button to provide the URL of your VS online.
image
It might ask you to provide your credentials. Once you enter the credentials it will open your Visual Studio online account as well as your project.

If you are doing this first time then you have to create your local workspace. Similar to any source control tool. So click on close this repository or create work space option. Select the path where you wanted to keep the local copy of your code.

image
Once your local work space is created your empty Visual Studio online project is ready. Now you just click on the Web Portal link which will take you to the online account and there you can see that the new project.

image
Once you are redirected the online account you may see the project we created now like below.

 image

So your first project is online now. Now you can share with any of your team member. I will be writing more article towards sharing the code, committing the changes etc in coming days.

Tuesday, January 27, 2015

Role based access in Windows Azure

This is one of the demand every subscriber was asking to Microsoft and finally they came up with the proper solution. So now you don’t need to have multiple subscription for development, test and production. Everything can be managed by single subscription.

Today I will be taking you through the simple steps to add the users with different rights in Windows azure.

Windows Azure has got 3 roles now,
image 

To add to this roles, Microsoft suggest you to configure Active directory with these roles and add the users to this active directory group.

For example, If you would like to add the user “Martin” then you need to him to the active directory to the respective role, i.e. read, write or contributor role. Once you add him to the AD then his name can be selected from the Azure.

Lets see how can you select the existing AD user or how you can add a guest user.

In order to add the users first click on Browse—>Everything and then click on the item “Subscriptions…”. This will show all the subscriptions you have in your account in case you have multiple subscriptions.
image
Select the subscription you wanted to add the user. Once you select the subscription it will show the roles in the right pane. Now select the role you wanted to add the user.

image
If you wanted to add a read only user then click on the reader option. This will again open a right pane to add the user.

image
Click on the ADD button to add the user from the Active directory. As soon as you type in if the user is part of the Active Directory which is synced with the Azure it will automatically pops up.

image
Here you will find an option to invite the user as well. If the user already have a Microsoft account you may use that to provide Azure access.

I hope you are very clear about the steps you need to follow to provide role based access to Windows Azure.

I have a further reading link in case you require more information regarding this. 

Thursday, December 11, 2014

Not able to see Attach Debugger in Visual Studio for remote debugging in Azure

This is one of the common issue developer faces when they try to debug the azure webiste. In order to debug the Azure website from your local machine you should attach the debugger to your website. This “Attach Debugger” option will be visible in your server explorer. Lets us see how you can reach there first.
In order to debug the Azure website remotely first you have to open Server Explorer from the View menu. Once you click on the Server Explorer just expand the Windows Azure section. If you are not logged in to Azure account It may prompt you to login. Once you connect to your Windows Azure account you will be able to see all your websites which is already hosted in your Azure account.

Wednesday, December 10, 2014

How to find the files deployed in Windows Azure from Visual Studio.

While deploying the web application in Windows Azure you might be wondering where I can find these files and is there any way I can modify these files? Nothing to worry about your deployed files, we can see those files and even you can edit those files from Visual Studio.
Today we will see how to view the deployed website files in visual Studio and how to edit those files form Visual Studio.

Tuesday, November 18, 2014

Attempt by security transparent method 'System.Web.Http.GlobalConfiguration.get_Configuration()' to access security critical type 'System.Web.Http.HttpConfiguration' failed.

This is one of the common error you may experience while using WEB API. This error normally occurs if you are using older version web API.
So the simple solution to resolve this issue is upgrade your WEB API.
Easiest option to upgrade your WEB API is by using NuGet package manager.

Monday, October 27, 2014

Connect LocalDB using Visual Studio

Today let me answer few interview question and answer about local DB. We are going to cover, What is LocalDB? How to start LocalDB? How to stop LocalDB? How to connect LocalDB from visual Studio? How to create tables in LocalDB using Visual Studio.
Lets start with what is Local DB?
In earlier version Visual Studio installation SQL express edition gets installed automatically. People were really confused with this database and was having difficult time in connecting and managing this database. So from Visual Studio 2012 onwards Microsoft decided to have LocalDB engine in place of SQL Server express. This is a very light weight database with a minimum set of files required to create a database and it will directly tied up with the project it is attached to.
Lets see how to start LocalDB.

Thursday, October 23, 2014

How to add additional disk in Microsoft Azure Virtual Machine

Today lets see how to add additional disk in your windows azure virtual machine. If you are a cloud architect then this will be one of the very common activity you may do periodically.
Lets start with step by step.
As usual first you have to login to your Azure account. Once you login directly go to the Virtual machine section and select the machine on which you wanted to add the additional disk space.
VM1

Monday, July 7, 2014

What is KUDU - Windows Azure Web Sites analysis tool

When I got to know about this KUDU I was thinking who named this KUDU! You also might be thinking about this. But here we are not going to discuss that…we will see what is the use of KUDU and how we can use this in our Azure website.
What is KUDU —> KUDU is a very user friendly troubleshooting and analysis tools for Windows Azure Web Sites.
Now we will see how to access KUDU console of your azure website. It is a very simple method.

Wednesday, April 9, 2014

Synchronize local MS SQL database to SQL Azure

In this article I will be taking you through the steps to synchronize your local MS SQL Database to SQL Azure. This is one of the regular requirement you may find in your application development when you are using Windows Azure. Synchronizing the local database will allow you to export all the data from your local database to SQL Azure in few seconds or in few minutes.
SQL Azure allows you to configure this synchronization automatically and will allow you to set the frequency of data synchronization as well. 
Ok, as usual we will go through the complete procedure step by step.
First we will create a database in our local database system and insert few data in the table.
image

Tuesday, April 8, 2014

Deploy ASP.NET web application in cloud with SQL Azure Connectivity

Today I am taking you to the complete deployment of an ASP.NET web application with database connectivity in Microsoft Azure. Since database is in cloud we have to do some configuration changes while doing the deployment. In this article we will do the sample development in local system and we will do only the deployment in Microsoft Azure. As you are aware once deploy the application in Microsoft Azure by using SQL Azure as database everything will be online and people will be able to access the application over the net.
Lets go through the complete procedure you have to follow to do the web application deployment with SQL Azure.

Saturday, March 29, 2014

Load balancing using Windows Azure Virtual Machine

This is one of the common query everyone started using Windows Azure will have. How we can make a load balancer in case if we have to host a site which will be getting huge traffic. In windows Azure load balancing configuration is very simple. In this article we will go through how to configure load balancing in windows azure and also we will see how to deploy ASP.NET web applications in Windows Azure load balancing server.
Let’s go through step by step procedure.

Tuesday, March 25, 2014

How to Deploy ASP.NET web application in Windows Azure Virtual Machine

Are you searching for the steps to deploy ASP.NET web application in windows Azure Virtual Machine? Yes, in this article I am going to give you the step by step procedure to deploy the web application in cloud.
If you are not sure how to create Virtual Machine in Windows Azure you may read my article How to create Virtual Machine in Windows Azure
In this article I am explaining the steps you have to follow after creating the Virtual machine.
As usual first you have to login to the Virtual Machine by login to your Windows Azure account. You may open your Windows Azure account by opening Windows Azure Login Page

Tuesday, March 18, 2014

How to create Virtual Machine in Windows Azure

Do you know, with few clicks you will be able to create Virtual Machine in Windows Azure. In this article I am going to create Virtual Machine in Windows Azure. Let’s see how easy to create virtual machine in windows Azure.
Let’s go through step by step procedure, first we will login to Windows Azure by opening Windows Azure Login Page
1VM