Monthly Archives: January 2011

Passing Entity Framework edmx over WCF Services, using var at receiving end

1. Create a WCF Service2. Create an entity model with the Beancurds table3. Change the IService.cs file as follow[ServiceContract]public interface IService{    [OperationContract]    List<BeancurdModel.Beancurd> GetData();}4. Change the Service.cs file as follow.public class Service : IService{public List<BeancurdModel.Beancurd> GetData(){BeancurdModel.BeancurdEntities context = new BeancurdModel.BeancurdEntities(); var … Continue reading

Posted in .Net | Tagged | 3 Comments

Add, Update, or Remove a Service Reference – WCF

For example, below is my WCF Service URL. http://localhost/WCFServiceBC/Service.svc 1. Right click the project in Solution Explorer then choose Add Service Reference. 2. Paste the address, click Go then click OK. 3. You will see your reference added. In my … Continue reading

Posted in .Net | Tagged | 4 Comments

Build Your First ASP.NET Application with ASP.NET Web Forms (Video)

If you are looking for a video “Build Your First ASP.NET Application with ASP.NET Web Forms” in asp.net web site then you will get to involve in MS SQL Server and Gridview control which is somehow complicated for a first … Continue reading

Posted in .Net | 25 Comments

Migration From Windows XP to Windows 7 (Video)

Bear in mind this is migration but not direct upgrade so do not feel being cheated. http://technet.microsoft.com/en-us/itmanagement/ff765021

Posted in Operating System | Leave a comment

The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element – When get the return from WCF Services.

If you hit the error message above and your Visual Studio looks like below. Open web.config file and look for the basicHttpBinding and change maxBufferSize and masReceivedMessageSize like the follow.   <basicHttpBinding>     <binding name=“BasicHttpBinding_IService“ closeTimeout=“00:01:00“      openTimeout=“00:01:00“ receiveTimeout=“00:10:00“ sendTimeout=“00:01:00“ … Continue reading

Posted in .Net | 4 Comments

Call a Method / member function dynamically using Type.InvokeMember

When you come into a situation you can only know what method to call during run time then the code below will be extremely useful to you. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Reflection;   namespace ConAppInvoke … Continue reading

Posted in .Net | 2 Comments

How to: Bracket Data Submissions by Using Transactions (LINQ to Entity)

Once you have created the Entity Framework then you can insert data to your database. The code below will insert the data into 2 tables, Orders and OrderDetails. In error free condition this piece of code will run perfectly.        … Continue reading

Posted in .Net | Leave a comment

WordPress search is marvelous (search your own blog contents)

I could not remember when I have created a blog about datetime casting issue in my blog. Thus, I just typed date in the search box. The result came back with what I really wanted and it was posted back … Continue reading

Posted in Community | Tagged | Leave a comment

Value passing to WCF Service using the default generated WCF code

When you create a WCF Service, There are 2 code files created IService.cs and Service.cs. IService.csusing System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.ServiceModel.Web;using System.Text; // NOTE: You can use the “Rename” command on the “Refactor” menu to change the interface name … Continue reading

Posted in .Net | 5 Comments

Free ebook: Moving to Microsoft Visual Studio 2010

In fact it is good for new VS 2010 developers too. http://blogs.msdn.com/b/microsoft_press/archive/2010/09/13/free-ebook-moving-to-microsoft-visual-studio-2010.aspx

Posted in .Net | Tagged | Leave a comment