Καλώς ορίσατε στο dotNETZone.gr - Σύνδεση | Εγγραφή | Βοήθεια

 

Αρχική σελίδα Ιστολόγια Συζητήσεις Εκθέσεις Φωτογραφιών Αρχειοθήκες

dotNETZone.gr Weblogs

  • Part 2: Running non-.NET API Apps on Azure App Service

    On my last post I’ve talked in a bit more detail what API Apps are, what you can build with them, how they work and provided some answers to frequently asked questions. Another very common question is: “How do I run an API App that it’s not .NET?“. If you’ve read my last post, I […]...
    30-03-2015, 18:43 από The PK Blog στο The PK blog
    Δημοσίευση στην κατηγορία: ,
  • 5+1 questions concerning strings you never had the time to answer

    Many times I've found myself working on a project while questions concerning code efficiency or why some things were made this way, pop up all around. Since project deadlines are usually more important than my questions, I always end up forgetting the questions I had. To end this, I decided to mark them down, so I can check them out later on. As a result I wrote this article about strings concerning six interesting topics which I think many others might find interesting as well.       String.Empty VS empty string   This issue is quite common to be found even in code created by the same group. For example, there probably is a place around the source code where str = "" shows up and another one (probably not written by the same person) where str = String.Empty shows up. My remark concerning the person who wrote those lines was meant, as each developer seems to like either the first or the second way best. If so, is there any difference between these two methods?    To begin...
    29-03-2015, 11:57 από το μέλος k badas στο .NET Hints
  • Part 1: Azure App Service API Apps in more detail and some FAQ

    What is Azure App Service? In case you missed it, on the 24th we announced Azure App Service. In simple words, it’s a common platform were you can develop Web, Mobile, Logic and API Apps. It’s based on proven technologies and more specifically WebSites, which is now called Web Apps. The fact that there is […]...
    27-03-2015, 01:25 από The PK Blog στο The PK blog
    Δημοσίευση στην κατηγορία: ,
  • Stress test your website

    Publishing a website is always a pleasant thing to do. However there may be times you guess your website works fine but things will go bad later on. That may be the time the website starts gathering a lot of visitors, much more than the few users that have been testing it before deployment. At that point a few requests on the database or less optimized source code might not look that bad but when a few hundred visitors or more roam around your website at the same time, things may start looking gloomy.   That may be either the result of poor server hardware or slow connection between the server and the database or lousy source code or, well, pretty much anything. Things tend to go bad under pressure. To avoid unpleasant surprises a developer may create stress tests using Visual Studio so he can foresee what may happen in future and fortify the website as soon as possible.   Getting started   So, what is a stress test? A stress test simulates a bunch of users moving around our website, the way average...
    26-02-2015, 20:31 από το μέλος k badas στο .NET Hints
  • Creating an asynchronous select control

    Everyone knows the basic select element that is the HTML equivalent to .NET's DropDownList control. Imagine an HTML select containing one hundred or more elements. This would take much time to send and much HTML text to keep your data. Let alone SEO issues that might occur. Instead, data could be filled asynchronously when user activated the control or asked for it using a WCF service leading to far better results. To accomplish that we are going to use JQuery's autocomplete widget.     Getting started   This is a sketch of what we are going to do.   Looks better, doesn't it?   The select element looks like this       < select >         < option   value ="1"> Chocolate chip cookie </ option >         < option value ="2"> Chocolate ice cream </ option >         < option value ="3"> Cookies and...
    22-12-2014, 20:33 από το μέλος k badas στο .NET Hints
  • Attacking a website

    People will sometimes attack random websites for their own reason. DotNetHints, being a random website, was bound to become a target of attacks as well. As far as I can tell there has been no damage on either the website or the database. Since all the things I've learned proved quite useful as well as interesting, I decided to write an article containing a list of interesting attack tools, using the attacks made on DotNetHints as a guideline, mentioning what was the purpose of each and every one of them.   SQL Injection attacks   If you would like to read a few basic things concerning attack patterns, you can read this   previous article . Now, let's talk about SQL Injection attacks. An SQL Injection is an attack where text inserted as input can be translated as malicious SQL statements.   For example, DotNetHints gets the value of the blog article to show using the query string, let's say http://dotnethints.com/blog?id=53. We could assume that number 53 is passed through the database into...
    27-11-2014, 15:04 από το μέλος k badas στο .NET Hints
  • My blog is not dead, I promise.

    It’s not dead. I promise. I haven’t written a single thing for a loo<chuchu_train>oooooooooo</chuchu_train>ng time. It was for a good reason. So what happened? Well: I joined Microsoft. Which means I had to drop my MVP status. I’m a Technical Evangelist, writing code, spreading knowledge. I moved to Vancouver, BC to be closer to my team. […]...
    14-11-2014, 05:43 από The PK Blog στο The PK blog
    Δημοσίευση στην κατηγορία:
  • Handling unhandled exceptions

    We have already talked about exception handling and creating error pages on a   previous article . In this article we will see how we can use the Global.asax Application_Error method to handle every possible exception in our website.   Introduction   Typical exception handling can use try catch blocks in pieces of code where an exception is likely to happen. On the other hand an error page works for all possible exceptions on our website but will do nothing more than display an error page. However it would be nice if we could be informed when an unhandled exception is thrown. Since our code is supposed to work, an unhandled exception would state that either there is something wrong with it, or someone is trying to throw exceptions on purpose, by messing up with the URL for example.   Either way, we can use the Application_Error method to do things like log error info or send an email to the administrator. Application_Error will be called when an unhandled exception is thrown.    ...
    09-10-2014, 19:59 από το μέλος k badas στο .NET Hints
  • Is it possible to Join a table with a stored procedure?

    Σε όλους είναι γνωστό ότι δεν μπορείς ένα table να τον κάνεις join με μια stored procedure η οποία γυρνάει αποτελέσματα σε μορφή table. Είναι όντως 100% αλήθεια και αν δεν είναι γιατί δεν το χρησιμοποιούμε; http://www.sqlschool.gr/blog/is-it-possible-to-join-a-table-with-a-stored-procedure-1001.aspx...
    27-09-2014, 20:25 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Facebook & .NET

    It's been a few years since social networks have become a part of our life. Since people such as celebrity stars and politicians use them, it is no wonder that developers would choose to do so, in their own way. Let's choose Facebook to interact with. We are going to see how we can use .NET to communicate with Facebook API and use it to do things like getting users info or posting on Facebook.     Introduction   To interact with Facebook we need to have a Facebook application of our own. You can create your own application (similar to my DotNetHints application) through the   Facebook Developers portal . Creating the basics is not hard but in case you find yourself in trouble, doing some online research will be more than enough to help you.   After you have created your application you will notice you are given two IDs. That's the App ID and the App Secret. Note them down as we are going to use them later on in our example. One more interesting thing is the Site URL parameter. You should...
    21-09-2014, 17:54 από το μέλος k badas στο .NET Hints
  • URIs, URLs, URNs and .NET

    URL is a term familiar to a lot of people since the beginning of the internet age. Actually, not every internet user is familiar with that URL thing, but at least there are some knowing that copying some letters from the top of your browser and sending them to a friend might help him in opening the same page in his browser. People who are familiar with the internet may have heard the term URI and know that is something like the URL. Finally there is is another yet term connected with the previous ones; that's the URN. We are going to find what each one of these terms is about, what they are made for and how .NET may help us to handle them.   Introduction   A nice way to begin, is by saying what these things are. So here's what each term stands for: URI : Uniform Resource Identifier URL : Uniform Resource Locator URN : Uniform Resource Name   We can now tell that they are all referring to some uniform resource. Uniform resources can actually be a lot of stuff. An image, as well as a website address...
    26-07-2014, 15:56 από το μέλος k badas στο .NET Hints
  • FIX for Online index build corruption issues in SQL Server 2012 (SP1 & SP2)

    Όσοι έχετε εγκατεστημένο σε παραγωγικό περιβάλλον SQL Server 2012 θα πρέπει να βάλετε το παρακάτω fix το οποίο διορθώνει ένα πρόβλημα που εμφανίζεται κάτω από συγκεκριμένες συνθήκες όταν κάνεις online clustered index rebuild και έχει να κάνει με απώλεια δεδομένων. http://www.sqlschool.gr/blog/fix-for-online-index-build-corruption-issues-in-sql-server-2012-sp1-sp2-989.aspx...
    21-06-2014, 23:09 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Getting content out of web pages - The WebRequest class

    A simple project may be able to do just fine using its local resources, database and nothing but that. However an advanced application may be expected to use distributed resources, such as getting data out of web pages. In that case we need to make requests of our own in order to get that info. .Net contains the WebRequest class which can be quite helpful in such cases. We are going to use WebRequest's methods to get distant info, create a few useful examples and finally find out how we can create asynchronous requests using .Net 4.5.         Using the WebRequest   A request could be regarded as a basic part of the web architecture. A client sends a request to the server in order to get data. In return, the server will send the data back to the client.     We can also create requests using a few lines of code using the WebRequest class.  This is what this article is about. To begin with, we are going to create a simple GET requests to see how we can use it.    ...
    21-06-2014, 20:38 από το μέλος k badas στο .NET Hints
  • DBCC CHECKIDENT - Manually set a new current identity value for the identity column

    Δεν είναι σπάνιο το να έχεις ένα identity field μέσα σε ένα πίνακα. Κάποια στιγμή πιθανότατα θέλεις να σβήσεις όλα τα δεδομένα του πίνακα και όταν αρχίσεις να γεμίζεις ξανά τον πίνακα θέλεις το identity field να ξεκινάει από την αρχή http://www.sqlschool.gr/blog/dbcc-checkident-manually-set-a-new-current-identity-value-for-the-identity-column-981.aspx...
    04-06-2014, 11:33 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Garbage collection and memory management.

    Garbage collection is an essential part of .Net architecture since it saves you from the trouble of managing the memory parts you have already used.  We are going to see what garbage collection actually is and what may cause it. Next we'll check out how we can manage memory parts ourselves and talk about the disposed pattern.     Introduction   Garbage collection was one of the first things I heard of when started learning .Net. Even so, it's been some time since then that I got the first idea of what garbage collection is about, as most developers were not interested in how it works. Since garbage collection and memory allocation is not a part of a typical .Net developer and "it ain't broke" it doesn't sound like it "needs to be fixed". However a developer who likes to know how things work, may find this article quite interesting, as it forms a simple description of what happens under the hood while our programs keep running.     The stack and the heap  ...
    01-06-2014, 21:38 από το μέλος k badas στο .NET Hints
  • Strange little thing called postback.

    I guess that most people know what postback is. Well, at least most developers that have been using ASP.NET Web Forms. If so, you know that postback is an essential part of your application. In this article we are going to search in depth what postback actually is, how it is created and how it can be used in combination with other parts of web applications.   Brings back memories   Probably the first time you heard of postback was when you tried to create a DropDownList the way it is in the following  example.           < asp : DropDownList   runat ="server"   ID ="DropDownListID" />         < asp : Button   runat ="server"   Text ="Click"   OnClick ="ButtonClicked" />         < asp : Label   runat ="server"   ID ="LabelID" />   protected void   Page_Load(...
    10-05-2014, 12:38 από το μέλος k badas στο .NET Hints
  • Delegates

    Delegates are a way to handle methods in a different way than we are used to. They comprise a basic part of the .Net architecture and are important in order to use technologies like lambda expressions.   What is a delegate?   A delegate is a reference type which can be used as a connection between that and the methods it is assigned. Think of it as a reference type for methods. In a few words, we can create the WriteSthDelegate delegate and the WriteSthMethod method. Then we connect the method to the delegate. Now, we can use the delegate the way we would use the method. Consider a delegate something like a pointer to a method.   Let's see an example.   We will use a simple literal object called DelegateOutputLitID to show the output. Here's our delegate and the method it will use.   delegate void   WriteSthDelegate ( string   outputText);   void   WriteSthMethod( string   outputText) {       DelegateOutputLitID.Text += outputText; }  ...
    16-04-2014, 23:58 από το μέλος k badas στο .NET Hints
  • L stands for lambda

    Lambda expressions are anonymous functions that can be really helpful at times. Alike many other .NET methods, lambda expressions are not the only way to create the algorithm you want, however they may help you in writing code that is much easier to read than the old fashioned way. We are going to see what lambda expressions are and go through some basic applications.   Lambda calculus   Even though the fact that you reading this article shows that you are interested in the .NET's lambda part, we'll first take a little tour over its mathematical background. When Microsoft developers released .Net 3.5 and introduced lambda expressions, that idea had been in store for a long time. The following description is nothing more but a naive description of the mathematical model and will be used as an introduction to the development model. In 1930s Church, a mathematician, in order to strengthen the foundations of mathematics, created a formal mathematical system based on function abstraction. He called that system...
    06-04-2014, 18:51 από το μέλος k badas στο .NET Hints
  • Roslyn VISX installer crashes with System.UriFormatException? Try installing as Administrator

    Installing Roslyn on a machine where I had local administrator rights worked without issues. At work though, the installer crashed and the following event was logged: Fault bucket , type 0 Event Name: CLR20r3 Response: Not available Cab Id: 0 Problem signature: P1: vsixinstaller.exe P2: 12.0.30324.0 P3: 532f5607 P4: System P5: 4.0.30319.18408 P6: 52311185 P7: 1cf7 P8: 75 P9: System.UriFormatException P10: To overcome this, open a Development command prompt with administrator priviledges, go to the folder where Roslyn is stored and execute: vsixinstaller "Roslyn End User Preview.vsix"...
    04-04-2014, 10:03 από το μέλος Παναγιώτης Καναβός στο Panagiotis Kanavos' Weblog
  • Understanding Index External Fragmentation - Part II (The explanation)

    Πριν μερικές μέρες έγραψα το πρώτο μέρος για το συγκεκριμένο θέμα στο οποίο έδειξα όλη την περιπτωσιολογία πάνω σε αυτό. Σήμερα θα σας εξηγήσω όσο απλούστερα γίνεται τι κρύβεται πίσω από την κουρτίνα. http://www.sqlschool.gr/blog/understanding-index-external-fragmentation-part-ii-the-explanation-967.aspx...
    23-03-2014, 19:22 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Sending AJAX requests

    In a   previous article   we had some talk concerning AJAX. We used AJAX to read some simple file. Even though this may have seemed to be quite nice it is but a simple example of what AJAX can do. Things are going to get more interesting in this article where we will be talking about AJAX requests. In other words, how to exchange data between an html page and a server page depending on the requests parameters.   GET and POST   HTTP Request Methods, describe what the request is about to do. If this isn't the first time you are dealing with the web, you might have probably heard of the two most common methods, GET and POST.   Let's try to describe what these terms actually mean. To begin with, both requests contain information. For example whether we ask for the second page inside a forum or fill out and send a form in a contact page, we send information to the server. However you may be able to tell the difference between these requests. In the first example we are asking the server for...
    20-03-2014, 22:14 από το μέλος k badas στο .NET Hints
  • Understanding Index External Fragmentation - Part I (The cases)

    Είμαι σίγουρος ότι έχετε ακούσει ουκ ολίγες φορές ότι μια από τις αιτίες που μπορεί να μειώνει την απόδοση των queries μας σε μια database είναι το index fragmentation (εφόσον βέβαια έχουμε σωστούς indexes και σωστά στατιστικά για αυτούς και φυσικά έχουμε γράψει queries που έχουν where clause) και ότι τo χειρότερο είναι το external fragmentation. http://www.sqlschool.gr/blog/understanding-index-external-fragmentation-part-i-the-cases-965.aspx...
    19-03-2014, 01:24 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
  • Value And Reference types

    Introduction   Every variable created in a .Net application can be either of value or reference type. C#'s value type consist of most basic types such as all numeric types, bools, enums and structs. All other types, such as strings, classes, interfaces etc, are reference types. At first you may guess that value types are simpler than reference types. A class for example can be much more complex than an integer. You may be right. However the actual reason we use this division, is the way such value types are copied, as well as the way they are stored in memory. Let's take a look at the memory part first.     Memory allocation   Supposing we declare an integer.   int   ValueTypeInteger = 0;   What would we need to store its value? Just a single slot in memory where we will store 0 (and the variable's name). Now what if we had a class like this?     class   ReferenceTypeClass //Random class containing integer value {      int   _ReferenceTypeClass_Int;...
    11-03-2014, 21:55 από το μέλος k badas στο .NET Hints
  • A simple guide to Unit Testing

    Testing is a part of every developers life. No matter how experienced a programmer you are, there are always times when, out of pressure or by mistake, something will go wrong. Sooner or later you will have to test your code to ensure that everything works according to plan. So, how can unit testing make our lives easier? Unit Testing is a tool that allows developers to easily test their source code and ensure that it works just fine, as if they had actually tested it. We are going to take a look at how it works, all the way from the beginning till you can create simple, yet effective, unit tests on your own.       Getting started   When testing, we compare the output of our project to what we are actually expecting to see. Supposing we create an application that sums up values. A simple test would be to try it out on two random numbers, 1 and 2. If the output is 3, our test was successful. However, the fact that we successfully got a 3, cannot ensure that by the time the projects is released,...
    03-03-2014, 15:54 από το μέλος k badas στο .NET Hints
  • What is the proper max server memory setting for a SQL Server with N gigabytes of installed RAM?

    Αυτή είναι μια από τις δημοφιλέστερες ερωτήσεις σχετικά με τον SQL Server. Ποιά είναι όμως η απάντησή της; http://www.sqlschool.gr/blog/what-is-the-proper-max-server-memory-setting-for-a-sql-server-with-n-gigabytes-of-installed-ram-963.aspx...
    24-02-2014, 23:24 από το μέλος Antonios Chatzipavlis στο Rocking with Knowledge for .NET programming
Περισσότερες Δημοσιεύσεις « Προηγούμενη - Επόμενη »
Με χρήση του Community Server (Commercial Edition), από την Telligent Systems