miércoles, 30 de septiembre de 2015

WPF Web browser does not display my website but others yes

Intended for: C# developers of all levels

Resultado de imagen de wpf logo
Last week it happened that after having desisted from fix a problem, I found myself with an remote possibility to fix it. More specifically what happened to me is that I made a WPF application that automated the process on the website of my company and should show the results in the browser; which did not do, was showing only a blank page on my website (if I was going to Google or other sites worked without problems).

First thing to dodge this problem is to use Awesomium, which works fine but of course: what website is created for Chromium? I guess that someone will bother to adapt their web to this fantastic brower, but this is not my case; It is for this reason that the web looked poorly and the "workaround" that I had invented just did´t work for me. Although it is true that I am not a user of Internet Explorer (I love Chrome), for a WPF applications which require a browser my choice is clear: the WebBrowser control. But of course, just if it works.

The first thing is to solve the million dollar question: Why it shows me a blank page? Because you are using an older version of Internet Explorer (possibly the oldest one you have installed in your PC, even if you do not have access to it, such as 8 or 9). Although it seems a foolishness, to me it has taken me long to find this.

And now comes the solution to the problem:

  1. We open the editor of the Windows registry by pressing the "Windows" + R keys, we will get the execution window:


  2. We write regedit.exe and give administrator permissions . If we are not the administrator of our we can not fix this problem. Run.
  3. If we have a normal PC of 64 or 32 bits seek the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
  4. If your PC emulates 64-bit on a 32 will look for the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
  5. Once you have found it we will add a new value DWORD of 32 bits with the full name of our application as a key (including the .exe at the end) and as a value one  of the table detail below.

Valor
Sirve para…
11001 (0x2EDF) 
Intenet Explorer 11, even with the directive ¡DOCTYPE
11000 (0x2AF8) 
Intenet Explorer 11, those with the directive ¡DOCTYPE will be displayed in mode IE9
10001 (0x2AF7)
Internet Explorer 10, even with the directive ¡DOCTYPE
10000 (0x2710) 
Intenet Explorer 10, those with the directive ¡DOCTYPE will be displayed in mode IE9
9999 (0x270F) 
Internet Explorer 9, even with the directive ¡DOCTYPE
9000 (0x2328) 
Internet Explorer 9, even with the directive ¡DOCTYPE (this case is identical to the previous). Those of Microsoft they have done wrong, I'm afraid…
8888 (0x22B8) 
Intenet Explorer 8, even with the directive ¡DOCTYPE
8000 (0x1F40) 
Internet Explorer 8, even with the directive ¡DOCTYPE (this case is identical to the previous). Those of Microsoft they have done wrong, I'm afraid again…
7000 (0x1B58) 
Internet Explorer 7


One more note, that is also very important. If you are debugging with Visual Studio will have to add the famous extension .vshost.exe (instead of .exe only) to the name of our application specifically for this to work as intended.

With that I think I've explained everything. If you have any questions, you can comment.

miércoles, 23 de septiembre de 2015

Duplicate cookies or that do not delete

Intended for: C# developers of all levels

Today I have come across with one of those "weirdness" that I love, the kind that make you lose midmorning and give you a hard time... Well, like those we must endure, we programmers, on a daily basis.

It turns out that the "cookies" that are used in 99% or maybe 100% of current web pages (well, maybe this information is pull out of the sleeve, nevertheless very much used) they are a pain in the ass. And not because in itself involve a special difficulty, no. It is for a bug that appears to exist in the enumeration Request.Cookies yResponse.Cookies.

How to detect when we are making a mistake? Well, the first symptom is the sight of more than one cookie with the same name in the lists above, that means, if we analyze the content of Request.Cookies or deResponse.Cookies and we detect in AllKeys property two or more times the same name, means that we are literally "screwed up".

Search in your code something like the following: this.Request.Cookies ["nameofyourCookie"] == null  or this.Response.Cookies ["nameofyourCookie"] == null.

And now I tell you that this is not working. And why? - you wonder. By the time you call the indexer this.Response.Cookies ["nameofyourCookie"] and without warning you create a new blank cookie (no data) with the same name.

So how I can delete a cookie since this would happens? I will illustrate it below with a practical example:

Code who fails:

if (this.Response.Cookies.[cookieName] != null)
{
      this.Response.Cookies.Remove(cookieName);
}

Code that works:

if (this.Response.Cookies.AllKeys.Contains(cookieName))
{
       this.Response.Cookies.Remove(cookieName);
}

