.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

difference between Add Reference and Add Services Reference in WCF

Posted By:      Posted Date: October 06, 2010    Points: 0   Category :WCF
 

 

 

I have created a WCF Services called wcfProcess1 and hosted thru WcfSvcHost

I am consuming the wcfProcess1 in another windows program by calling by adding as Add Reference, DLL of the wcfProcess1 from Bin folder and not by adding as Add Services Reference.

Is this correct way to do?

By adding the DLL Reference as Add Reference i am still able to consume the wcfProcess1

What are the advantages and disadvantages of it?

 What is the difference between Add Reference and Add Services Reference in the client program when consuming the wcfProcess1?

  

Regards,

Thomas

 




View Complete Post


More Related Resource Links

What is the difference between Add Reference and Add Services Reference

  

I have created a WCF Services called wcfProcess1 and hosted thru WcfSvcHost I am consuming the wcfProcess1 in another windows program by calling by adding as Add Reference, DLL of the wcfProcess1 from Bin folder and not by adding as Add Services Reference. Is this correct way to do? By adding the DLL Reference as Add Reference i am still able to consume the wcfProcess1 What are the advantages and disadvantages of it? What is the difference between Add Reference and Add Services Reference in the client program when consuming the wcfProcess1?

Regards,

Thomas


Difference between ComponentResourceKey and a URI dictionary reference?

  
Hi, Sorry if that title doesn't make sense. I'm learning WPF and looking for a way to declare brush resources (eventually styles) in a single place and use them throughout the application which will have the UI in several different class libraries. I have a class library project named Common that all of the UI class libraries can reference. The book I'm using says that the ComponentResourceKey markup extension is designed for this purpose in which you have to create a Themes folder containing a file named generic.xaml. I've found that I can also just create a resource dictionary named anything in my Common project and then merge it with each Window's resouce dictionary using pack uri syntax: <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Common;component/OasisBrushes.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> What is the difference between the two approaches? Why be forced to use a specific path and file name when you can do it the second way? Additionally, is there a way to reference the resource globally for the class library project so that I don't have to put it in each window/control? Can a class library have an App.xaml? Thanks!

What s the difference of Endpoint Reference and Message Information Header in WS Addressing?

  
What s the difference of Endpoint Reference and Message Information Header in WS Addressing? Thanks aheadFrank Xu Lei--????,???? ???.NET????????????????????? Focus on Distributed Applications Development and EAI based on .NET   ???????:http://www.frankxulei.com/ ???????:http://www.cnblogs.com/frank_xl/ ??WCF?????? ??WCF??????

WCF RIA Services. How to add WCF Web reference

  

Hi

I am having working WCF Service module.

I want to use it in Silverlight business application,RIA Template.

 

How can i do it>

 


Many Thanks Deepak

Problem adding service reference to web services in VS 08

  

Hi,

I’ve been trying to write some C# in Visual Studio 2008 to leverage SharePoint Web Services. I’ve scoured the web for help on this problem. I’m just beginning to learn .NET programming, but I’ve done a bunch with SharePoint Web Services with javascript and then with jQuery.SPServices.

 

If I start a new Console Application project and try to add a Service Reference, I put in my url: …/_vti_bin/Authentication.asmx and try to attach it. It tells me that there’s a problem with the certificate (which I get in the browser and SP Designer).

 

I get this error:

The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://example.com/myCollection/_vti_bin/Authentication.asmx'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic Realm="example.com"'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.

If I click Advanced and Add Web Reference, I try again. This time, the browser window brings up the form we use to authenticate. From what I understand about the architecture, the MOSS

Chapter 12: Excel Services (SharePoint 2010 Web App The Complete Reference)

  
Learn how to build Excel web-based applications in Microsoft SharePoint 2010 by using OpenXML.

Chapter 10: Word Automation Services (SharePoint 2010 Web App The Complete Reference)

  
Learn how to build Word web-based applications in Microsoft SharePoint 2010 by using OpenXML.

A better way to reference your wizard steps using named steps

  
Note: this article uses the plain vanilla but the concepts apply equally well to its popular counterpart .

By far the most common way that I see wizard steps reference in code snippets is by their index.

reference from menubuttons to text parts in article on the same page

  

Hi, I'm searching now for hours but couldn't find it.Cry

In my menu i have several buttons which (by a <a href..) should go the a part of an article that is in the same form.

Menu button : What is a database should go to the page default.aspx and in there is an article published.
A part of this article is having a piece of text about "what is a database"

Menu button: how to make a query should go to this same article in the same page but then to the part that is have the piece about the query. The next could be an example of what i'm doing:

<ul>
    <li><a href="default.aspx ?????>what is a database</a></li>
    <li><a href="default.aspx ?????>what is a query</a></li>

Where my question marks are, there should be a connection to that particular piece of text.
In each article part there is an ID="text1" and the second part id="text2"

How shoudl i do that, Should i use a question mark.
Please give me some guidance how to structure the <li> statement or a pointer where I can read about it.

th

Reference HttpApplication from a separate HttpApplication

  

I want to create a website that can monitor the status of other websites running on the same server. Is this possible? How do I get a reference to a site's HttpApplication context from a separate HttpApplication?


Registering controls of current assembly object reference NOT set error

  

Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?

Thanks


Page.FindControl Causing Null Reference Exception

  

Hi guys,

I developed a page in VWD 2008 and it works perfectly locally, but when I deployed it on the server every Page.FindControl() call is causing the NullReference Exception "Object reference not set to an instance of an object. " Can anyone help me out? Code is below

Cheers,

Mike Marshall

            For i As Integer = 1 To 10
                If (CType(Page.FindControl("last_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("first_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("dob_" & i), TextBox).Text.Length > 0) Then
                    Dim person_entry(7) As String
                    person_entry(0) = info_list.Count - 1
                    person_entry(1) = CType(Page.FindControl("last_" & i), TextBox).Text
                    person_entry(2) = CType(Page.FindControl("first_" & i), TextBox).Text
                    person_entry(3) = CType(Page.FindControl("dob_" & i), TextBox).Text
                    person_entry(4) = CType(Page.FindControl("appear_" & i), TextBox).Text
                    person_entry(5) = CType(Page.FindControl("mental_" & i), TextBox).Text
                    person_entry(6) = CType(Page.FindControl("behave_" & i), TextB

LINQ Sorting After Goup w/ Table Reference

  

Having a little trouble here.  I am taking a table (Articles) and grouping all the results by the key that references another table (ArticleSectionCategories).  I then want to sort these results by the OrderBy field of the referenced table (ArticleSectionCategory.OrderBy).  This is what I am using right now but it is not working.  Any thoughts?

 

                var GroupedArticles = from A in DC.Articles
                                     where A.PackagesId == packageId
                                     group A by A.ArticleSectionCategoriesId into G
                                     select G.OrderBy(C => C.ArticleSectionCategory.OrderBy);


 


Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che

  

A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

FileUpload error: Object reference error

  

I have a FormView with a FileUpload to upload an image in a database.

I keep getting an object reference error.(view code)

I am using this same script to upload the image to the database, but when I try to update the file upload I get the error.    



string strFilePath=Server.MapPath("\\images\\"+fupdImage.FileName);

        Byte[] image=null;
        HttpPostedFile imgVid=FileUpload.PostedFile;

        image=new Byte[imgVid.ContentLength];//Object reference not set to an instance of an object.
        imgVid.InputStream.Read(image,0,imgVid.ContentLength);

        if(FileUpload.HasFile) {
        string imageFile=FileUpload.PostedFile.FileName;
        int index=imageFile.LastIndexOf(".");
        string fileFormat=imageFile.Substring(index+1);
        fileFormat=fileFormat.ToLower();

        if(fileFormat=="gif"||fileFormat=="jpg"
    &nb

How to reference a listbox from a procedure

  

I have a listbox that gets loaded from a couple of different places on my web form.

I would like to put the code to load the listbox in one place, rather than have two copies of it.

The problem is, I can't figure out how to reference the listbox control successfully from within a procedure.

Would anyone know how to do this?

My code looks like this:

private static bool LoadSubscriptionListBox(System.Web.UI.Page Page)
{
        bool bReturn = false;

        // Clear the listbox
        lbSubscriptionList.Items.Clear();

        // Load the listbox

        ...

}



Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend