Thursday, February 27, 2014

404.3 Error for ASMX page in IIS 8.5



When try to add a web service project to a fresh installed iis, this problem occurs.

I tried several options and finally after adding asp.net option in iis, this becomes solved.

In windows 8, Goto Control Panel -> programs -> programs and features

Click Turn windows features on or off.

Check whether you installed asp.net as shown in the below screen.



Thursday, February 13, 2014

Looping over files with the Foreach Loop

In SQL Server 2000 Data transformation Services (DTS) it was a bit of a hack to be able to loop over files of a given type in a certain directory and import them into your destination. It involved a lot of "Glue Code" and a certain amount of fooling the package into going back to a previous task because it still had work to do. Well thankfully in SQL Server 2005 Integration Services (SSIS) that has all changed and this article is going to show you how.
The image below shows us how incredibly simple and clean the package will look when finished. There are some things worth pointing out at this stage. In the centre of the screen we see the Foreach Enumerator container and inside that we see the Data Flow task which houses the pipeline. At the bottom in the Connection Managers tray we see our Flat File Connection Manager (My Source File) and our OLEDB Connection Manager (My Destination). The Flat File Connection Manager is the one in which we are most interested for this article. Both of these managers are used in the Data Flow behind the DataFlow task. We will not be detailing the pipeline behind the DataFlow task in this article but it consists of a Flat File Source moving data to an OLEDB destination.
ThePackage Let's begin then by opening up the Foreach enumerator and moving straight to the Collection node in the tree on our left. Below we see our information already populated.
Collection What we see on the screen is pretty self explanatory but let's go through it anyway. We have chosen to enumerate over a file collection and ths is indicated by the value next to the Enumerator property at the top. We need to specify a folder over which to loop and for which type of files to look and we do that in the centre of the form. We are given three options as to what is returned when the loop finds a file in the folder at the bottom of the form. We can return the whole filename including extension and path, the name and extension or simply the name of the file found. Because our connection manager is going to need to know exactly where to find the file and it's name we have hosen the first option. The final thing we see on this screen is the ability to traverse subfolders. In our example we do not need to do this.
When the Foreach enumerator finds a file it needs to tell us about what it found and it does this by populating a variable. Click on to the Variable Mappings node now. Our package currently has no variables able to accept the name of the file so we are going to create a new one.
VarMapping The next screen we see allows us to set the values of the variable. As we can see variables can be scoped in SSIS to certain executables in the package or to the package itself.
Scoped Here is how our variable looks with all its properties set.
FileFound Because the enumerator will only return us at most one value on every iteration we map our variable to an index of 0.
Mapped We have now configured everything as far as the Foreach enumerator is concerned. We now need to set the rpoerties of the Flat File Connection Manager. Highlight the manager in the tray at the bottom, right click and choose properties.
FilePropBefore The important part of this dialog is highlighted and that is "Expressions". Click on the ellipses and we will be taken through to the next screen where we can start to create the expression. In the screen that follows, from the Property column drop the list down and choose ConnectionString
Ex1 Now hit the ellises button to the right and we are taken through to the expression editor where we will build the actual expression itself.
Ex2 Our requirements are pretty simple here and all we want to do is to retrieve the variable we defined earlier. To do this simply drag the variable from the list at the top to the expression text box at the bottom. Property Expressions can become very complex and we shall no dount be seeing more of them in future articles. After you have chosen the variable click OK
Ex3 We now see that our expression is mapped to our ConnectionString property. Click OK
Finally we can now see our File Manager's Connection string property being mapped to an expression in the properties of the manager.
FilePropAfter That's all there is to it. When the enumerator finds a file matching our requirements it will set the correct property on the connection manager and this will be used by the pipeline at runtime.

Source: http://www.sqlis.com/sqlis/post/Looping-over-files-with-the-Foreach-Loop.aspx

Tuesday, February 11, 2014

String.Format in C#

Console.WriteLine("Standard Numeric Format Specifiers");
String s = String.Format("(C) Currency: . . . . . . . . {0:C}\n" +
                    "(D) Decimal:. . . . . . . . . {0:D}\n" +
                    "(E) Scientific: . . . . . . . {1:E}\n" +
                    "(F) Fixed point:. . . . . . . {1:F}\n" +
                    "(G) General:. . . . . . . . . {0:G}\n" +
                    "    (default):. . . . . . . . {0} (default = 'G')\n" +
                    "(N) Number: . . . . . . . . . {0:N}\n" +
                    "(P) Percent:. . . . . . . . . {1:P}\n" +
                    "(R) Round-trip: . . . . . . . {1:R}\n" +
                    "(X) Hexadecimal:. . . . . . . {0:X}\n",
                    - 1234, -1234.565F);
Console.WriteLine(s);
 
 
 
Example output (en-us culture):
(C) Currency: . . . . . . . . ($1,234.00)
(D) Decimal:. . . . . . . . . -1234
(E) Scientific: . . . . . . . -1.234565E+003
(F) Fixed point:. . . . . . . -1234.57
(G) General:. . . . . . . . . -1234
    (default):. . . . . . . . -1234 (default = 'G')
(N) Number: . . . . . . . . . -1,234.00
(P) Percent:. . . . . . . . . -123,456.50 %
(R) Round-trip: . . . . . . . -1234.565
(X) Hexadecimal:. . . . . . . FFFFFB2E


Source: http://stackoverflow.com/a/15168787/1295466

Thursday, February 6, 2014

10 Programming Languages You Should Learn Right Now

"One of my mentors once told me that a programming language is just a programming language. It doesnt matter if youre a good programmer, its the syntax that matters," Tim Huckaby, CEO of San Diego-based software engineering company CEO Interknowlogy.com, told eWEEK.
However, Huckaby said that while his company is "swimming" in work, hes having a nearly impossible time finding recruits, even on the entry level, that know specific programming languages. "Were hiring like crazy, but were not having an easy time. Were just looking for attitude and aptitude, kids right out of school that know .Net, or even Java, because with that we can train them on .Net," said Huckaby.
"Dont get fixated on one or two languages. When I started in 1969, FORTRAN, COBOL and S/360 Assembler were the big tickets. Today, Java, C and Visual Basic are. In 10 years time, some new set of languages will be the in thing. …At last count, I knew/have learned over 24 different languages in over 30 years," Wayne Duqaine, director of Software Development at Grandview Systems, of Sebastopol, Calif., told eWEEK. By picking the brains of Web developers and IT recruiters, eWEEK selected 10 programming languages that are a bonus for developers to add to their resumes. Even better, theyre great jumping-off points, with loads of job opportunities for younger recruits.

1. PHP



  • What it is: An open-source, interpretive, server-side, cross-platform, HTML scripting language, especially well-suited for Web development as it can be embedded into HTML pages.
  • Why you should learn it: Its particularly widely used. "High-speed scripting with caching, augmented with compiled code plug-ins (such as can be done with Perl and PHP) is where the future is. Building Web apps from scratch using C or COBOL is going the way of the dinosaur," said Duquaine.
  • Job availabilities: 1,152*

  • 2. C#
  • What it is: A general-purpose, compiled, object-oriented programming language developed by Microsoft as part of its .NET initiative, it evolved from C and C++
  • Why you should learn it: Its an essential part of the .Net framework. "Learning C#, which is just Java with a different name plate, is critical if you heavily use Microsoft," said Duquaine.
  • Job availabilities: 5,111

  • 3. AJAX (Asynchronous JavaScript and XML)
  • What it is: Though technically not a programming language, AJAX uses XHTML or HTML, JavaScript and XML to create interactive Web applications.
  • Why you should learn it: Ever since Google Maps put AJAX, well, on the map, the requests for AJAX-knowledgeable pros went through the roof. "The demand for AJAX knowledge is huge because its so damned hard to learn," said Huckaby. Of note, Microsoft announced recently plans to release a tool named Atlas that will make AJAX easier to implement. "If Microsofts Atlas tool is successful, it would bring the extreme complexity and annoyance of AJAX to the average worker," said Huckaby.
  • Job availabilities : 1,106

  • 4. JavaScript
  • What it is: Not to be confused with Java, JavaScript is a an object-oriented, scripting programming language that runs in the Web browser on the client side. Its smaller than Java, with a simplified set of commands, easier to code and doesnt have to be compiled.
  • Why you should learn it: Embedded into HTML, its used in millions of Web pages to validate forms, create cookies, detect browsers and improve the design. With its simplicity to learn as well as wide use, its considered a great bang for your educational buck.
  • Job availabilities: 4,406

  • 5. Perl
  • What it is: Perl is an open-source, cross-platform, server-side interpretive programming language used extensively to process text through CGI programs.
  • Why you should learn it: Perls power in processing of piles of text has made it very popular and widely used to write Web server programs for a range of tasks. "Learning some form of scripting language, such as Perl or PHP is critical if you are doing Web apps," said Duquaine.
  • Job availabilities: 4,810

  • 6. C
  • What it is: A standardized, general-purpose programming language, its one of the most pervasive languages and the basis for several others (such as C++).
  • Why you should learn it: "Learning C is crucial. Once you learn C, making the jump to Java or C# is fairly easy, because a lot of the syntax is common. Also, a lot of C syntax is used in scripting languages," said Duquaine.
  • Job availabilities: 6,164, including all derivatives

  • 7. Ruby and Ruby on Rails
  • What they are: Ruby is a dynamic, object-oriented, open-source programming language; Ruby on Rails is an open-source Web application framework written in Ruby that closely follows the MVC (Model-View-Controller) architecture.
  • Why you should learn it: With a focus on simplicity, productivity and letting the computers do the work, in a few years, its usage has spread quickly. As a bonus, many find it easy to learn.
  • Job availabilities : 210 and 54, respectively

  • 8. Java
  • What it is: An object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s.
  • Why you should learn it: Hailed by many developers as a "beautiful" language, it is central to the non-.Net programming experience. "Learning Java is critical if you are non-Microsoft," said Duquaine.
  • Job availabilities: 14,408

  • 9. Python
  • What it is: An interpreted, dynamically object-oriented, open-source programming language that utilizes automatic memory management.
  • Why you should learn it: Designed to be a highly readable, minimalist language, many say it has a sense of humor (spam and eggs, rather than foo and bar), Python is used extensively by Google as well as in academia because of its syntactic simplicity.
  • Job availabilities: 811

  • 10. VB.Net (Visual Basic .Net)
  • What it is: An object-oriented language implemented on Microsofts .Net framework.
  • Why you should learn it: Most argue that VB.Net is currently more popular than ever and one of the only "must-learns." "It is currently dominating in adoption and that is where all the work is," said Huckaby.
  • Job availabilities: 2,090

  • Source: 
    http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/