Thursday, October 18, 2018

Arcgis Web Application Builder Proxy

I started on this path months ago, possibly a year ago. I needed to setup a proxy to allow access to a web maps/web map application. For months, I read every blog and every forum posting. I watched YouTube videos. But I will have to admit, the little bits and pieces were always vague and never 100% the answer for me. I think because the process of configuring json is just complicated. It is too bad arcgis makes it so complicated. If it was a just click and add setup, people would not have so many issues doing this.
I spent weeks configuring and re-configuring. Nothing worked. I thought it simply wasn't possible. I READ every instruction.
It dawned on me that I should create a vanilla Web Mapping application with nothing access. Just a map that does not access any private data only private because it is protected on arcgis. I got it working so that gave me hope. It also taught me that I had to setup the proxy url with the least amount of specific url data and put matchAll="true". This means if I am trying to access "https://YOURSITE.maps.arcgis.com/rest/content/blahblahblah", then I just want to put the beginning portion (https://YOURSITE.maps.arcgis.com/) of it and if a url 'contains' it, use the proxy to authenticate.
And another thing for services like Feature Services or Layers, I could use the ClientId/Secret to get tokens but for portal items like maps, I had to use the username/password. I found a very important tidbit. The user name is Case Sensitive, the acutal login into the arcgis web page IS NOT. I have been using lower case to log into the website and I did not realize it has Uppercase values. I confirmed this by logging the website and looking up my account information!
Make sure you watch your https or http, that also causes issues.
I should note, I registered the Web Mapping Application. I know you probably did all this already, but I have to mention it. That is where you get your clientId and clientSecret
Here are some vague instuctions: https://developers.arcgis.com/web-appbuilder/guide/getstarted.htm
Next, I downloaded the entire Web Mapping application, they are quite large and I wish I did not have to do this, and then uploaded it to my server.
Finally, I followed these instructions over and over and over and kept not getting past the login. I did what the instructions said - insert the httpProxy tag near the bottom of the config file.
(I noticed in the Developer tools that it was never hitting the Proxy for any of the calls which made me think I was missing something). If it is hitting the proxy, you will see in the tools something like this for every secure service, if not, you are missing the httpProxy rule on that particular call:

Friday, August 17, 2018

Cannot open SSRS/SSIS projects with VS2017

Close all windows and instances of ‘Microsoft Visual Studio 2017‘.
Download ‘Microsoft Reporting Services Projects‘ from the Visual Studio marketplace.
Open your solution or project.

Friday, July 20, 2018

Windows 10 - Resize multiple photos as one time

Select the photos, right-click and then select Send to - Mail Recipient, Select Resize value you want to re-size to, it will then Error out. This is not a problem. Leave the error open until you have completed the next step.
Go to the Window Search box, type %temp%, the resized photos should be there. Copy them out of this folder, once you close the error box, it will delete them.

Wednesday, May 9, 2018

SQL Server Management Studio: Cannot find one or more components. Please re-install the application

I un-installed VS Studio 2010 dues to storage capacity issues, after I had un-installed I could not longer use SQL Server Management Studio, the database was running fine, but I could not open SSMS. I ran the repair on the SQL Server but that did not fix the issue. I installed and repaired the suggested dependency on VS 2010 Shell (Isolated), but that still had not affect.
I decided to go down the risky road and delete the registry key. There were suggestions of deleting 13, but I only had 11 and 12. So I renamed it first 11_Delete, no change, then 12_Delete and that was the problem. Once I restarted SSMS it created the folder 12_Config again and then I deleted the folder I had renamed.
Computer\HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\12.0_Config

Wednesday, March 28, 2018

Arcgis REST API Append Data to Feature Layer

I needed to append data to an existing Hosted Feature Layer with multiple layers. I found that I was able to append the data by submitting a JSON request, but the data I was adding never showed up on the map. I found a few suggestions such as doing a refresh via javascript on the layer or turning off synchronization which I did. It turns out is was an issue with the data I was submitting.
I added the data at first using the addFeatures and then I tried the applyEdits...both worked fine. I could see the data in the Data tab online but not in the map.
The request looked like this:
[{
'attributes' : {
'fieldName1' : 'junk data',
'latitude': 89.1000,
'longitude' : -119.333
}
}]
For some reason, I thought that the Lat/Long included in the attributes was how the original data was being mapped, so in reading the instructions, I ignored the Geometry part of the request, which ended up being my problem. I had to submit the request like this:
[{
'geometry' : {'x' : -119.333, 'y' : 89.1000},
'attributes' : {
'fieldName1' : 'junk data',
'latitude': 89.1000,
'longitude' : -119.333
}
}]
Mind your {} and [] and ,,,, and data types and you should be good :)

Tuesday, March 27, 2018

Eclipse XDebug Stuck at 78%

This error seems to happen out of no where. It usually happens when I move to a new PC or something. A lot of times it is the config settings for XDebug buried in the php.ini file. Of the many issues that can cause this error, I did find one simple solution that was causing my problem when I recently moved to a laptop: The difference? C drive vs D drive. This caused all sort of issue because I had to change the drive letter to get the entire PHP/APACHE/Eclipse/MySQL thing going but I also found that inside Eclipse I was pointing the External Browser for debug to D:\Program Files\Mozilla Firefox\firefox.exe.
To check your settings, go to Window - Preferences - General - Web Browser, click the browser type and then click Edit. Verify this path is correct.

Thursday, February 22, 2018

Visual Studio 2015 Errors Opening Report Project

I had a previously working copy of a report project that opened fine in VS2012. A person on the team upgraded the project to VS2015 which began causing me trouble opening the project. It would say some of the projects were incompatible or that the project could not be loaded. It gave me the option to upgrade, which I tired and it failed.
I did several things.
At first I thought I did not have SSDT 2015 installed so I installed that, uninstalled that, ran a repair on VS2015, which resolves the project incompatible error on a couple of the projects but I still could not load the Report Project. I un-installed and re-installed different version of SSDT 2015.
I learned VS2015 comes with the SQL Server Data tools and I needed to update this item called "SQL Tooling" but it was hard to understand because nothing in Tool -> Extensions and Updates read precisely "SQL Tooling", I just ran anything that said it needed to be update and when the update ran it was labeled "...Tooling...". So that was confusing. I think the one I updated was Microsoft ASP.net and Web Tools or maybe Microsoft .NET Core Tools. After trying so many things to resolve the problem, you never know, you just know you got it working finally.
After doing all that, I reloaded the project again and continued to have the error: "... rptproj: error: There is an error in XML document (2, 2)."
I found a recommendation that said: Try deleting the "project.user" or "*.rptproj.rsuser" file located in the project folder. Reopen the solution.
And finally after hours of work, this solved for me although I had tried it early on and it did NOT work, so some combination of installed SSDT, uninstalling, updating and then deleting worked.