Wednesday, October 10, 2018

How to deploy a standalone .net forms website as an application

The Story (for coders only)…

I need an application to manage background services on a website I run.

These services are still in debug/development mode so I create them as Windows Forms applications rather than true “windows services”.

This works well as I can breakdown the tasks and build single applications to do e.g. clean up tasks or schedule Tweets with them. 

Each application has a thread, and if one is misbehaving it doesn’t take down the whole system.  I can Debug/Step through applications in Visual Studio and see where they going wrong, then restart them easily enough.

So I currently have an “Orchestrator” application that controls all these background service apps.

Current System

The server is set to autologin using sysinternals autologon.  Then I add a scheduled task to fire up this Orchestrator application.

The Orchestrator then queries the server to see the runstate of each application in it’s list. If one is not running it will fire up the background service.  I can easily change the required state in the Orchestrator and if one if running it will kill it.

I wrote the existing one in VB.net forms… Not something I do very often, working mainly with web technologies like MVC,  JSON dumping Webservices and Javascript clientside to test my service code.

It is a bit of pig.  It doesn’t use a database (I didn’t want a runaway DB from breaking my application), so all the config is stored in a JSON file - which is cool, but the datagrid is a pain and I’d much prefer to work with ashx-es.

Just for fun here is the old Orchestrator application screen shot.


The background services are in the DGV labelled 1.  When I click on a row the application’s details appear in 2.     Logging for the currently viewed application in Listbox 3  (this is transmitted to the Orchestrator via UDP)

Label 4 shows the Launching/Killing activity of the application and the controls in 5 allow me to configure the running properties of each background service.

New system

I want to control the application using a webbrowser and build the GUI using web technologies not all this VB forms stuff I’m not familiar with.

But how to do that!  After a lot of searching around and wild good chases  I found this article about Cassini.   I’m not that bothered about Framework 4.0,  it is only going to run on my server, and I can send a keep-alive pulse to prevent it going to sleep – permanently.

So here is how to deploy a standalone .net forms website as an application.

Create a Forms application targetting .net version 4


Then create a new web project in the solution explorer


Add a start index.aspx page.


Search Nuget for CassiniDev-AnyCPU.dll


Install it into the Form application

In the form application add the Imports CassiniDev statement then put the following code


Change the path to the path of the website project you added.  In my case it was \OrchestratorWebManager

You will need to build the website so it functions when you run the solution.


Run the Form application and there you go!


So… now the fun part.. migrating useable code from the old application to this new very basic forms project and the internal website.

Thursday, October 4, 2018

Cannot login to Windows 10 safe mode password incorrect

If you have to login to Windows 10 in safe mode and it tells you your password is incorrect.

Try using a previous password!

Yeah.. mad as that is... That is the case with me.... Oh dear Microsoft... 

Sunday, September 30, 2018

How to change Organisation Owner to different account in VSO

Visual Studio Online (now know as AzureDumpO or something too) is free for 5 users.  It get's expensive the moment you start to pay.

You can create a new VSO account with an email address from the project you making, and then add yourself into the project.  You've "lost" a seat however with the email address from the project.

"Organization admin cannot be downgraded to stakeholder license" is what you get if you try to downgrade that account to Stakeholder.

You can get round it by going into VSO as the user who owns the account (user@projectsite.com)

Click Users.. Security.. Project Collection Administrators.. Members..

Then add yourself in there.



Once you've done this logout and login as yourself.

Then hit the clog, and Settings.. Adding yourself as the Organisation Owner.


You can now downgrade the user@projectsite.com to stakeholder.

Not you should go back into the Project Collection Administrators and add the account back in there (it will tell you they don't have code access... that fine) so you don't get locked out.

On site Build Agents

If you use On-site build agents to deploy code it appears you can stilll use a PAT generated with what now a stakeholder account.

Thursday, September 20, 2018

5 point plan for Microsoft Success

I'm a lifelong Microsoft user: From early beginnings with GWBasic..  thenVB3&4 at university, classic ASP, did an NT4 MCSE and most recently VB.net MVC..

IE was a disaster, so was Windows Mobile & now Windows Phone.
I lost Office when the damn ribbon appeared.

Visual Studio/Visual Studio Online/VB.net MVC are what keep me in the MS World.  (I also have Ubuntu installations...)

Here are 5 points that if implemented would make life a lot simpler again; and probably make Microsoft even more money:

1) Dump the "Store" and let .exes run directly on WP10

Like you can on Windows Desktop.  Sure there might be the odd virus or other problem.  But it's no different from the Desktop OS.

2) Put the bloody toolbars back on Office. In fact put the toolbars and buttons and everything else back where was on Windows XP, for me "intuitive" means "guess" & "digging about".   I'm happy to have everything in menu that I can scroll through and buttons that are obviously clickable.

3) Make Bing work better.  It is terrible...

4) Show the Url/Location all the time on Edge - I don't want it "disappearing" and having to find it.

4a) On that note:  Don't force people to try to use Edge.  If it's better people will use it - sly tricks and nasty popups just make me more determined NOT to use it.

5) Please give me MSN messenger back. Skype is utterly useless, slow to unusable, bugs and errors all over it.



Saturday, September 8, 2018

European version of Mount Rushmore

Andorra is getting good a creating unique events and locations to attract visitors.  We have the Caldea Spa, the summer time free Cirque du Soleil show, and most recently the art/structure of the rock of Quer viewpoint.

I still think that Andorra should specialise in something; like the Swiss are synonymous with clocks, watches and banking... but that's the subject of a different blog post.

As an additional "attractor" we should commission an artist to carve out a face into a mountain in the same way that Mount Rushmore was.  This would be the "European version" of this famous work of art.


There are lots of locations suitable, but there is one particular rock face that I walk by very often on my way home. It is overlooking the village of Erts.


This is a large, must be 20/30 metres high face - that to my untrained eye, does look suitable.  You can't really get the full effect from my photo - try Google Maps to see it better.

But who should feature on the rock face?


Well Charlemagne of course!  The "father" of Andorra - he features in the National Anthem, and is deeply ingrained in the Andorran consciousness.


Wednesday, May 16, 2018

Vb.net CMS

I've just acquired the domain name vbnetcms.com

Which is timely because I'm about to start writing one.

I've got several sites that need basic CMS functionality.

If you want to be kept informed then leave a comment below and tick the "notify me" checkbox.

What site you want to put the CMS onto? What flavour of VB.net you use? Anything interesting!

Friday, April 6, 2018

How much is a website visitor worth?

Good Question.

Over on http://www.bedandbreakfasts.co.uk we get about 6K visitors a day, and revenues approximately 1,000 GBP: Giving a value to each visitor at GBP 0.1667 – visitors on this site have a high commercial value because they are looking for Bed and Breakfast, and likely have their credit-cards out, and ready for action. 
Lower values are likely on “information only” sites that rely on adsense and other click-based revenue.  http://mdtravelhealth.com used to get about 30K visitors a month and make 100 USD.  This gives a per/user value of 0.0033 – many multiples lower than the high-value site. 
If you want to look for your site’s value: I’d reckon it’s somewhere between these two – depending on why the visitor came to your site.

Friday, March 9, 2018

Private Eye Lookalike

Been thinking about taking out a subscription again recently to Private Eye, however it will have to wait. 

 

In the meantime I noticed a look-a-like worthy of the http://www.private-eye.co.uk/lookalikes page

 

Sigrid

Neil Hippy

 

 

Sunday, March 4, 2018

8437001210633











I'm a Brit. so I love fish & chips. I've lived in Iberia for 12 years. so I love seafood. I misspent my youth in pubs. so I love crisps.

so I had really high hopes for this el called 'fish & chips' fish snack.

....sadly it is revolting.  if you can imagine the fish Top cat used to get out of the bins... well it's that taste. barf...



Thursday, February 1, 2018

scientificliterature.org and how to identify scam medical journal publication sites

My wife has a friend who, together with her husband, are hard working medical professionals here in Spain.

She often writes articles for conferences and makes speeches concerning medical research.

Sadly, people like her and her husband are the target of unscrupulous scammers who use social-engineering to entice them to help them "publish" their articles and then surprise them with previously-hidden fees.

To have published papers is considered a virtue in the academic world; the medical profession is no different.  So when a prestigious looking website contacts you and asks you to write a paper, doctors will naturally want to participate.

You need to be careful!  I've written this blog post to highlight this particular company "Scientific Literature LLC"  Who are clearly scammers of the highest order.

Here are some quick and easy tips to help you determine if the website is a scam or not.

Study the site carefully

Most sites will look very professional, this is their ace card.  But with careful analysis you will be able to see through the fancy looking logos and text.




"Our company will support the new encroachment oh high eminence research articles through the open access policy. "

What a load of drivel.  In fact most of the text on this page is utter rubbish.  Admittedly for our Spanish-speaking friends, this will be harder and lots of business-speak can be unfathomable but this is clearly bunkum.

Our company is a non-revenue scientific publishing association which circulates high quality, peer-reviewed journals and formulates them easy to get too explicitly to all the learners

More drivel - and it even says it's "non-revenue"... so what are they doing sending Invoices?

These people are scammers; their spelling and grammar will not be as good as you'd expect from a reputable site.

Check the Social Links



On this site none of the LinkedIn, Facebook, Twitter or G+ links work.   One non-functioning might be excusable - but all of them! No way.

A reputable organisation will have a Facebook page with hundreds if not thousands of followers.  Look a the interaction of these users; are they commenting intelligently?   Look at the bios of the followers - do they look real or sparsely populated; meaning they could be fake too.

Look at the WHOIS of the domain name

Whilst this is not a guaranteed giveaway it can help in your detective-work.

Use a service like http://whois.domaintools.com/  just enter the domain name and the registrant information will be shown.



Some clues here; a reputable company is very unlikely to be using a "privacy service" of any kind, nor is it likely to have incomplete or incorrect information here.   Also unlikely to be using a "hotmail" or "gmail" address as the registered contact.

Everything shown on this page stinks.

Google the company name and the domain name

https://www.google.com/search?q="scientificliterature.org"

Use "quotation" marks if you are entering the domain name.

A reputable publishing service will referenced on many academic sites; like universities (ending .edu or .ac.uk etc), governmental sites (.gov) or other well-known entities.

This site has no such references.  Make sure you click through the results to page 4 or 5 at least.

Results for this company show they have been sending suspect spam, and are even on a list of "Potential, possible, or probable predatory scholarly open-access publishers".

Legality?

The reason "publishers" like this can get away with it is that what they are doing, whilst being a pointless waste of time and money, is not illegal.

What to do if you have been scammed?

It is completely unacceptable to suddenly receive an Invoice for work done; this is commonly disguised as "copy editing work" or "handling charges".

DO NOT PAY THEM.

Did you sign any contract where you agreed to any payment?  No, you didn't.  As in the case of our friends here they didn't.

So under what law are they going to enforce a payment?  None.

Simply delete the emails as they are sent.  No doubt the scammer has automated systems that will spew more and more serious and threatening emails at you, and all their other victims.

If you were to ever get to Court, which you won't, the judge would ask for the paperwork contract signed by you, which doesn't exist.

So sleep easy.

Please feel free to post the names of any other companies or people that have tried to extort money from you in the comments below, so other's can find them via Google.