Minggu, 16 Juli 2017

#DevOps Series: Microsoft Dexterity Source Code Control with Visual Studio Team Services

Now that my good friend and fellow MVP, David Musgrave has completed his #MSDexterity Development Environment Series, it's only fitting that I follow it up with a new series on DevOps with Visual Studio Team Services (VSTS) and Microsoft Dexterity.



Background

David's series is important, because it provides an overview of the processes involved in building a Microsoft Dexterity environment and touches upon certain aspects of the code packaging and deployment that are fundamental to DevOps. Keep in mind that no one method is wrong or right, but rather look at it as having a wide array of options at your disposal.

DevOps (Development and Operations) goes beyond the software development life cycle (SDLC) or building a development environment, to incorporate a delivery process that emphasizes communication and collaboration between the product management, software development, and operations teams. Primarily, it seeks to automate the process of software integration, testing, deployment, and infrastructure changes by establishing a culture and environment where building, testing, and releasing software can happen rapidly, frequently, and more reliably. We've always heard the cliched term, "People, processes, and technology" thrown around, but DevOps really focuses on bringing the three together.

Since people and processes are highly dependent on each organization, I cannot really cover those here and frankly, they are tons of resources online describing and expanding on the human and process aspects of DevOps. My goal with this series will be to see how we can leverage VSTS as the technology component for a Microsoft Dexterity development operation - mainly, Independent Software Vendors (ISVs), consulting partners, and last, but not least, customers who do have a Microsoft Dynamics GP development team. I suspect some of the principles outlined here will also apply to non-Dexterity development operations, but you need to be the judge as to what and what doesn't apply to your specific case.

I will also assume that most of you reading this will already have a Microsoft Dexterity development environment that relies on either Visual SourceSafe (VSS) or Team Foundation Server (TFS) as your source code control repository and that you are familiar with the concepts of code check-in and check-out.



Implementing Visual Studio Team Services in a Microsoft Dexterity Development Environment

I often get asked, "how do we get started with Visual Studio Team Services?". To put things in perspective, most Dexterity development teams asking this question are always concerned with compatibility between Microsoft Dexterity and Visual Studio Team Services. After all, their current source code control procedures with VSS and TFS have gotten them to this point with little to no issues. The first thing to know is, Microsoft Dexterity communicates to VSTS through the same TFS source control providers defined in the Source Control options. That's right! If you already connect to TFS, you can certainly communicate to VSTS.

Something else to keep in mind is, Microsoft Dexterity versions 12, 14, and 16 do allow you to use the TFS providers directly, this is, without having to install the Dexterity Source Code Control Services (DSCCS) component. Another reminder is, you will need to have the corresponding version of Visual Studio installed on the same machine with Microsoft Dexterity to work with Dexterity TFS provider of your choice. The following table describes the TFS provider and the corresponding version of Visual Studio need to support that particular provider.

TFS Provider
Visual Studio Version
Team Foundation Server 2010Visual Studio 2010
Team Foundation Server 2012Visual Studio 2012
Team Foundation Server 2013/2015Visual Studio 2013 or Visual Studio 2015


Provisioning Visual Studio Team Services

The first thing you will need is to provision Visual Studio Team Services. For this, you will need to go to the Visual Studio website. Once you are on the site, sign in with your organizational account (either Office 365 or Azure AD account).


When clicking on Sign In, you will be challenged for your credentials and will take you to the Get Started page where you can setup your VSTS account. Click on the Create new account button to continue.

Get Stated page
On the Account Creation page, you will setup a project space to host all your Microsoft Dexterity projects and will use this address to administer all your development, QA, and operations users and teams and your Microsoft Dexterity projects as a whole.

Account Creation page

You have a choice to manage your code using Git control or Team Foundation Version Control (TFVC). Git control allows you to setup a distributed source code control model, where each developer has a copy of the source repository on their dev machine; or a TFVC model, where, typically, team members have only one version of each file on their dev machines. Historical data is maintained only on the server. Branches are path-based and created on the server. For more information, take a look at this comparison between Git and TFVC.

After clicking Continue, VSTS will provision your project workspace and your account. Upon completion, a default first project is created for you where you can describe what it's about and setup continues integration for your project (more on that later).

MyFirstProject landing page


Setting up a project using Visual Studio Team Services

The goal of this section will be to show you how to setup your first project using VSTS. The next article in my series will explain how to migrate your VSS and TFS projects to VSTS.

Since no one names their projects "MyFirstProject", it will be necessary to rename this to whatever name you choose. However, for all intends and purposes, let's say this will be our Microsoft Dexterity Quotes Enhancements project. To rename, the project, click on the gear button, and select Overview.

Overview option

You can proceed to change the name of the project under the Profile section, then click the Save button to proceed. Team Services will then present you with a big warning, make sure you read through before you continue. However, since this is our first project and we have nothing else but an empty shell at this point, it is safe to continue with this process.

Project profile page

Rename Project warning

Once the renaming is successful, the profile page will automatically refresh, showing the new project name and the project team name accordingly.


Setting up the Team Services Project Server in the Visual Studio IDE

Since my team normally develops in Dexterity 12 (GP 2013), 14 (GP 2015), and 16 (GP 2016) as our products are supported on three different versions of Dynamics GP, it is necessary for us to have a version of Visual Studio installed that is supported by all versions of Dexterity simultaneously. We have settled on Visual Studio 2012 with Update 5, which allows us to use the Team Foundation Server 2012 provider in all versions of Dexterity mentioned above, although we have side-by-side installations of Visual Studio 2012 and Visual Studio 2015.

Open Visual Studio 2012 and choose Connect to Team Foundation Server on the start page.

Visual Studio 2012 Start page

You will be challenged by Visual Studio to enter your credentials. Enter the credentials you used to provision your Team Services account.


Visual Studio will then take you to Team Explorer once the operation sign in operation has been completed. Proceed to click on Source Control Explorer to view the new project we've setup.

Visual Studio Source Control Explorer
In order to make this fully functional, we need to map our cloud repository to a local path. First, I suggest you setup the local folder using File Explorer. For this case, I will create a folder called MyProjects and under it, a new folder called Quotes. To map the cloud repository, select the root node of the repository, then click the Not Mapped hyperlink above the details pane in Visual Studio. This will open the Map window.

Map window
Point the folder location to the root folder, MyProjects on your local machine. Click the Map button to complete the operation. You will then be asked if you want to download the content of the repo onto your local machine. Since this is a brand new project, there will be nothing in the Quotes project folder (except for the Visual Studio Team Services build templates), so proceed to click Yes to continue. This will now setup the initial project folder.


Setting up Microsoft Dexterity Source Control

When working with integrating Dynamics GP applications, we typically start out from an empty Dynamics.dic development dictionary, but if you already have an existing project dictionary you would like to begin working with, in either cases the following steps will work.

In the case of our example, we will copy the Quotes_dev.dic development dictionary to the MyProjects > Quotes folder. For more information on setting up your development environment, please refer to #Dexterity Development Environments – Part 2: Setting up Projects and follow up to step 10.

Quotes_dev.dic development dictionary

Next, we can launch Dexterity with the dictionary and the Dex.ini file by using our Quotes.exe shortcut. Note that our dictionary already has existing resources we have developed for this project.

Quote_dev.dic inside the Dexterity IDE

To setup the Source Control information, we need to go to Edit > Options in the Dexterity IDE. At first, the provider option will be set to [Disabled]. We can then choose the TFS provider that matches our Visual Studio installation, in this case Team Foundation Server 2012.

Selecting the Source Control Provider in Options window
The root directory, will correspond to the folder with the hierarchy immediately above the project folder, in this case the MyProjects folder created above.

Root directory setup
Since Dexterity uses the TFS providers supplied with Visual Studio, it needs the credentials you use to access the repository. Enter that information in the User Name field. NOTE: the password field remains disabled.

User Name setup
Click on the ellipses button next to Project Name to select the project (do not type). If you can select the project, then it means that Dexterity is communicating with your source control repository - and that's always a good thing :-)

Projects window

