Restful Service Help

Here are some websites with tips on how to make Restful Services.

https://closebrace.com/tutorials/2017-03-02/the-dead-simple-step-by-step-guide-for-front-end-developers-to-getting-up-and-running-with-nodejs-express-and-mongodb

Share Button

Creating a Service in C# with visual Studio

So you want to create a service in C#? well look no further. This article is amazing and will take you through each step clearly and let you know how to make the service. Highly recommend for creating services in the future.

http://www.c-sharpcorner.com/UploadFile/naresh.avari/develop-and-install-a-windows-service-in-C-Sharp/

Share Button

James’ Error codes

The following are Error codes used by James’ programs across platforms:

/// Error Code SE-JEHG-0001 = Programer needs to implement XLVBAInitializer method before running code.
/// Error Code SE-JEHG-0002 = User did not provide a destination for StackEm.
/// Error Code SE-JEHG-0003 = VBA constructed name for destination of stackem is invalid

This list is in progress.

Share Button

Daily Dose of Fiber to Keep your Internet Regular

So you want really fast internet in the calgary area? Well let me do the leg work for you! These websites offer down and up of at least 150mbs and fiber cables.

http://business.telus.com/en/business/internet/office-internet/?INTCMP=Fibre_Reimagined_BusinessPlans

https://www.shaw.ca/store/internet/internetPackageDetails.jsp?prodId=prod1480004

http://business.shaw.ca/Advanced-Solutions/Internet/Fiber-Gateway

https://shop.shaw.ca/internetplans?SegmentationLinkClicked=true

https://www.axia.com/plans

https://www.broadconnect.ca/internet-solutions/t1/

Share Button

Finally – I found how to get the version number of the dll

It has been a mystery on how to get the version number that is in Visual Studio (eg 1.0.1.4) to show. Now I can use a default method to go and get that or have a “version” method in everything that I build. For now, I have a VBA way of getting it. I would prefer to make a method in the c# class called “version” and put it in all my products – that way if I make .version() exposed to the COM/VBA world, I can still get it from VBA. Here is something I found which will do the trick in c#.

Share Button

Fighting to get a COM visible VSTO Addin so its method can be used by VBA

So I am having some troubles and am learning too much about old technology. In short – my interface is COM visible to my VBA in my Excel code, but not the class. Crap – add the word public in front of class – fixed it. None-the-less here is a blog of what helped me solve my issue. I WANT (insist) early binding (aka intellisense 🙂 ) (Something close to my issue). Want to know even more … look at the links at the bottom of this article.

First – set up things properly.

  • Have a GUID for the interface IMyInterface and on the class MyClassO
  • Have the dual interface turned on on the interface and class

Continue reading

Share Button

Sync.com – it keeps working even if someone breaks it. How to rescue a moved directory

Sync.com seemed like a good alternative for sharing files AND backup AND version control. With any new system, someone tries to breaking (inadvertantly usually) and one needs to recover. Someone moved (copied actually) a sync SHARED folder to the desktop. There also was the same directory stuck in time on the proper spot – so it looked like the sync broke. However, the one on the desktop kept syncing and that was being kept up to date.

There is hiden .syncinfo (not sure exactly what it is called) in each folder being synced. Even if you turn on hidden files – it cannot be seen. Continue reading

Share Button

Locking down RDP for security

Well, it seems after these last ransomware attacks (which I have been a part of the reconstruction crew) I have learnend about other methods of connecting to remote systems. But RDP is a pretty lightweight protocol for remote connection – it works and it works well except for its vulnerability last quarter. So … if we limit HOW we get to the point that RDP is available (VPN w. certs, username, SSL, limiting firewall scope) then we can still use RDP.

But how to we secure RDP down even further? Ideally I would like it where if the certificates match – boom your in only from certain machines. SSH works like this on Unix. Here are some links to peruse that might answer this question. I will augment this article once I have cracked what I wish to accomplish (this sentence will be removed).  Oh – and please do not email certificates or passwords. HUGE pet peave of mine when websites or people do this.

Continue reading

Share Button

Ripping Sharepoint Metadata Apart

I previously blogged about exporting files and metadata from Sharepoint. It worked!!!! Well, now that all the files are extracted – I have ended up with a csv.

  1. seems some double quotes are included – but a proper csv parser (eg. Excel) will turn those into 1 single quote
  2. The Xml column contains an xml node
  3. Add an xml header and a root node
    1. <?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>
    2. <root>
    3. <z:row …..
      />
    4. </root>
  4. Then using Notepad++ with “XML Tools plugin installed” – you can surf the node path with ctrl-alt-shift-P
    1. turns out to be /root/z:row
    2. a c# app – try this article
  5. Also – use the Plugins->xml tools->Pretty Print Attributes
  6. An XPath /root/z:row[@ows_MetaInfo] would get what we require
    1. Parse this crazy thing with CRLF or
    2. The first number 1234;# is the id number – remove it
    3. field:TY|val
      1. field name
      2. TY = type
      3. val = value
    4. Use a regex like this to parse
  7. Now .. undoing the whole thing by hand
    1. undo the HTML Entities – now this will likely be done with the XML API
      1. use the Notpad++ plugin HTML Tag (Plugin->Html Tag->Decode Enitites)
    2. &lt; -> < etc.
    3. unencode entities like #x0020 to a space etc.
  8. To extract thumbnails – they are stored in Base64 – here is a c# app to decode into jpegs

 

Share Button

How log out as Basic Auth

When you create a website with basic auth there is an unfortunate consequence in that there is no built-in method for logging out the user. Since basic auth username and password are stored on the client side, the server actually has no power to remove what is stored in the user browser’s cache. The solution? Create a log out screen where the user is prompted to put in the wrong password. This is usually counter-intuitive to most log out systems but is unfortunately the only way to get the client’s own browser to replace what is in the basic auth cache. A good example for how to set up the code in order to make this happen can be found at the following website: http://php.net/manual/en/features.http-auth.php.

Share Button