Archive for February, 2012

HTML 5 intellisense and validation schema for Visual Studio 2008

You all probably know that new HTML 5 standard is coming. We made a new intellisense schema that you can add to VS 2008 or VWD Express 2008 and get intellisense and validation on HTML 5 elements. Note that schema is for markup only, we do not have DOM2 update for jscript intellisense yet.

How to install the schema:

  1. Download attached ZIP file.
  2. Place html_5.xsd in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html
  3. Run either x86 or x64 reg file depending on the OS and VS/VWD flavors installed. For example, for VWD Express installed on 64-bit OS run HTML-5-Schema-Reg-x64-VWD.reg and for VS 2008 installed on 32-bit OS run HTML-5-Schema-Reg-x86.reg.
  4. Restart VS
  5. You can select HTML 5 in the schema dropdown and HTML 5 element attributes should appear in the Properties window.

On 32-bit OS path is C:\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\schemas\html. VWD shares folder with Visual Studio.

Schema is experimental and has certain limitations. For example, VS 2008 and VWD are not able to validate ‘wildcard’ attribute names, like HTML 5 data-* attributes and is not able to handle ‘transparent’ content model when element content is defined by the element parent (see, for example, A element). However, it may help you to start playing with the new standard.


Download HTML5 Files

Calling Java Classes Directly from .NET

Calling Java Classes Directly from .NET

As the frequency of .NET and Java applications increases, we’re headed for an interoperability imperative—we have to get both sides to work together. One way to do that is by adding an interoperability layer that gives .NET direct access to Java classes.

t’s a fact that most production environments now use a mixture of both Java and .NET, despite all the partisan disputes over which side should “win.” To be prudently responsible in the face of this business reality, it is imperative that developers get both sides to work together. Interoperability is no longer an option: fortunately, you do have some options for choosing the best path for achieving interoperability for your project.

Your specific interoperability needs may vary, based on your current systems and project specifications. Perhaps you already have some perfectly good “legacy” Java code that you don’t need to change, but want to extend with new .NET components. Or, you’re creating a new system, and want to assign tasks to the better-suited platform, so you’re using J2EE’s Enterprise Java Beans (EJBs) for the scalable back-end system, and .NET Windows Forms to create a rich desktop GUI. In either case, you may need direct access to Java classes from .NET. This article briefly discusses the major interoperability methods available and highlights some issues to consider as you make your interoperability selection, and demonstrate class-level interop with a specific example.

Click here to see or hide the author’s description of other interoperability methods.

In addition, Web services use a SOAP-based communications mechanism that’s inherently slower than alternative binary communications mechanisms. Web services are also not well-suited for passing custom objects between Java and .NET as parameters and return values.

Visual J#

.NET supports development of systems using multiple languages concurrently. One way to support Java/.NET interoperability is to translate the Java code directly into .NET’s MSIL (Microsoft Intermediate Language) rather than into Java bytecodes. Although Microsoft can’t call its J# language Java, J# really is a way to compile Java code for .NET. Unfortunately, J# a significant limitation: it’s legally limited to the Java supported by JDK 1.1.4 plus JDK1.2’s collection classes. Using J# works only when these limitations don’t matter to you, and when you have access to the original Java source. However, when the Java code you need uses more advanced features, including just about any J2EE feature such as EJBs or servlets, or when you don’t have the source, J# isn’t a good choice.

Java Native Interface (JNI)

Java code can access, and be accessed by, non-Java code via the Java Native Interface (JNI). JNI is mainly suited for accessing Java code running in a standalone JVM on the same machine as your .NET code, and can be difficult to use. If you’re communicating with Java code on a different machine, or running in a J2EE application server, you may have problems. There are some third-party products that may help: JuggerNET, from CodeMesh ) is one example.


It may be possible to convert the compiled Java bytecodes to .NET MSIL so that you can link it directly into your .NET program. Microsoft’s J# distribution includes a tool called jbimp.exe that converts Java bytecodes to MSIL at compile time. Of course, jbimp.exe has many of the same limitations as J# in that it can convert only bytecodes from JDK 1.1.4 and earlier (plus JDK 1.2 collections. Unlike J#, however, jbimp.exe works without source code. IKVM.NET is an intriguing open-source project that translates Java bytecodes to MSIL as needed at runtime. In theory, IKVM.NET should allow any Java code to run on the .NET platform. However, the project is at a very early stage and far from complete, but certainly worth following for the future.
Runtime Bridges

Perhaps the most natural interoperability method is to run the Java code in a JVM, the .NET code in a CLR, and use a runtime bridge to manage the communications between them. In this scenario, the .NET code calls .NET classes and objects that act as proxies for the Java classes and objects. The proxies manage the communication; the calling .NET classes aren’t even aware that they’re ultimately calling Java classes. A runtime bridge provides interoperability for a wide variety of architectures, because the Java code and the .NET code can be on different machines, the Java code can run in a standalone JVM or in a J2EE application server, and the solution provides interoperability for any JDK version. As with bytecode translation solutions, you need only the Java bytecodes, not the source.

There are several runtime bridges commercially available. The code for this article uses JNBridgePro from JNBridge. See the related resources section of this article for other bridge products.

In the remainder of this article, you’ll see how to use JNBridgePro to solve a real-world interoperability problem.

Build a Logging Example

Most software systems of any size or complexity contain a logging facility. Good logging packages exist for both Java (log4J) and .NET (log4N, which is the .NET equivalent of log4J). However, if a system contains both .NET and Java components, each side would be logged into its own logging package, which would generate two log files and make it difficult to collate or correlate the events logged. If you could instead use a single logging package to log to a single log file, you could easily see the sequence in which .NET-originated and Java-originated events took place. A single logging package also simplifies handling timing and file access conflicts among the multiple processes and threads attempting to log events.

You could choose either a .NET-based or Java-based logging package as the single logging package to be used from both .NET and Java. This example uses the Java-based package log4J to do the logging, but accesses the log from both sides, to demonstrate how transparently .NET can use existing Java classes.

The goal is to create a simple application containing both Java and .NET classes, where both the Java and .NET classes use the Java-based log4J logging package. The application has a .NET-based Windows Forms GUI, which calls the Java classes that perform the logging operations.

In the remainder of this article, you’ll walk through the process of setting up the interoperability project, creating the proxies, and building and running the project.


To complete the project, you’ll need Microsoft Visual Studio .NET 2003 and the .NET Framework 1.1 installed on your machine. You can get the project to build using the .NET Framework SDK or Visual Studio .NET 2002, and .NET Framework 1.0, but you will need to make some modifications outside the scope of this article. The JNBridgePro documentation contains some suggestions on how you can proceed with older versions of .NET.

On the Java side, you must have a Java Development Kit (JDK) installed on your machine. You may use any JDK of version 1.2.2 or later. You can download a free JDK from Sun’s Java site.

