Jul 25 2007

Update on my artricle - ExtendedMembershipAPI

Category:Bil@l @ 10:41

I have received a bug today from my colleague Wessam Zeidan on my article Microsoft ASP.NET 2.0 Membership API Extended that was published by Code-Magazine!

"The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in theframework installation directory), or upgrade the provider to a newer version"

This bug was generated when he first tried to run the application. I believe the database schema that I used for the ASP.NET 2.0 application services is now an old one. What you need to resolve the problem is to take the following steps:

1. Create a new fresh database called ExtendedMemberShipDb.
2. Configure the database with the scripts needed to configure the ASP.NET Application Services (Install Application Services Database on Microsoft Sql Server 2000)
3. Download the script file found here and run it on top of the ExtendedMembershipDb (https://bhaidar.net/cs/files/folders/posts_material/entry3836.aspx)

You should have everything running up by now!

Hope this helps,
regards

 

Tags:

Jul 20 2007

Localization in ASP.NET 2.0

Category: ASP.NET 2.0 - General | General | GeneralBil@l @ 06:59

A series of two important and helpful articles by Rick Strahl can be found here:

Hope this helps you out,
Regards

Tags: , ,

Jul 19 2007

How to Document your Webservice

Category:Bil@l @ 07:44

I am always used to use XML Documentation for my code in VS 2003/2005. Lately, I have been working with Webservices and wanted also to document my webservice methods and provide some customization for the webservice as a whole. So how does it go?

First of all, you can add two major fields to the WebServiceAttribute:

1- Description: You can provide some description of what the Webservice does. This part is shown below the Webservice name.
2- Name: The Webservice name always to defaults to the ".asmx" name. However, you can change it by using this attribute.

You can also provide some description to the WebMethods using the WebMethodAttribute:

1- Description: You add your documentation for the webmethod in this section. The text you type in here will be shown under the Webmethod when viewing the webservice.

Hope this helps,
Regards

 

Tags:

Jul 19 2007

ASP.NET Development Server

Category:Bil@l @ 06:29

In this post I will show you how to setup the ASP.NET Development Server manually and bind it to a specific Port Number and Website without having to run it by default from the VS 2005 IDE.

Open your CMD window and browse to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

In that path, you will find the WebDev.WebServer.exe which is the ASP.NET Development Server present in Visual Studio 2005.

Now, if you type: WebDev.WebServer.exe /?, you get such a window:

WebDev.WebServer Help

 

So let us configure the WebDev.WebServer.exe to run on a Port number of our choice and attach a sample website to it:

WebDev.WebServer.exe /port:9999 /path:"C:\Inetpub\wwwroot\website1"

That's it! Now you can see on your taskbar a small window icon representing the ASP.NET Development Server saying that it is bound to port - 9999.

Open the browser of your choice, go to : http://localhost:9999/ and here it is, your website is running!

Hope this post is helpful for you!
Regards

Tags:

Jul 17 2007

ASP.NET in ORCAS

Category:Bil@l @ 21:09

I would like to invite you to check the latest article by my MVP colleague Rick Strahel,

ASP.NET Orcas: Quiet Revolution 

Thanks Rick!

Hope you will enjoy it!
Regards

Tags:

Jul 15 2007

Fluent Interface in C#

Category:Bil@l @ 20:21

A nice post I passed through today: Fluent Interface.

It is a very nice programming style of adding "method-action" functionalities on an object. It makes you write less code and clear one! For instance, you can build Query-Like objects in an API using this style of fluent interface. Here is a sample code that shows how a C# object implements the fluent interface by adding "action-methods", where each method does a certain action "setting a value on an internal field" and return an instance of the object itself, here is the code:

public class CustomStringList
{
    List<string> innerList = null;

    public CustomStringList()
 {
        this.innerList = new List<string>();
 }

    public CustomStringList AddValue(string value)
    {
        this.innerList.Add(value);
        return this;
    }

    public CustomStringList RemoveValue(string value)
    {
        this.innerList.Remove(value);
        return this;
    }

    public int Count
    {
        get
        {
            return this.innerList.Count;
        }
    }

Now to use the above object, you can write something as:

        CustomStringList stringList =
            new CustomStringList()
            .AddValue("ASP.NET")
            .AddValue("Bilal")
            .AddValue("Wessam")
            .AddValue("Haissam")
            .AddValue("Sami")
            .AddValue("C#")
            .RemoveValue("Bilal");

        int numberOfElements= stringList.Count;

Hope you liked this post, as I am very impressed by this style and I have in mind so many ideas to build based on this fluent interface concept! You can read more on Fluent Interface here: http://en.wikipedia.org/wiki/Fluent_interface

Regards

Tags:

Jul 15 2007

Read Large XML File into a DataSet

Category:Bil@l @ 13:52

While preparing my lectures for the 2541- Core Data Access I noticed a very nice comments on the MSDN website which talks about loading large XML files into a DataSet.

When you have a large XML file, the recommend way to load it to a DataSet is as follows:

 foreach (DataTable t in ds.Tables)
  t.BeginLoadData();

 ds.ReadXml("file.xml");
 
 foreach (DataTable t in ds.Tables)
  t.EndLoadData();

The BeginLoadData turns off any notifications while loading the data.

Hope this helps you,
Regards

Tags:

Jul 14 2007

Microsoft Health Common User Interface

Category:Bil@l @ 19:06

For those of you who develop applications targeted in the medication field, there is a very important online resource for you which I believe is a must for you to check and use all the controls offered there in your applications.
Here is part of the welcome message on the website:

"
The Microsoft Health Common User Interface (CUI) provides Design Guidance and controls which allow a new generation of safer, more usable and compelling health applications to be quickly and easily created. This site is aimed at user interface designers, application developers and patient safety experts who want to find out more about the benefits of a standardized approach to user interface design.
"

Best Regards,
Bilal
 

 

Tags:

Jul 13 2007

JSON Editor

Category:Bil@l @ 15:10

I was reading on Joe Stagner's blog today and I was amazed by the nice JSON editor he introduced on his blog, check it out here:

http://www.thomasfrank.se/json_editor.html

 

Regards

Tags:

Jul 13 2007

SubSoniProject - Zero DAL Code

Category:Bil@l @ 15:07

Check out the owesome SubsonicProject that helps you build faster yet efficient Data Access Layers for your applications, whether it is Windows App or Web App!

http://www.subsonicproject.com/

 

Regards

Tags: