Entries Tagged 'Development' ↓

Why ASP.NET 2.0 ?

ASP.NET 2.0 is Microsoft’s latest technology set for building dynamic, interactive web content. Compared to its previous versions, ASP.NET 2.0 includes many new features aimed at increasing the web developer’s productivity in building web applications.

ASP.NET is not the only server-side technology around for creating professional web sites. Among its most popular competitors are PHP (Hypertext Preprocessor), JSP (JavaServer Pages), ColdFusion, and even the outdated ASP 3.0 and CGI (Common Gateway Interface). Among these technologies are many differences, but also some fundamental similarities. For example, pages written with any of these technologies are composed of basic HTML, which draws the static part of the page (the template), and code that generates the dynamic part.

However, PHP for example is just a script language and regarding to functionality it can’t compete with ASP.NET.

ASP.NET 2.0 serves you with high productivity, professionality and a powerful IDE. Honestly, I wouldn’t want to miss all those comforts anymore..

ASP.NET Deployment Tool v1.8 released!

Since v1.8 it has the ability to merge all the Assemblies into one single Assembly file. It’s possible by using the new aspnet_merge.exe provided by the Visual Studio 2005 Web Deployment Projects which you need to install if you want to use the new feature.

ASP.NET Deployment Tool

For more details check out the included Readme.txt. Get it here: ASP.NET Deployment Tool

I have no clue what’s wrong with gotdotnet again but I’m unable to login there at the moment, so the project page will be updated later on.

A working Source Code Plugin for WordPress 2.x

I tested about 3 plugins for WordPress 2.x and unfortunately only one is working at the moment.

It’s called “Code Markup” and you can get it here.

It has no code highlighting but it runs smooth and steady 🙂

Check if the Internet Connection State is active

I wrote a small application which uploads Images of new products and therefore I had to check if the Internet Connection State is active, otherwise it would crash. There are actually two ways (and probably more) of doing this, depending on your system. You could go with a direct api call:

        [DllImport("wininet.dll")]
        private extern static bool InternetGetConnectedState(out int Description, int ReservedValue);

        //Creating a function that uses the API function...
        public static bool IsConnectedToInternet()
        {
            int Desc;
            return InternetGetConnectedState(out Desc, 0);
        }

The Description can be found on MSDN, depending on the Connection the proper Value has to be entered.

Another way would be resolving some host of which you are sure it is online all the time. That could be microsoft.com, your company’s website or something else. Here we go:

        public static bool IsConnected()
        {
            System.Uri Url = new System.Uri("http://www.microsoft.com");

            System.Net.WebRequest WebReq;
            System.Net.WebResponse Resp;
            WebReq = System.Net.WebRequest.Create(Url);            

            try 
            {
                Resp = WebReq.GetResponse();
                Resp.Close();
                WebReq = null;
                return true;
            }

            catch
            {                
                WebReq = null;
                return false;
            }
        }

Include one of those functions in your code and you’re set!

New Atlas Build Available for Download with ASP.NET 2.0

The January CTP build of Atlas was made available today and can be downloaded from http://atlas.asp.net.  This is a pretty big release of Atlas that has a number of new and improved goodies.

The beauty of the <atlas:updatepanel> control is that it enables you to take an existing ASP.NET page with controls and Ajax enable it in under 5 minutes or less (including error handling + progress message UI, etc), without having to write a single line of javascript (note: Atlas also provides a very, very rich client
javascript library if you want to use that as well — but you don’t need to write to it at all unless you want to).

Nikhil posted a great blog entry today that summarizes all of the additional features and enhancements to the <atlas:updatepanel> scenarios that were added as part of this new Atlas CTP drop.  As you can see, there is now much richer support for
error handling and updateprogress UI you can take advantage of as well.

Everything on System.Net.Mail (ASP.NET v2)

Dave Wanta put up a very nice FAQ for the new System.Net.Mail Namespace in the .NET v2 Framework.

Check it out here

Atlas “Wiki Sample Kit” released

The ASP.NET Atlas Team have just released an “Atlas Wiki Sample Kit” based on the current Atlas build. This Wiki comes as a .VSI file that installs an “Atlas Wiki” template into your list of templates for Visual Studio 2005 (currently C# only).

I just tested it and I have to say it’s impressive. However, personally I won’t use Atlas until the final bits are out. Client-Side developing will be a very important topic but for now it’s “still in testing” you could say. There are several free AJAX Wrappers for .NET out there but apparently Atlas will integrate itself much more as it is a whole framework.

Also, Microsoft said Atlas will be multiple-browser-compatible. If that’s true it would be very nice and time saving.

Let’s just wait and see. The Atlas WiKi is definitely worth a look!

ASP.NET Deployment Tool v1.6 released

Compiled with the RTM v2.0 Framework and greatly improved FTP Support.
Get it here: ASP.NET Deployment Tool

I also setup a Project Page at GotDotNet: ASP.NET Deployment Tool on GotDotNet

Further Plans are:

  • A Profile Management System so you are able to manage all of your Websites by choosing the appropriate Profile.
  • A few Output Tweaks here and there.
  • For the very future: App_offline.htm Support.

I’m still not satisfied with the built-in VS2005 Publishing Tools so I will definitely go on developing it.

Regards, Andreas Kraus

Microsoft .NET Framework v2.0 Final released!

The Microsoft .NET Framework version 2.0 redistributable package installs the .NET Framework runtime and associated files required to run applications developed to target the .NET Framework v2.0.

The .NET Framework version 2.0 improves scalability and performance of applications with improved caching, application deployment and updating with ClickOnce, support for the broadest array of browsers and devices with ASP.NET 2.0 controls and services.

Let’s get ready for Production 🙂

Download it here

How to list all Windows Users

I had to figure out how to write all currently constructed Windows Users to the screen and managed it with this little piece of C# code:

using System.Management;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SelectQuery query = new SelectQuery("Win32_UserAccount");
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
            foreach (ManagementObject envVar in searcher.Get())
            {
                Console.WriteLine("Username : {0}", envVar["Name"]);
            }
            
            Console.ReadLine();

        }
    }
}

Depending on the PC it might eat up a little more time sometimes.

MySQL v5.0.15 final released!

Yes, it’s finally out. The new Key Features are:

  • Stored Procedures
  • Triggers
  • Views
  • Information Schema
  • Archieve Storage Engine

Apparently, MSSQL got those features allready, but therefore MySQL is for free and is being used by lots of people. Head over to http://dev.mysql.com and check it out if you like!

Good Evening,
Andreas Kraus

To take a Web application offline before deployment

Steven Smith pointed out a very nice Feature regarding to ASP.NET Deployment.

In ASP.NET 2.0, while you’re in the process of updating your site, you can expose a friendly error page by including a file called app_offline.htm in your site’s root. If this file exists, all requests to the site will be redirected to this page. The only way to get around this is to delete the file. You can read more about this feature here.

1.) Create a file called App_offline.htm and place it in the root of your target Web site.

2.) Put a friendly message in the App_offline.htm file to let clients know that you are updating the site. While the App_offline.htm file exists, any request to the Web site will redirect to the file.

* Remember to remove the App_offline.htm file after you are finished copying files.

Very important and nice feature!

ASP.NET Deployment Tool v1.5 released

I just finished the latest version of my comfortable ASP.NET Deployment Tool. That’s what it does:

An avanced and robust Deployment Tool for precompiling your ASP.NET Websites! Pre-Compilation gives your site a performance boost and secures it. Precompile your Website for speed improvements and security, specific Error Panel, FTP Support, Deploy to Network, easy to use.

ASP.NET Deployment Tool v1.5

Get it here: sunlab Tools

cursor: hand; and cursor: pointer explanation

I found this on Jeffrey Palermos Blog and wanted to share this with you guys, too. For IE you’re using the ‘hand’ statement and for Firefox the ‘pointer’ statement. Those 2 lines should do the job on the majority of the browser out there. Personally, I often encountered the case when IE didn’t render the hand mouse cursor if you move accross a special formated link. The following CSS Code should do the trick:

*.myStyle
{
   cursor: hand;
   cursor: pointer;
}

Using the new ASP.NET v2 SMTP Class

Due to the fact that System.Web.Mail.SmtpMail is obsolete now, here’s a little Snippet for you which shows the use of the replacement class. You can leave out the SMTPServer stuff if you’re Mailserver runs locally and doesn’t require local authentication.

using System.Net.Mail;

  protected void Button1_Click(object sender, EventArgs e)
    {
        string SMTPServer = "mail.sunlab.de";
        string fromAddress = "Andreas.Kraus@sunlab.de";
        string fromName = "Andreas Kraus";
        string toAddress = "info@kmc-home.com";
        string toName = "KMC Studios";
        string msgSubject = "Meeting";
        string msgBody = "Today";        
      
        SmtpClient client = new SmtpClient(SMTPServer);
        client.Credentials= new System.Net.NetworkCredential("Andreas.Kraus@sunlab.de", "thepw");
        MailAddress from = new MailAddress(fromAddress, fromName);
        MailAddress to = new MailAddress(toAddress, toName);
        MailMessage message = new MailMessage(from, to);
      
        message.Subject = msgSubject;
        message.Body = msgBody;
    
        client.Send(message);
    }