Setting up

To set up the project, download the zip file containing the project code and unpack it. The zip file contains two sub-folders, Project and Completed. The Project folder contains all the code needed to create the project. The Completed folder contains the completed, ready-to-run, project, in case you don’t want to create the project yourself.

The Project folder contains dotNet and Java folders containing the .NET and Java portions of the project code, respectively. The Java folder contains a single Java class named JavaClass, which exposes a recordEvent() method that logs a supplied message to a specific logging category, as shown below:
package devX.logging; import org.apache.log4j.*; public class JavaClass { private static Category cat = Category.getInstance(“JavaClass”); public void recordEvent(String message) { cat.debug(message); } }

Although you’ll find the source file in the accompanying code, JavaClass is already compiled, so you need do nothing else to it.

In addition to Java code, the Project folder contains two .NET C# source code files. Form1.cs defines a Windows application that calls both .NET and Java objects, each of which logs events through the log4j Java-based logging package. The DotNetClass.cs file defines a .NET class similar to the JavaClass mentioned above. The DotNetClass also contains a recordEvent() method that logs a supplied message to a specific logging category:

 using System; using org.apache.log4j; namespace LogDemo { /// <summary> /// Sample .NET class that calls log4j. /// </summary> public class DotNetClass { private static Category cat = Category.getInstance("DotNetClass"); public DotNetClass() { } public void recordEvent(String message) { cat.debug(new java.lang.JavaString(message)) } } } 

Category is a .NET class that acts as a proxy for the corresponding Java Category class in the log4j package. .NET code accesses Java classes and objects by interacting with the corresponding proxy object. You’ll see more about proxies and how they’re generated and used in the remainder of this article.

The Completed folder contains everything in the Project folder plus additional files that allow the project to run without additional changes.

In addition to the project code, download the logging package log4j and unpack it in a location of your choice.

Finally, you’ll need JNBridgePro from the JNBridge Web site. For the purposes of this project, you may download either the EE or SE version. JNBridge provides 15 days of free use from the time that you install JNBridgePro; which should be sufficient to complete this project.

Install JNBridgePro by double-clicking on the downloaded installation file and following the instructions. Make sure that JNBridgePro is set up correctly by launching the JNBProxy proxy generation tool (through the Start menu or by double-clicking on the desktop icon). The first time you do this, you’ll see a dialog box that allows you to specify the Java configuration (see Figure 1). Make sure to check the “Start Java automatically” checkbox and specify a valid path is specified in the “Locate the java.exe file …” text box. After doing so, click the OK button. You can close JNBProxy at this point, or you can leave it open and proceed to the next step.

Figure 1. Specifying Java’s location: Use this dialog, displayed by the JNBProxy proxy generation tool, to specify that you want to start the Java side automatically and to specify the location of the java.exe file you want to use.

Generating Proxies
.NET classes communicate with Java classes through proxy classes. JNBridgePro generates a .NET proxy class for each Java class that you want to access from .NET. The .NET code then interacts with the proxy class, which manages the communication with the corresponding Java class. When you need an instance of a Java class, the .NET code automatically and transparently creates an instance of both the proxy and the corresponding Java object. To call a method on that Java object, you simply call the corresponding method on the proxy object. Similarly, to call a static method, you call the corresponding method on the proxy class, and to access a field in the Java object or class, you access the corresponding field on the proxy object or class.

The JNBProxy proxy generation tool creates these proxies and collects them in a .NET assembly, which appears as a DLL file that is linked into the .NET project.

To create the proxy assembly, launch the JNBProxy proxy generation tool (if it hasn’t already been launched in the previous section). Specify the locations of the Java class and jar files containing the classes for which proxies will be generated by selecting the Project, Edit Classpath… menu item, and then navigating to the Project\Java folder, which contains the devX.logging.JavaClass class file, and the file log4j-1.2.8.jar from the unpacked log4j zip file. Click on the OK button when you’re done.

Next, load the classes for which you wish to generate proxies into the proxy generation tool. First, select the Project, Add Classes from Classpath… menu item, and then type in the class name “devX.logging.JavaClass.” Make sure to check the “Include supporting classes” checkbox. Checking that option causes JNBProxy to generate proxies for all the classes that you might possibly need when accessing JavaClass. Click on the Add button, then on the OK button. JNBProxy will load approximately 200 classes. Repeat the process to load the logging classes in the log4j-1.2.8.jar file. JNBProxy will load a second set of classes.

You’ll want to generate proxies for all the classes you’ve loaded, so select the Edit, Check All in Environment menu item. Finally, select the Project, Build… menu item, navigate to the Project\DotNet folder, and enter the file name loggingProxies to generate a file named loggingProxies.dll containing the proxy classes. Figure 2 shows how the JNBProxy window looks after building the proxies. Note that you may get a warning message that some possibly required classes are missing. You can ignore this message, because these classes are necessary only if you want to log to other destinations, such as a JMS publisher—and you won’t be doing that in this project.

Figure 2. Generating Proxies: Here’s how the JNBProxy window looks after generating the proxy assembly.

Setting Up the .NET Program
Double-click on the Project\DotNet\LogDemo.sln file to open the .NET project. Before building the project, add the proxies to the project by adding a reference to the assembly loggingProxies.dll that you created in the preceding section. You also need a reference to the assembly jnbshare.dll that you’ll find in the JNBridgePro installation folder. Jnbshare.dll contains the core JNBridgePro functionality used to manage communications with the Java classes. After adding the references, you should be able to build the project without errors.

Figure 3. Starting the Binary Server: Here’s an example of the command line to start the Java side. Note that your paths may differ from the ones shown here.

To finish setting up the .NET program, copy the file jnbproxy.config from Project\DotNet into your build folder, which will either be bin\release or bin\debug, depending on your Visual Studio project build settings. jnbproxy.config contains configuration information that tells the .NET side where the Java code is located and which protocol will be used to communicate with it. In this case, jnbproxy.config specifies that the Java code is located on the same machine as the .NET code, that it will listen on port 8085, and will communicate with the binary protocol.

Running the Program

If you examine Form1.cs, you’ll see that it uses the BasicConfigurator class, which for demonstration purposes causes logged messages to appear in the Java console window. Note that it’s quite possible to log to files, JMS publishers, or other endpoints.

Before starting the .NET program, you’ll need to start the JVM containing the Java classes, so they’ll be able to receive the requests from the .NET side. Do this by opening a command-line window and typing in the following command line:

 java --cp <path to Project\Java>;<path to jnbcore.jar in JNBridgePro installation folder>;<path to log4j- 1.2.8.jar> com.jnbridge.jnbcore.JNBMain /props <path to in JNBridgePro installation folder> 

To be safe, surround each of the paths in the preceding command line with quotes, because they may contain spaces. The jnbcore.jar file contains the core JNBridgePro functionality that allows Java classes to communicate with the .NET side. The file contains configuration information that tells Java which communications protocol to use and which port to listen on for requests. The sample project uses the binary protocol and listens on port 8085. Figure 3 shows what you will see if all goes well.

Figure 4. The Logging Application: The figure shows the .NET front-end application that lets you log messages from either .NET or Java.

Next, start the .NET program from Visual Studio .NET, or simply by double-clicking on LogDemo.exe. Figure 4 shows the running application.

Clicking on the “Log .NET event” button causes the DotNetClass to log an event from .NET. Click on the “Log Java event” button to cause JavaClass to log an event from Java. You can either supply a custom message to log or just use the supplied defaults. In each case, the Java-based log4j package performs the logging operation, and displays the logged messages in the console window, as shown in Figure 5.

In this project you’ve seen how to log messages from both .NET and Java code into a common logging package—in this case running on the Java platform. Using a common logging package consolidates .NET-originated and Java-originated logging messages in the same console window or file, and lets you easily see the sequence of from both the .NET and Java sides.

Figure 5. Logged Messages in the Console: Here’s how the logged messages appear in the console window.

More generally, you’ve seen how call to Java classes directly from .NET by using a runtime bridge. In the sample application, .NET code calls Java classes in the log4j package, and also calls the Java class JavaClass. You can easily extend this technique of directly accessing Java classes from .NET to other Java class libraries, and you can also use it to let .NET classes access EJBs, JMS queues, or other Java and J2EE capabilities. Using a runtime bridge is simple, transparent, and extensible, because your .NET code accesses the Java code through proxies, and has no idea that it’s talking to Java classes.

Dotnet and Java

Java And Dot Net
This page I’m starting out of a real-world need, and this need is behind the name I chose, JavaAndDotNet, rather than JavaVsDotNet?. I’m actually a little surprised that no such page is already on wiki. Yes, there are bits and pieces. But I’ve had to do a lot of research in order to pull together the pieces. My need: to understand the features each platform provides– No, not features. I need to grasp the gestalt of each. I do not need to know which is better, nor do I care. Rather, I need to talk intelligently to my coworkers about how each approach applies to the design problems we face. Therefore, I’m interested in exploring both. –TimKing (DeleteWhenCooked)

JavaAndDotNetPhilosophies – Millieu

Java’s tagline has always been “Write once; run anywhere.” If .NET had a similar tagline, it might be “Write in any language; run on Windows.” Each adopts a different approach which permeates each community.

Java standards, for example, are specified and documented to be used in a variety of contexts and combinations. You can rearrange them ad hoc to devise almost any situation you desire. In contrast, .NET standards are designed for a given context and work well in that context.

Take JavaServlets, on the web tier. You can write them as pure Java classes. Or you can use JSP. You can use Struts or JSF or JSTL on top of JSP. Or you can shove JSP in favor of something like Tapestry. Or you can use these in combination in seemingly limitless ways. The resulting web application you can run on an embedded server like JettyServer. Or you can deploy it on a more elaborate server like ApacheTomcat (which could also be embedded) hosted under the built-in HTTP server Coyote, or under InternetInformationServer or ApacheHttpd (any of which Jetty could also do). Or you can go with a more integrated enterprise solution like JbossServer or IBM’s WebSphere or BEA’s WebLogic. Each possibility has its own strengths and weaknesses. It’s a stunning, confusing, and sometimes even frustrating array of alternatives and possibilities. And this is just looking at a single Java standard.

On the other hand, .NET WebServices use AspDotNet hosted under InternetInformationServer. Period. That’s it. No choices. No options. And nothing for you to screw up.

I think there are “not endorsed” way to do things via DotnetRemoting?, or even use a third party MiddleWare to achieve the same, however what you said is the MicrosoftWay.

This phenomenon manifests the difference between JavaAndDotNetPhilosophies. Neither is innately superior. The Java approach provides more choices and flexibility. The .NET approach provides more certainty and order.

(I used to think everyone preferred the former. As I’ve grown wiser, I’ve learned I was wrong. For an excellent example preferring the latter, see PageAnchor: generalization near the bottom of CsharpVsJava.)

There’s another important manifestation of this difference: How do you learn about each? With Java, you can go to the book store, where there are shelves of books from which to choose. But most Java technologies have good documentation available on-line. Some of Sun’s own Java books are even available for free download, but we still tend to buy paper copies of many of them. While Java books are very important to the Java developer, they fill a different role. We buy Java books after we’ve decided what we want to read. But they are not necessarily the first-chance documentation that .NET books are. In order to get started with .NET, you pretty much need to buy a book. You may need to buy that book even to understand exactly what .NET is and how to use it.

I’m going to disagree on that point. I got started in .NET by downloading VisualStudioExpress and using the tutorials provided with it. The MSDN documentation is usually very good (there are some notable weak spots) and is available online and as an additional 3.2GB install with VS. I needed a book to get started with Java web development because of the Java toolset’s looser coupling – while it gives you far more flexibility, it’s far harder to find a simple answer. It took me several days of shenanigans and broken Eclipse plugins to get an IDE working remotely close to Visual Studio in terms of web development. But I fully agree that if you don’t want to do it the Microsoft way, your choices become rapidly limited, as opposed to Java. — LiamClarke?


(July 2005) Java is 10 years old. .NET is less than half that. When Java was only 5, it was a pain to work with. .NET is not quite the pain Java was at its age. However, .NET is still younger, and it shows.

Third-party support for .NET is weaker than for Java. In general, for any given design problem, many more Java solutions are available than .NET solutions. This is partially due to the Java approach (see Millieu on this page), but it’s also arguably due to the fact that .NET has had much less time to build a community.


Though there are multiple sources implementing DotNet (MonoProject, DotGnu), the benchmark is MicrosoftDotNet. Other implementations are only partially compatible, and are likely to remain such, as the .NET core libraries are based on proprietary standards. (See DotNetForLinux.)

The core Java technologies, while their reference implementations are Sun’s, are based on open standards and have certified, working alternatives, including open source ones. There are multiple working implementations of both the standard runtime and J2EE (JbossServer, JonasServer?, WebLogic, WebSphere).


DotNet works with a number of programming languages (CsharpDotNet, ManagedCeePlusPlus, VisualBasicDotNet, VisualJaySharpDotNet). Note that porting standard CeePlusPlus or legacy VisualBasic to .NET can be harrowing. To do so, you must traverse a maze of exceptions, sacrifices, and compromizes designed to make these languages compatible with the CommonLanguageInfrastructure.

Some say CsharpLanguage is the “consensus” language for DotNet. Whether or not this is true, it is closest in style and features to JavaLanguage. In fact, C# and Java tend to leap-frog, pulling features from each other for each successive release. See CsharpVsJava.

Compilers do exist to turn languages other than JavaLanguage into JavaByteCode. But JavaLanguage is still the standard. If you want to design any heavy-duty software for the JavaVirtualMachine, you use JavaLanguage. Others are companion languages. (See for example JavaPython.)

Tiers and Technologies

InternetInformationServer hosts all WebServices in .NET. To design them, you can use AspDotNet (with MicrosoftWebForms), or you can use DotNetRemoting. The former is typically used on the web tier and the latter on the business tier. AdoDotNet can then be used to persist business data to any database that has a .NET DataProvider? or ODBC support. For example, you can use MySql using either of these: see Or you can use third-party tools to support ObjectRelationalMapping, or you can write your own database-access code.

In the Java world, WebServices can be hosted under almost any web server. On the web tier, JavaServlets run inside of a ServletContainer, frequently using JavaServerPages. On the business tier, EnterpriseJavaBeans (“EJBs”) run inside of an EjbContainer. EntityBeans (a type of EJB) can be used as a bridge to the database. ObjectRelationalMapping and JavaDatabaseConnectivity is also available. The companion and third-party technologies available to augment this simple scheme are too numerous to mention. Suffice it to say that none of these elements are set in stone.

Development Environment

Most Java developers use EclipseIde, NetBeans, or IntellijIdea. Most .NET developers use VisualStudioDotNet.

Java tends to support the latest development processes first. VisualStudioDotNet 2005 will add features, like source-code generation and automated refactoring, that have been available in the Java IDEs for years. JavaUnit is the benchmark for automated unit testing. Now, features like continuous testing (as continuous compilation before it) are being developed using Java.

How do tools used to design user-interfaces differ between the platforms?

Source Code

Sun publishes the source code for the core Java libraries. This can be valuable if the documentation is inadequate or if you need to figure out a bug in a library. I’ve saved countless hours debugging because I could step into the Java source.

For some projects, this may also pose a legal risk, requiring an explicit policy. For example, if you contribute to the Apache Harmony project, you may not contribute in any area in which you’ve “been exposed to” Sun’s source code, so that you don’t inadvertently violate someone else’s IP.

Java technologies also tend to have good open-source support. This is a side effect of the maturity and multi-implementation (“run anywhere”) approach.

Microsoft now makes the source code of the core libraries available for usage under their MicrosoftReferenceLicense?, and VisualStudio can be configured to retrieve it from Microsoft’s symbol servers as needed – but viewing the code carries the same risk for project contributors (most notably the MonoProject) as viewing Sun’s code.

BusinessValue aspects

DotNet is more “agile” (put it mildly).(say what?) Its characteristic lead some to wonder whether applications are developed to prove the concept (of DotNet), rather than to achieve a return for the business owner, who happen to require a SupplyChainManagement solution that rely on a particular WirelessDeviceEnterpriseComputing? implementation.

With JavaPlatform, the move is more “orderly” (put it mildly).(what?)Business owners are already redirected to the NextBigThing when an affordable Java solution comes out of the CommunityProcess?.

At this moment, owners of LegacySystems are wary of conversion to either platform, and BigBlue with its MiddleWare dominance is not complaining.

— PlainEnglishPlease

Client-side tool for ProgrammingOnHandHelds with MicrosoftWay constraints

Functionalities (including performance) that can be delivered using DotNetCompactFramework on WindowsMobile is very limited. Is there a better alternative using JavaMicroEdition, given the constraints where we are required to use WindowsMobile and DotNet servers? Or maybe someone have favorable experience on a toolset that is noncompliant with architecture of the above two StandardsStampingCompanies? (MS and Sun), yet can deliver superior results to staple solutions offered by the major software providers.

An acceptable tool will need hooks to client UI software such as a PocketWebBrowser, and can interface with addon package security solutions(e.g. kiosk mode “may be needed” in some usage scenarios). A reliable mechanism for persisting information “may be needed”, if WindowsMobile facilities cannot be used.

Poll : Which one is the Denno Secqtinstien Foundation Startup

Documentation : How To Host a Website #2

Website hosting is what’s needed once you’ve built your site. Free web space is provided by many Internet Service Providers, but you’ll be better off with professional services.
Get Your Own Domain

Website hosting is now inexpensive, less than a dollar/month if you share a multiple domain hosting package among friends. Don’t use the free hosting provided by your ISP. It looks cheap and unprofessional. Traffic will be poor as the natural search engines won’t rank you well. And you’ll have difficulty in covering costs by placing Google AdSense ads on the site, by selling e-books of your poetry and/or by charging for access to pay-to-view sections.
Website Hosting: Steps

Website hosting begins with purchasing your own URL (uniform resource locator), and to do that you visit an online company offering domains for sale. Current charges are around $17 for two years.

Next you have to upload the site to a web-hosting company that will display it on the Internet, 24 hours a day, seven days a week. Thousands of such web-hosting companies exist, and there are now web-hosting directories that enable you to select by cost, platform type, facilities, etc. — all of which are explained by on-site notes.

You make your choice of hosting company, click through to their site, pay their hosting fee, and can then upload your site to that company’s server. The hosting company will provide instructions. It’s very simple, but you’ll need a cheap or free piece of software called an ftp program. This you can obtain from any software supplier, and use it to maintain your site thereafter. Once uploaded, your site goes ‘live’. You’re on the Internet.
Making the Site Pay

You may simply want to display your work, perhaps providing an email link so that visitors can send you feedback. Or you may want to produce an anthology of work by your poetry group, changing content every month so that visitors regularly come back for more. No money changes hands, but you have absolute control over what appears. The better hosting companies also throw in chat-rooms and bulletin boards for free, though you’ll need a little programming skill to install them.

But if you want your site to pay its way, there are three things you can do.

One is to place Google AdSense adverts on the site. Just visit Google to see how. The conditions are not onerous, but you must have 20+ site pages and some 50-100 visitors/day.

Second is to sell collections of your poetry on the site, either in conventional book or electronic form. Payment is easiest arranged through PayPal or one of the many PSPs (Payment Service Providers). Either do an Internet search to locate these providers, or consider Ecommerce Digest’s Guide, which goes into this in some detail.

Third is to charge for content. You can either create a member’s only area (password-protected directory) and take payment as before, or find an PSP that will do the whole job for you at an 15-20% commission. Again Ecommerce Digest’s Guide provides the details.

Internet users are still loathe to pay for content, but $10 a year is cheaper than the average poetry magazine subscription when postage is included, and opinions are changing. US subscribers in fact paid $853 million for online content in the first half of 2004, and spent more time viewing that content than dealing with emails and instant messaging.

Website hosting is not difficult or expensive, and a popular site can earn sufficient to cover operating costs, and more.

Documentation : How To Host a Website #1

How To Host a Website

Learning how to host a website, can seem a daunting task at first, but if you take the right approach it is actually a simple process.
Choose How To Host a Website- 4 Ways To Approach It

1) BEST OPTION FOR MOST*- Use An Online Web Hosting Service and Host Your Own Website- For people who want to host one or more simple websites, there is no better option than to just simply purchase a cheap plan online. We’ll discuss this method in detail.