Finally, point to the Original Dictionary for which your code was written. As a personal note, I keep a folder on my machine called Dictionaries, which contains sub folders hosting a clean dictionary for each version of Dynamics GP I develop for. This prevent me from accidentally removing, say, the Dynamics GP installation and not having a dictionary available, causing my Dexterity source code control to fail.

Original Dictionary


Synchronizing your dev dictionary with Visual Studio Team Services

To synchronize your development dictionary to the VSTS repository, you must first update your source code control state. This will allow Dexterity to determine which resources are new.

NOTE: New resources are defined by a resource ID of 22,000 and above. Alternate resources, will also appear as new to Dexterity source control.

Update Source Code Control state

Once you update the source code control state, proceed to check in the resources into the repository. Choose Explorer > Source Control > Check In...

Source code check in

If you are going to check in all resources, click the Insert All button. Be sure to enter a comment that describes the best you can what is being done, i.e., "Initial check in of Quotes project resources".

Check in process

Both Visual Studio Source Control Explorer and Team Services should reflect the checked in resources. You can also look to your hard drive, under the Quotes folder to see the new folders created for Base, Forms, Reports, Scripts and Tables resources.

Resources in Repository

My next article will discuss how to migrate from VSS and TFS to VSTS.

Until next post!

MG.-
Mariano Gomez, MVP

Jumat, 14 Juli 2017

Microsoft Dexterity: Customizing Safe Pay file name

Hello all!

It's been a while since I've worked on my blog as there's quite a bit going on these days: numerous projects at Mekorma, preparing to move to my new place, upcoming trips to Colombia and Fargo, ND, etc., so not much time to dedicate to writing.

Anyways, today I wanted to dive into some development. It is very often that I see on forums a request to be able to customize the Safe Pay file name and I wanted to address this with some Dexterity code, but first - you guessed it! - some background.



Background

Safe Pay is part of Microsoft Dynamics GP's Electronic Banking suite of modules, comprised by Electronic Reconcile, EFT Payables and Receivables, and, well, Safe Pay. The goal of Safe Pay is to allow you to create a file that is sent to your bank to confirm the authenticity of checks and EFTs issued to payees.

Trivia: Who was the original author of the Electronic Banking suite?

The Safe Pay Configurator provides an intuitive (in most cases) user interface that allows you to define the specific file format(s) accepted by your bank(s).

Safe Pay Configurator window
Upon configuring the file format, you will then use the Safe Pay Bank Link Maintenance window to group all the checkbooks associated to the same bank into an Upload ID. As part of this setup, you can define a single file name to be generated for this bank. Naturally, most setups will include some company identifier (in a multi-company environment) and the checkbook to at least make the file unique and distinguishable enough.

Safe Pay Bank Link Maintenance window

Finally, the Safe Pay file itself can be generated only after the payment batch has been posted. For this, you must use the Safe Pay - Transaction Upload window. In this window, you will choose the Bank Upload ID defined above, and a cutoff date. Safe Pay will recall the (posted) payment transactions within the last upload date and the cutoff date entered by you. All checks and EFTs available for processing within that date range will show up for processing.

Safe Pay - Transaction Upload window


The Problem and The Solution

Most organizations would like to have at least a date stamp included as part of the file name itself. For the above example, our desired file name would be something like MMM29-FIRSTBANK-YYYYMMDD.txt, where YYYYMMDD represents the current year, month, and date. As you can tell from the Safe Pay Bank Link Maintenance window, it is not possible to achieve this. There isn't even an option to allow you to select other descriptors for the file name. In order to do this, we will use some Dexterity sanScript to add this feature.

NOTE: This article assumes you have a basic understanding of the principles of integrating Microsoft Dynamics GP applications and that you are familiar with the build process (extract and auto-chunk) of a development dictionary. If you need help setting up your development environment, take a look at the #Dexterity Development Environments series on the Winthrop Development Consultants blog by my good friend and fellow MVP, David Musgrave.

In order to change the Safe Pay file name, we will begin by setting a cross-dictionary trigger against the ME_Configurator_Write_Entire_Format global procedure in the Safe Pay dictionary in our Startup script. You can find this out by capturing a script log by using the Microsoft Dynamics GP Script Debugger tool or taking advantage of the GP Power Tools manual or automatic logging capabilities.

global procedure: Startup

{ Script: Startup
Created by Mariano Gomez, MVP
This code is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
}

local integer lresult;

pragma(disable warning LiteralStringUsed);
lresult = Trigger_RegisterProcedureByName(1235, "ME_Configurator_Write_Entire_Format", TRIGGER_AFTER_ORIGINAL, script Change_Safepay_File_Name);

if (lresult <> SY_NOERR) then
warning "Trigger registration error for procedure ME_Configurator_Write_Entire_Format in dictionary SafePay (1235): script Change_Safepay_File_Name";
end if;

pragma(enable warning LiteralStringUsed);

When ME_Configurator_Write_Entire_Format procedure executes, our script processing procedure, Change_Safepay_File_Name, will fire in response, after the original Safe Pay script is executed. This script makes extensive use of standard Microsoft Dynamics GP global functions, which demonstrates how your integrating code can become really compact if you do some upfront work to understand what's available to you in the core Dynamics.dic dictionary file.

global procedure: Change_Safepay_File_Name

{ Script: Change_Safepay_File_Name
Created by Mariano Gomez, MVP This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. }
in string FormatId;
in string SafepayId;
in string UploadId;
in string FilePathName;
out boolean WroteAll;


local boolean fExists;
local string sPath, sFileName, sGeneric;
local string sTimeStamp;
local integer nStatus;


sGeneric = Path_MakeGeneric(FilePathName);

{ @@@. Verify the generated SafePay file exists and can be open. }
fExists = File_Probe(sGeneric);

if (fExists) then
sPath = Path_ParsePathFromPath(FilePathName);
sFileName = Path_ParseFileFromPath(FilePathName);

{ @@@. Get the current time stamp as a string in YYYYMMDD format. We retrieve the time from the SQL Server.
We also take advantage of the RW_Pad Report Write function to add the leading zero to single digit months and days
}
sTimeStamp = str(year(sysdate(CURRENT_SERVER)))
+ RW_Pad(str(month(sysdate(CURRENT_SERVER))), LEADING, ZERO_STR, 2)
+ RW_Pad(str(day(sysdate(CURRENT_SERVER))), LEADING, ZERO_STR, 2);

{ @@@. Call the Microsoft Dynamics GP global function FileName_AppendToName to append the string time stamp }
sFileName = FileName_AppendToName(sFileName, CH_UNDERSCORE + sTimeStamp);

{ @@@. Call the Microsoft Dynamics GP global function File_Rename to rename the Safe Pay file with the new name }
nStatus = File_Rename(FilePathName, sPath + sFileName, true);

end if;

Note that our script processing procedure uses the same parameter list as the ME_Configurator_Write_Entire_Format Safe Pay procedure. This allows us access to the file path and name as configured in Safe Pay.

You can download the extracted dictionary and chunk file here. Feel free to customize the code as you see fit.

Until next post!

MG.-
Mariano Gomez, MVP

Jumat, 14 April 2017

#FabrikamDay: blast from the past

#FabrikamDay: blast from the past

Well, you thought #FabrikamDay was over? Not really, although this will be my last post! You see, there was a time when Microsoft Dynamics GP had its own TV commercial themed "More and Less". Rumors had it that Pam Misialek wanted a narrator with an everyday American accent, but Errol Schoenfish had his way with getting someone to put on a British accent.

More and Less advert


Other interesting facts I could research: the director of photography for this advert is Tristan Whitman under Wyldflower Filmwerks, Inc. This ad was released to cable and satellite channels around the March of 2009 time frame, just in time for Microsoft Dynamics Convergence 2009 (I started attending Convergence, uninterrupted, the following year). By then, the Smart Tag functionality was available with Microsoft Dynamics GP 10.0, but enhanced further with GP 2010. You can appreciate the Smart Tag flashes in the video.

Tristan Whitman at the camera

Until next post,

MG.-
Mariano Gomez, MVP

Kamis, 13 April 2017

#FabrikamDay: the holiday that wasn't

Yesterday was ceremoniously an unofficial holiday. That's right! The date did not show up on any local or international calendar, it wasn't part of any federal or state registry. Frankly, the world did another spin on its axis without skipping a beat and life for billions of people on this planet went on without a hitch - OK, I'm not trivializing what's going on around some problem spots in the world, but I digress. Not so for a few hundred in the Microsoft Dynamics GP community of customers, partners, and independent software vendors (ISVs). We celebrated our own 'holiday' of sorts: #FabrikamDay.

Breaking it all down

To understand what Fabrikam Day is, you first have to ask yourself, "What is Fabrikam?". Fabrikam (and more precisely, Fabrikam, Inc. or Fabrikam, Ltd, formerly The World Online) is the sample company used for demos, development, and testing in Microsoft Dynamics GP. The sample company provides sample data for all core and extended modules, including Field Services, Manufacturing, Project Accounting, and Human Resources/Payroll.

NOTE: Other Microsoft products use the sample company name Fabrikam for demo purposes. Click to obtain a list of fictional Microsoft companies.

For the longest time, the sample company transactions data was based on an April 12, 2017 fictitious date. Each time you log into Microsoft Dynamics GP and select the sample company, by default, you obtain the following warning dialog:



In the early 2000's a first change was done to convert the sample company data to a fictitious date of April 12, 2007. When 2007 came along, the date was forwarded once more 10 years ahead. If you are a veteran in the channel, I'm sure many of you thought, like I did, that you would probably be doing something differently when 2017 came around. At the time, it seemed so far removed from anyone's imagination. You can read more details and technicalities behind the sample company date in this very detailed article by my friend and fellow MVP, David Musgrave.

#FabrikamDay is today or is it? 

Where did the idea of a #FabrikamDay came from?

Back at GPUG Amplify 2016 in Anaheim, CA a group of us (Pam Misialek, Bob McAdam, Chris Dobkins, Amber Bell) started toying around with the idea of putting together an event around April 12, 2017 to commemorate the advent of the sample date. Back then, the original intent was to have a one day celebration costume party close or around one of the major events this year. Given the logistical challenges (and possible cost) the idea never took off.

Fast forward to the beginning of March, 2017 and Amber Bell with Training Dynamo releases the first blog post titled Fabrikam Day in which she describes the sample company date and how has Fabrikam helped her over the years to train her customers.

In mid-march, GPUG Amplify featured a number of "Fabrikam-themed" badges for attendees name tags, hoping to draw attention of the upcoming date.

GPUG Amplify badges for name tag
By the latter part of March, 2017, Chris Dobkins and Melissa Sandrovich over at Njevity picked up where Amplify left off and were just determined to not let the date go by without doing something. Chris and Melissa posted their first #FabrikamDay picture requesting the community to follow up with pictures of their own.

Chris Dobkins and Melissa Sandrovich at Coors Field in Denver, Colorado
Ever since this first picture by Chris and Melissa, the community began responding slowly but surely to the request. According to Hashtracking.com we had just about 479 original tweets and 924 retweets that included the #FabrikamDay, with about 1.7M impressions and reaching over 300 thousand people.


It was now April 12, 2017 (yesterday). The day started with a barrage of tweets allusive to #FabrikamDay and ended with a 4:00 PM EDT online meeting hosted by Pam Misialek, Product Marketing manager at Microsoft which did a quick run down memory lane showing some of the nostalgia and accomplishments over the years. At 4:12 PM EDT we did a "ball dropping" of sorts with a countdown to welcome #FabrikamDay. Those of us in attendance listened to stories, saw old time videos, and played a little trivia game to gauge our knowledge of Microsoft Dynamics GP history.

To say I have attended a few events over the years would be quite an understatement, but #FabrikamDay reminded me of the importance of community and the heart and passion to improve the lives of customers and partners. I hope to continue working for this community and do my part to make it stronger. You do the same!

Now, some posts from around the globe:

David Musgrave (Winthrop Development Consultants) 
#FabrikamDay How to quickly update the sample data to 2027
#FabrikamDay is today or is it?

Amber Bell (Training Dynamo)
- Fabrikam Day

Chris Dobkins (Njevitytogo)
Attention Dynamics GP Customers and Partners: We Need Your Help to celebrate Fabrikam Day!

Mark Polino (DynamicAccounting)
- Happy #FabrikamDay

Rhonda Sutliff (Rockton Software)
- Happy Fabrikam Day!

Until next post,

MG.-
Mariano Gomez, MVP

Kamis, 30 Maret 2017

Microsoft Dynamics GP Roadmap Update

It's been a week since I got back from GPUG Amplify 2017 in Anaheim, California and tell you the truth, I am all the more excited about the future of Microsoft Dynamics GP than a lot of you might be. With all these constant rumors of the product going away or not getting the necessary TLC from Microsoft I am left to wonder, where have I heard this before :-)

The truth is, Dynamics GP is alive and well, thank you! And will be for many many years to come. As it's been unveiled in Anaheim, the next couple of years - Microsoft has been producing the roadmap for only 2 years at a time ever since GP 2010 - promise to bring some really cool enhancements to the product, based on entries collected via Microsoft Connect.

In particular, GP 2018 (shipping sometimes before the end of Q4) will be introducing 3 major themes that traverse the spectrum of features you would expect from an application born in the on-premise world, but that has effectively cross over to power customers looking for a solid cloud solution. In this iteration, Microsoft looks to solidify the workflow capabilities with what it has now dubbed Workflow 4.0, all the while introducing some optimizations to the Financial series, Human Resources and Payroll, Document Attach, and overall UX (user experience). In strengthening the cloud capabilities, Microsoft looks to increase the integration with the Power Suite (Power BI, Power Query, Power Apps, etc.).


While in Anaheim, I had a chance to see a bit more about the details. The following is a list of features that the Development team in Fargo is expecting to deliver:


Some highlights include adding reminder emails to Workflow, this is, a user will receive reminder emails leading up to the due date of specific tasks. This is a very cool feature and something customers were asking for.

The HRP enhancements include some beefing up of the Garnishments capabilities along with the ability to change Department Codes in Payroll.

As far as the user experience concerns, auto-complete moves to the web client after being a desktop feature for quite some time now. I am also very excited about the introduction (finally!) of the HTML 5 controls for Visual Studio Tools which now will allow developers who had WinForms to expose these once again to the Dynamics GP web client.

The Dev team has made a big push to get Document Attach out to the remaining portions of the application where it was missing: GL Transaction Entry, POP Receiving Entry and now the inquiry windows.

As far as features powering the cloud, Dynamics GP receives enhancements to its OData Services, a brand new GP Power BI content pack, and a number of FLOW templates. More information about Microsoft Flow here.

Until next post,

MG.-
Mariano Gomez, MVP

Kamis, 16 Maret 2017

The Connect Corner: Include Multicurrency Vouchers in Payment Run

As of late, I've been thinking of ways to improve the Microsoft Dynamics GP Payables Management module, since it is the center piece for the products we developed here at Mekorma. Our latest product, Multi-Batch Management, will incorporate support for Multicurrency transactions in the upcoming build and there are some benefits to my latest Microsoft Connect request.

The problem

The Microsoft Dynamics GP Payables Management module provides ample support and comprehensive functionality for Multicurrency transactions, when compared to other mid-market solutions, but could improve the level of automation for certain payment selection activities.

Take the following example:

Your organization has a supplier headquartered in Canada, with a subsidiary in the Dearborn, Michigan. For certain materials, you are directed to order from the Dearborn, Michigan location, for certain others you are directed to order directly from the headquarters in Canada. For convenience sake, you have been instructed to remit payments to the Michigan Dearborn office any and all outstanding invoices. The materials you received from the Canada office are invoiced in Canadian dollars.

Here are 3 invoices you have received:

Vendor A             Invoice 1             CA$10.00
Vendor A             Invoice 2             US$20.00
Vendor A             Invoice 3             US$30.00

If you build a payment batch in Microsoft Dynamics GP (using US dollars as functional currency), the only invoices that will be selected are invoices 2 and 3. In order to add invoice 1 to the already completed payment batch, you will be required to go to the Edit Payables Check Batch window, after completing the payment run, to make any changes to the vendor payment.



Conversely, if you are required to submit payment in Canadian dollars to the vendor's offices in Canada, and you make your batch currency Canadian dollars, only invoice 1 will be selected, and you will need to use the Edit Payables Check Batch window to add invoices 2 and 3 to the final vendor payment. If you must repeat this operation for several vendors and several vouchers, this could be an extremely time consuming proposition.

The Solution

To facilitate the payment selection process, it would be extremely nice if the same selection rules applied to Multicurrency vouchers. However, the user would have the ability through configuration and furthermore at payment selection time to include vouchers in other currencies that met the selection criteria.

As previously noted, the business logic to do this is already in the Edit Payables Check Batch window, but it would be nice if the same logic could be surfaced to the payment selection process.

If you think this would be valuable to you, I have created a Microsoft Connect entry case for this. Please join me in voting for this request. Use the following link to vote for it:

https://connect.microsoft.com/dynamicssuggestions/feedback/details/3128513/include-multicurrency-vouchers-in-select-checks-window

Happy voting!

MG.-
Mariano Gomez, MVP

Kamis, 16 Februari 2017

Web Client: HTTP Error 500.0 - Internal Server Error

Just recently I was assisting a partner on the Dynamics GP Partner forum with an error they were receiving when attempting to log into the Microsoft Dynamics GP web client.

Summary

The partner reported they could log into web client just fine from the SQL Server. However, when they launched web client from the Web Server that host the Dynamics GP web application, they received:

HTTP Error 500.0 - Internal Server Error



Now, this error is a pretty generic error. In addition to not being able to log in, the landing page would not display the Microsoft Dynamics GP logo.

Troubleshooting the Issue

The partner had tried the following troubleshooting techniques:
  1. Repaired Microsoft Dynamics GP web components
  2. Uninstalled and reinstalled web components
  3. Rebooted the server
In addition, I recommended my article Microsoft Dynamics GP 2016 web client UI not displaying icons to ensure static content had been enabled during Internet Information Services (IIS) configuration. Typically, when static content is not enabled, the web client image resources do not get displayed.

Usually, after trying options 1 and 2, if you are still experiencing issues not allowing you to bypass the login window, you know you are facing a pre-requisite configuration issue.

Reading the Detailed Error Information section, you will notice that the error was caused by an authentication request, trying to access an image resource file using Anonymous Authentication by an Anonymous user. In simple terms, this is a permissions issue.

Upon inspecting the GP website authentication setting, the partner noticed the credentials for the anonymous user identity were set to IUSR.



So what's the big deal?

Anonymous authentication gives users access to the public areas of your website without prompting them for a user name or password. When a user attempts to connect to your public Web site, your Web server assigns the user to the Windows user account called IUSR.

By default, the IUSR account is included in the IIS_USRS built-in group. This group has security restrictions, imposed by NTFS permissions that designate the level of access and the type of content available to public users. With that said, websites such as the GP web belong in the private domain and most organizations disable anonymous authentication totally for the GP websites and revoke access to the IUSR account or IIS_USRS group to the website folder to prevent unauthorized access.

If you are running IIS 7.5 on Windows Server 2008 R2, or a later version of IIS, for every application pool you create, the Identity property of the new application pool is set to ApplicationPoolIdentity by default. The IIS Admin Process (WAS) will create a virtual account with the name of the new application pool and run the application pool's worker processes under this account by default.

By setting the ApplicationPoolIdentity as the anonymous user account for a site, you can isolate content and configuration for that site so that no other sites on the same IIS web server can access it, even if you have enabled anonymous authentication. GP web client installation allows you to specify a domain account as the identity for the Web Management Console and GP web application pools. The installer in turn will ensure the proper permissions are given to the folders hosting the web site and the GP web components.

This is particularly useful if you are a hosting provider running multiple customer websites on a single IIS server. Having the ability to control the website access and the content that is displayed is very important.

For a primer on IUSR vs application pool identity, take a look at the following article by Tristan K.

IUSR vs Application Pool Identity – Why use either?

The fix

In this particular case, switching the Anonymous Authentication credentials from IUSR to ApplicationPoolIdentity fixed the issue, although, keep in mind that the GP web client does not require anonymous authentication to be enabled.

Until next post!

MG.-
Mariano Gomez, MVP