This knowledge can be applied to other areas of cookies, just be careful to use the property AllKeys to check the existence of the cookie and it is more than enough.

I hope I've been helpful!

What are the Windows Services?



Article for: All types of users

At this point in life there are still people who don't know what a Windows Service is. In the Linux operating system are commonly called Daemons. A Windows Service is an application (like the one you already know, such as Word), but with the difference that their goal is to provide services (pun intended) to a specific target and which directly you will not have visibility (working in background).

Unlike conventional applications, Windows services have no graphical interface. If it's necessary an additional graphical interface for control or configuration we would be facilitated, but usually will be handled from the graphical interfaces that Windows provides us.

There was a time in which Windows services were created everywhere... any worthless application were installed further for Windows service to stay updated (how useful! Much better to be updated on startup, where it will stop! That is why I recommend the following article to optimize your Windows startup I wrote some time ago ... Is your windows running abnormally slow?

These applications have different functions: from spying on your keystrokes (keyloggers, which are illegal) to keep the inbox of the line printers. It is very useful to review what they are and to clean them when they are expendable. Your computer could gain significantly speed and will not take long.

My recommendation is to inspect these, disabling those who we suspect. If it is something necessary, we can always turn them back on again.

If you have any question, I accept comments and I will try to help you ...

lunes, 21 de septiembre de 2015

Ashley Madison map and list of hacked accounts

 Article for: Anyone who wishes to read




The truth is that what has happened is something that can happen to any company: a group of hackers whose interests are not entirely clear and they decide to attack a known web server and when they obtain the data, made it public.

It is for this reason that I advocate for not trust certain Internet services or like we call it  these today "the cloud," but some people have no fear and these things happen ...

For those who do not know (which at this point, I doubt it), Ashley Madison is an online service dating for unfaithful peoples, which comes to be (always in my opinion) as a scam, because more than 90% registered users are men (I say this with the data that is on the map above), therefore the dating, if they occur (which I honestly do not think it would happen, but I speak from ignorance because I have not tried it) will be more likely between two men (and I think it's not the purpose) ...

It is true that internet dating services usually work, because the purpose is not sex (or at least not so shameless).Keep in mind that men are usually more nasty, but in general women do not seek casual sex on the first date (basically because they can have it whenever they want, even if is not exactly with the man they desire).

So here's my advice: careful with what we post in certain places about us.

Honestly, I'm so sorry for Ashley Madison, because those are jobs and people in the street; I hope they can fix it somehow although see it fucked up ...

Upgrading:
I found a website where they tell you if your account has been hacked. It seems true, although as I always mistrust and have used email accounts that are not important ...

So if you want to know if they have released your account is as simple as going to the web http://www.allaboutashley.cr/ and consult via email, username or telephone (the data are not fully public, you have to know at least something of the person).

It is very important to emphasize that this page may be other fraud to get information, but it true that on many sites they recommend it, so I suggest you to not trust it excessively...

There is another issue that concerns me and as I can see even on the web that gives you the information, it could happen. This type of site have hundreds of fake profiles and perfectly can be an email from someone that does not really have anything to do with that mess ... So do not fully believe if the result is positive and do not think that your partner have an affair.

Whatsapp in your PC

Article for: All types of users

I've been wondering for long how to have Whatsapp on my PC, just like I have LINE. Not long ago I discovered that there is a simple way to have it centralized on your computer thanks to modern browsers and their extensions.




Let's see how easy it is to have it in Chrome:


  • First let's go to Chrome Store where we can find the extension.
  • Click on the blue button "Add to Chrome"
  • it will ask for confirmation, click "Add"
  • If all goes well, it will display the following window:


  • Now click on the following link chrome://apps/ and look for your new application or seeks the next button and click it

  • Now we need to scan with our mobile through Whatsapp the code that will be displayed..


  • To do so, we will open Whatsapp and in the first window (where all the conversations) will click on the "Pop-up menu" of the mobile, the three stripes button (usually the left bottom).

  • We follow the instructions that Whatsapp give us to capture the Bidi code

  • Finally, if all goes well we will have the following screen
  • It is important to know that our mobile should be connected by WiFi before you start using the application, because the synchronization between all our phone messages and the desktop application could consume part of the data rate.

That's all, I hope you enjoyed my article. For Mozilla-Firefox the process is exactly the same. If you have any doubts, you can comment.

 

Friendly Websites:

  • Manuel Enrique Díaz Rodríguez
  • CuRadio
  • Copyright © DotNet Pathways 2015
    Distributed By My Blogger Themes | Designed By Templateism