2) Host it Yourself from Your Home- This is a highly technical process that involves a lot of inherent and learned knowledge about web hosting. We aren’t talking about how to create a server on this web page, but rather how to host your website online using the expertise of professionals.

3) Have Someone Else Host Your Website For You- You could allow a local company in your area to take care of the hosting. This is usually for a drastically inflated price and comes with frustration. Why? Because people who use them don’t take the few minutes to figure out there is often a much better solution (Not you of course! You are here!). It creates a situation where one’s online presence is completely controlled by another person or company, at a price, on their schedule.

4) Free Web Hosting- This sounds like an attractive offer for some at first, but if you want to create a professional website, then it is out of the question. Free hosting is free in exchange for a company placing free advertising on your website…ugly intrusive advertising in the form of flashing ads and pop-ups.

Basically in order for you to host your website, you’ll need somewhere to put the site. This space to put your site on the internet is found on a “server”. So in order to get your site on the web, you need to put it on the server. People buy these servers and rent space out for a fee. This is the fee you will be paying when you get a simple hosting plan from a hosting service.

If you are wondering how to host a website on your home computer, then that is a much more complicated procedure and is not recommended unless you know what you are doing. There are many security issues that one needs to take into account.
How To Host A Website The Simple Way- Host Your Own Website With A Web Hosting Service Online

There are many reputable hosting companies online that will offer the service of hosting a website. But a really good hosting company will offer so much more actually- Things you won’t have thought of at the beginning of your search. Let’s take a look at some of the most beneficial features one needs to look for in a good hosting plan.
What Comes With the Best Hosting Plans?

1) Multiple Domain Hosting- You can host as many domains as you want for no extra charge.

2) Unlimited Memory- You can put as much information (use as much memory as you want) on your sites for no extra charge. This used to cost a lot more money if you wanted to host a lot of information, such as movies, music and pictures. Not anymore!

3) Unlimited Bandwidth- You can have as many visitors (bandwidth usage) as you could possibly want and there is no crashing of your site, or extra usage charges.

4) Statistics Tracking- You can track your visitors with statistics provided by the hosting company. You’ll be able to see who visited, when, from where, and how long they stayed, among other things. This comes standard with most top hosting services.

5) Unlimited Email Accounts- A good hosting plan will make it extremely simple to set up and manage new mail boxes.

6) Website Creation Tools- A good company will give you numerous tools to help you create a basic website.

7) Easy WordPress Installation- If you don’t know what WordPress is, it is a powerful free blogging software that allows you to create search engine optimized blogs or websites with push button ease. The website you are looking at right now was created in WordPress, and countless professionals use it world-wide. You can read more about this on our tutorial page about how to create a website.

8) Control Panel- All quality hosting companies will make it easy for you to navigate and control your hosting through a “Control Panel”. One of the most popular type of control panels is called a “CPanel”. Other companies, such as, use a proprietary design that is no less helpful by any means.

…and more.
How To Host A Website With No Prior Knowledge Or Skill

The beauty is, you really don’t have to learn anything except that it’s possible to take hosting into your own hands and host your own website. If you pick the right hosting company, then you’ll only need to buy the plan and watch some simple step-by-step videos to get you through any technical steps.

Good 24/7 customer service will help you with anything you need also. The first time I bought hosting from, I was on the phone with them for quite a while as they helped me get started from scratch. I’ve had a site that was having problems at 10pm and the person at customer service walked me through exactly how to fix it. It wasn’t even their fault, but they still helped me. It’s like you have a “hosting person” on call 24/7.

So you can see it’s actually very simple to learn how to host a website if you just approach it from the right perspective. You don’t want to outsource the process so much that it costs an arm and a leg, and valuable time, every time you want to make a change. Then there is the other extreme of hosting the website at home on your own computer, which is very difficult and can be dangerous security wise. Why not take the third approach and purchase a simple hosting plan that gives you all the power with none of the cost or hassle?

Tags: hosting, how to host a web site, how to host a website, how to host your own web site, how to host your own website, web hosting, website.

Filed under Host Your Own Website, How to Host a Website by admin on Dec 16th, 2009. #
Top Web Host Companies For 2012

Learning how to host a website becomes a simple process when you use a really good hosting company. The best web host companies will give you step by step videos, excellent customer service where they DO things for you (not just tell you what you need to do) and much more. Here’s our top picks for web host companies for 2012.

You want a great set of hosting “employees” on your side, as if you have your very own “hosting person” at your beck and call whenever you want.
Our Top 3 picks for Top Web Host Companies 2012.

These companies represent the absolute most user-friendly companies that give you every thing you need to learn how to host a website, host the website effectively, and create your own websites at will. You can visit each website by clicking the small flashing banner or click on the blue coupon links at the bottom of each review.
#1 Fat Cow (5/5)
FatCow $4.67/mo.Plan

Unlimited Bandwidth- No worries about how many visitors are rushing to your site, it won’t crash.

Unlimited Domains- Host as many domains as you like.

Excellent Tutorial Videos- Watch detailed videos how to set up emails (unlimited), WordPress blogs/sites, pointing domains, using free FTP software, analyzing visitor statistics, SSL, etc…

Site Analytics- Fat Cow gives multiple tools to help you maximize the effectiveness of your website.

Website Builder- This is a great tool to help you build your website from scratch.

NEW Integrated Webmaster Tools- This means your site will get indexed faster and recognized by the search engines.

Conclusion- Fat Cow is a great and reliable hosting company. It’s refreshing to see their uncomplicated pricing structure. At $3.67 a month the pricing is extremely competitive. We personally would have liked to see them use cPanel for their control panel. However, Fat Cow has designed it’s own control panel that offers everything the cPanel offers, complete with site analytics, WordPress, Joomla, etc… Fat Cow is atop the ranks of most reliable web hosting companies. You can feel safe knowing you’re using the best hosting a small amount of money can buy with Fat Cow.
A Special 40% OFF “moo”pon — Just for you!

#2 Host Gator (4.8/5)

Host Gator is another very popular web hosting company with reliable server up-times and excellent customer service. What sets Host Gator apart is the ability to sign up for “Re-Seller” accounts. This allows you to create your own hosting company and sell hosting to others. Host Gator also offers cheap “Dedicated Hosting” accounts. Dedicated hosting may be good for larger companies who want more speed and security with their servers. And of course they offer “Shared” hosting for those who just want to set up hosting for their website or websites. Overall, Host Gator offers great solutions for the small guy to the massive company.


Unlimited Bandwidth- No worries about how many visitors are rushing to your site, it won’t crash.

Unlimited Domains- Host as many domains as you like.

Cheap Reseller Accounts- Sell your own hosting and create a nice passive income.
Excellent Tutorial Videos- Watch detailed videos how to set up emails (unlimited), WordPress blogs/sites, pointing domains, using free FTP software, analyzing visitor statistics, SSL, etc…

cPanel- Host Gator uses the #1 control panel, “cPanel”. This allows for easy navigation and manipulation of your hosting account, script installations, stats tracking, email management, etc…
Dedicated Server Solutions- Need extra security and more speed for your business? Host Gator offers solutions for everyone.

Conclusion- Host Gator offers numerous solutions for every level of hosting. Host Gator uses the latest version of cPanel, complete with aw-stats so you can check your sites analytics, WordPress hosting, e-commerce site hosting and virtually any other cutting edge feature you could ask for. The majority of users on the web rate Host Gator’s customer service responsive and courteous. Overall, Host Gator is an excellent choice for easy web hosting, no matter what your needs.

#3 Host Monster (4.75/5)

“Host Monster” is a well trusted hosting company that does exactly what they promise. They deliver excellent reliable hosting with courteous and extremely responsive customer service. That’s why they have earned one of the top spots with users across the internet world-wide.

Host Unlimited Domains on 1 Account


Unlimited Bandwidth- You don’t have to worry about how many visitors are rushing to your site, it won’t crash.

Unlimited Domains- Host as many domains as you like.

Excellent Tutorial Videos- Watch detailed videos how to set up emails (unlimited), WordPress blogs/sites, pointing domains, using free FTP software, analyzing visitor statistics, SSL, etc…

cPanel- Host Monster uses the #1 control panel, “cPanel”. This allows for easy navigation and manipulation of your hosting account, script installations, stats tracking, email management, etc…

Conclusion- ‘Host Monster’ is rated the Top Web Host Company because of it’s great customer service and super low pricing. There are no stupid questions asked when dealing with Host Monster’s patient and extremely competent customer service team, which is available 24/7. Host Monster’s basic monthly plan can be as cheap as $6.95 per month at times.

Click Here For the Host Monster Special! Free Domain, Free Setup, Host Unlimited Domains $6.95
Just Host- Best Deal Award*

At $3.45 a month Just Host gets our Best Deal Award. That’s extremely cheap for hosting companies. What’s the catch? Nothing. Just Host offers the same features as the other top web host companies above, with…

Professional Hosting from Just Host


Unlimited Bandwidth- No worries about how many visitors are rushing to your site, it won’t crash.

Unlimited Domains- Host as many domains as you like.

Excellent Tutorial Videos- Watch detailed videos how to set up emails (unlimited), WordPress blogs/sites, pointing domains, using free FTP software, analyzing visitor statistics, SSL, etc…

cPanel- Host Monster uses the #1 control panel, “cPanel”. This allows for easy navigation and manipulation of your hosting account, script installations, stats tracking, email management, etc…

So you can see the features and benefits of Just Host are very similar to Host Monster. The 2 days we tested our hosting account with Just Host, however, revealed a rather sluggish control panel. It just took more time! We switched back and forth between Host Monster control panels, Host Gator’s, Fat Cow’s, and Just Host’s just seemed to be a lot slower.

Just Host gives you everything you need to create websites, host as many websites as you want, and much more. The price is unbeatable for a top quality hosting company. Fat Cow is recommended first, but if you are looking for the absolute best bargain, then go with Just Host.Click HERE To Visit Just Host’s Website Now.

There is our choices for top web host companies for 2012. No matter which you choose, you will get a quality hosting plan with a customer service oriented company backing that plan.

Tags: top hosting companies, top web host companies, top web host companies 2010, top web hosting companies.

Filed under How to Host a Website, top web hosting companies by admin on Dec 16th, 2009. #
Host Multiple Websites- How To Keep It Cheap and Easy

It doesn’t have to be complicated at all to host multiple websites. In fact, you can use a single account in many instances. Let’s go over exactly how you can host multiple websites for very cheap, with little hassle.

For people or companies who are just looking to make 1 to, say, 30 or 40 websites (those aspiring internet marketers out there!), a simple solution is to get a shared web hosting plan. This means you share space on servers with others. The hosting company puts your files where they have space at that time.

Most quality hosting plans will allow you to host as many websites as you wish on one cheap hosting plan. If you were to actually make 300 websites and put them all on your one shared hosting plan, then perhaps the hosting company would politely ask you to upgrade your account. But they are betting on you only making a few, and it’s a safe bet for them.
Add-On Domains and Hosting Multiple Websites

When you purchase a shared hosting plan, you designate a primary domain name. Often times people will have this domain name be their company name, but you can make it your first website you are going to build. It doesn’t matter either way.

When you move on to your second website, you will purchase a second domain name and “assign” it to your hosting account. You will assign it as an “add-on” domain. You can assign as many add-on domains to your primary account from then on. This allows you to host as many domains as you like on your one account. You can click to learn more about how to host a website.
Other Solutions For Hosting Multiple Websites- Reseller Plans

There are numerous other solutions for hosting multiple websites.

“What if I want to host websites that are owned by other people?”

If you were in a position where you wanted to offer hosting to other people for a fee, perhaps you are a web designer, you could use a Reseller plan. A “Reseller” plan allows you to take a chunk of bandwidth and memory and partition it out into separate accounts, and then sell it.

Sometimes people that own a lot of sites will use a Reseller account also. Perhaps they have a lot of sites and want to keep the sites in a more organized fashion. This is a good option for internet marketers as well to use a Reseller account.
Managing Control Panels With Multiple Websites and Accounts

If someone has a shared hosting plan with multiple websites, one can access each website through the one control panel, or CPanel.

With a Reseller account, there is a main Control Panel that the owner accesses, where he creates and allocates other accounts. He creates other CPanels for his/her clients, setting passwords, memory, and bandwidth parameters. It’s also easy to increase the memory and bandwidth as necessary if it’s proving too little.

It’s easy as ever to host multiple websites with the top hosting companies. It’s in each web hosting provider’s best interest to make it as simple as possible or else they’ll lose out to the next company! In this day and age, more and more people are creating more than one website.

How to Hidd/disable ‘View Source’ in browser

Question :
Is there any web-application in dotnet or in html5 which can hidd the source code in our web pages.

Answer :
There are a lot alternate solutions for this kind of query i have some

document.oncontextmenu=new Function("return false");


var isnn,isie
if(navigator.appName=='Microsoft Internet Explorer') //check the browser
{ isie=true }

{ isnn=true }

function key(k)
if(isie) {
if(event.keyCode==17 || event.keyCode==18 || event.keyCode==93) {
return false;

return false; }

if (document.layers) window.captureEvents(Event.KEYPRESS);
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);

these are two types of codes in javascript use them where you want in your code but these scripts should be in between head tags.

Debugging : Build Fails for VS 2008 whenever i am using Framework 2.0 Code

Questions :
I used a code from ‘instant results for ASP.NET 2.0’ from IMAR Spa…. of WROX and modified the code using VS 2005 and then build it was very good for me but recently got the attack of folder virus. So I was to remove my VS 2005 and Upgraded the system as well. Later on I installed VS 2008 and copied whole of the code in to a VS 2008 Project from VS 2005 code base and modified the code as per my needs and published as well. But as per the requirements Earlier this month on 1 OCT 2011, I upgraded My VS 2008 with SP1 build from Microsoft since then i am getting build failed error and also no able to trace any errors in it. To remove this i again removed whole of the windows Installation and get on with initial IDE but still I am getting the same error. Could you please tell me if the last publish on previous windows with SP1 had wrote in my Settings files or did any others changes in my code which is causing build failed with out any errors. because i have used the same code always to build. I cannot revert the changes as my code contains more then 1200 folders and more then 100000 files and is more then 300 MB in size. i have used Jquery, Javascript, files, files, Sitemaps, DB’s, etc in my website. Please could any one help me debugging and publishing my website.

Answer :
There are several possible results related to this issue and can be given here in as Follows find your Cause and resolve the bug.

You can look in the Output window. If that doesn’t provide enough detail,
you can change the level of detail with Tools->Options->Projects and
Solutions->Build and Run: MSBuild project build output verbosity.

Have you ever had Visual Studio tell you your web application publish failed, but never gives you a reason why? You’re not alone. I’ve been putting off looking into this issue on a project and just found a way to get my answer right away. Visual Studio 2008’s Publish Failed message.
Here’s what you should do inside of Visual Studio to find out why your publish failed.
1. Click the Tools menu > then Options to bring up the Options dialog.
2. Expand ‘Projects and Solutions’ on the left and click General
3. On General, click ‘Show Output window when build starts’
4. Now click on ‘Build and Run’ in the left tree
5. Next select a value from the ‘MSBuild project build output verbosity’ drop down menu
6. OK your way back to the main Visual Studio window
7. The next time you Build or Publish your project, you should see the Output panel pop up. If your publish is still failing, the answer will live inside the Output panel

Tools > Options > Projects and Solutions > General
Tools > Options > Projects and Solutions > Build and Run
Visual Studio’s Output Panel

You need to consult the Output window for more information.
View > Output

If we create a simple ASP.NET website and publish it using your VS 2008, does it have the same issue? If you are using Vista or Win 7, please try to run VS 2008 as Administrator. To troubleshoot the issue, you also can change “MSBuild project build output verbosity” option from (Tools menu, click Options, and then select the Projects and Solutions folder and click Build and Run) to
get detailed build steps.

MSBuild does a good job of reporting build errors, but MSBuild can only report errors
that the underlying Tasks report. Custom tasks add a lot of variation to quality of the
error messages. Case in point is the following message, which popped up as a deadline
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:05.85
The build failed, but there are no errors to report. Yup. It’s strange messages like this
that make me want to curse in German, but I don’t know German, so I make the noises an
angry Klingon might make after living in Berlin for 5 years.
I couldn’t find any problems in the output until I set MSBuild for maximum verbosity
(/verbosity:diagnostic, /v:diag for short), at which point I found this in the output:
Done building target “PrepareRdlFiles” in project “…”.
Target “RunRdlCompiler” in file “…”:
Building target “RunRdlCompiler” completely.
Output file “obj\Debug\RdlCompile.compiled” does not exist.
Using “RdlCompile” task from assembly “Microsoft.ReportViewer.Common …”.
Task “RdlCompile”
Done executing task “RdlCompile” — FAILED.
Done building target “RunRdlCompiler” in project “CareAlertsWeb.csproj” — FAILED.
Someone had added .rdlc files to the project. These are “Client Report Definition” files –
think of Reporting Services reports without a report server. Something was going wrong
compiling the .rdlc files, but there still wasn’t any information to determine what the
problem was. Without knowing what else to do I started looking at the RdlCompile task
with Reflector.
The RdlCompile task is interesting. The task doesn’t compile files in the traditional sense
(transform inputs into outputs). The task validates the report definition inside the .rdlc
file. This step ensures we’ll get compile time errors instead of runtime errors from the
ReportViewer control if the report definition is invalid.
The assembly hosting RdlCompile referenced another assembly that was not on the build
machine (Microsoft.ReportViewer.ProcessingObjectModel). Mysterious. Why this caused
the task to fail without reporting a more specific error is also a mystery.
With all the assemblies were in place, the RdlCompile task finished with success. Running
ReportViewer.exe installs all the required assemblies, you can find it in %Program
Files%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer.

If you select this option, the markup is left as-is, allowing you to change HTML and client-side functionality after precompiling the Web site. Selecting this option is equivalent to adding the -u option to the aspnet_compiler.exe command. For more information, see Precompiling for Deployment with Updatable UI and ASP.NET C ompilation Tool (Aspnet_compiler.exe).

a). If you want to be able to update individual pages by recompiling them, select Use fixed naming and single page assemblies. This option might degrade the performance of a very large site. For more information, see the following
Precompiling to Fixed-Name Assemblies
ASP.NET C ompilation Tool (Aspnet_compiler.exe).
How to: Generate Fixed Names with the ASP.NET C ompilation Tool
b). If you want to be able to debug in the published Web site, select Emit debug information.
c). To create strongly named assemblies using a key file or a key container, select the Enable strong
naming on precompiled assemblies check box, select the appropriate radio button, and enter the
appropriate information Key file location or Key container box.
Strong-named assemblies can be deployed to the server’s global assembly cache (GAC ) or to the Bin
directory of the application. A signed assembly makes it more difficult for malicious users to replace the
application’s assemblies with malicious code. However, the complexity of key management in shared
development environments might outweigh the advantages of signed assemblies. For information about
strong-naming on assemblies, see the following topics:
Precompiling to Signed Assemblies
ASP.NET C ompilation Tool (Aspnet_compiler.exe)
How to: Sign Assemblies for Precompiled Web Site Projects
d). If you select Enable strong naming on precompiled assemblies, and if you use a key file, and if
you want to delay the signing of the key file, select Delay signing.
If you select this option, the assembly is signed in two stages: first with the public key file, and then with
a private key file that is specified later during a call to the aspnet_compiler.exe command.
e). If you selected Enable strong naming on precompiled assemblies, and if you want to allow the
assemblies to be called by partially trusted code, select Mark assemblies with
AllowPartiallyTrustedCallerAttribute (APTCA).
Assemblies must have the AllowPartiallyTrustedC allersAttribute attribute to be called by the ASP.NET
runtime. For more information, see AllowPartiallyTrustedC allersAttribute.
f). C lick OK.
Publishing status is displayed in the taskbar. When publishing is completed, the status of Publish
succeeded is displayed.

The answer in the end was that it is a known bug:
The answer is to modify project files (*.csproj) containing LINQ to SQL dbml files to remove some stuff, as
a. Close VS 2008.
b. Open the project file containing the LINQ To SQL item in Notepad.
c. Remove the following lines:

[Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}"/]

The Setup Project will now build successfully. However, if you double-click the DBML file to open the designer in VS 2008 the Setup Project will stop building again. The above lines do not get re-added to the project file but the Setup Project will stop building anyway. Just restart VS 2008 and it will work again — until you open the DBML designer again. Once the Setup Project fails due to this problem it will never build successfully until after you restart VS 2008.

Another workaround listed worked : right click on the solution and click “Clean Solution” in Visual Studio

You can edit a csproj file in VS without closing the solution: 1. from the project context menu unload the project, 2. from the context menu open the csproj file in VS, 3. edit & save, 4. from the context menu re-open the project

Firstly, right-click on your Solution file > Properties > Configuration
In there, use the build tick boxes to experiment with which projects build together, and which don’t. Also, in your file system, delete the debug/release folders for all of your projects.
Finally, in my experience, this error is usually caused by a corrupt/missing web.config

Sometimes you get better error messages if you track down the build command (its in the output
windows) and looks like
E:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorrep…blah..blah
Then run that manually at the command line. Also, the output window tends to have better information, even though Visual Studios default behavior is to show the “Errors List” window after a failed build.

When you say cleaning, you mean Right Clicking on the Solutions and clicking Clean Solutions?
Have you tried removing all the built dlls from the Bin folder manually and making sure no other running applications have files open. Not sure if its sill an issue with VS, but files or folders starting with a “.” can cause problems. eg if SubVersion is not set to use “_svn” instead of “.svn”

Try moving the project root the root of the drive. I had run into an issue with a very large project where the path length was so long it had started to cause issues.
So rather than:
c:\My Documents and Settings\\My Documents\Visual Studio 2008\Projects\\PrecompiledWeb\\..\..\..\..\..\
do this: c:\Visual Studio 2008\Projects\\..\..\..\..\..\
here Describes the name of the system User, Project name and \..\..\..\..\..\ Describes files and folders inside the project which was created by user. Or can reduce to c:\Publish\\..\..\..\..\..\ or to c:\\..\..\..\..\..\

and in the last but not the least I must say :-

This is related to the Visual Studio 2008 Web Deployment Projects (WDP) as posted on
as well as the Visual Studio 2008 SDK as posted on (from ).

If 2008 Web Deployment Projects is installed and the Visual Studio 2008 SDK is NOT installed, Web Deployment Projects will build successfully.
If both 2008 Web Deployment Projects and the Visual Studio 2008 SDK are installed, Web Deployment Project builds will fail, but there will be no error messages.
If the Visual Studio 2008 SDK is uninstalled and the 2008 Web Deployment Projects installation is left unmodified, Web Deployment Projects will again build successfully.
It is important to note that no code in the solution (including both the Web Application Project and the Web Deployment Project) attempts to use the Visual Studio 2008 SDK in any way. The mere presence of the VS 2008 SDK on the system seems to corrupt the build process for Web Deployment Projects, even for a basic “Hello World” web application.
Two files are attached–
* Log – This is a log file of a Build attempt while the Visual Studio 2008 SDK is installed, with the log level set to “Diagnostic”
* Zip – This is a very basic solution that contains a “Hello World” Web Application Project and a corresponding Web Deployment Project. If the Visual Studio 2008 SDK is installed, this Web Deployment Project will fail to build, but there will be no errors. If the Visual Studio SDK is NOT installed, the entire solution will build successfully.

How to create a screensaver in Core C#

This program was written as an old style screensaver as a part of a training course. The screen saver is a simple program which uses random numbers to display dots on screen in different colors. It also uses a simple logic to keep removing dots by overwriting them with blank spaces, so that the screen does not fill up. There is a for loop to slow down the appearance of dots, i.e., stars.
This code is not the last code, suggestions and improvements are welcome.
Note: The % operator is used to generate actual randomness on screen, using many if-elses. Only later was it discovered that one can also pass a seed number for effective random values.
Note: This program generates only 10000 times. One can also pass a command line argument to run the loop indefinitely and prompt user to press Control+c to exit from the program.

using System;
class set_cursor2
int lastnum;

private int RandomNumber(int min, int max)
Random random = new Random();
lastnum = random.Next(min, max);

if (lastnum%3 == 0 || lastnum%4==0 )
lastnum = random.Next(min, max);

if (lastnum%5 == 0 || lastnum%6==0 || lastnum%7==0 )
lastnum = random.Next(min, max);

return lastnum;

static void Main(string[] args)
set_cursor2 obj = new set_cursor2();
int lastrow,lastcol;
int i,j,t;
Console.BufferHeight = 500;
Console.BufferWidth = 200;
Console.CursorSize = 50;
Console.CursorVisible = true;

i = 1;
j= obj.RandomNumber(1,99);
Console.CursorLeft = j;
lastcol = j;
j= obj.RandomNumber(1,49);
lastrow = j;
Console.CursorTop = j;
if (i%3 == 0)
Console.ForegroundColor = ConsoleColor.White;
else if (i%4 == 0)
Console.ForegroundColor = ConsoleColor.Cyan;
Console.ForegroundColor = ConsoleColor.DarkBlue;

if ((i+j) % 2 == 0 || (i+j) % 3 == 0 || (i+j) % 5 == 0)
Console.WriteLine(" ");

// Console.WriteLine(". {0} {1}",lastrow,lastcol);

while (i<=10000);
Console.WriteLine("\n\n Finish");

Anyone can use the color codes to change the layout of the screen. The following are some popular color codes:

Color Description
Black The color black.
Blue The color blue.
Cyan The color cyan (blue-green).
DarkBlue The color dark blue.
DarkCyan The color dark cyan (dark blue-green).
DarkGray The color dark gray.
DarkGreen The color dark green.
DarkMagenta The color dark magenta (dark purplish-red).
DarkRed The color dark red.
DarkYellow The color dark yellow (ochre).
Gray The color gray.
Green The color green.
Magenta The color magenta (purplish-red).
Red The color red.
White The color white.
Yellow The color yellow.

How to put your site into maintainance mode

First of all, create an instance of Uri object, then check if the URL provided matches with the URL you are having, then redirect it to the new URL.

Uri uri = new Uri("");
//Do something

Enjoy programming…

%d bloggers like this: