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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

use service reference in other project in the same solution

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :SharePoint


i have a windows service that sends information to another project(let's call it Project A) that hosts a wcf service.  the windows service business rules are in another project(project B) within the same solution. Do i have to add the service reference(to wcf service) in both projects (windows service and project B) in order to communicate with project A?


thank you in advance!



View Complete Post

More Related Resource Links

host and consume wcf rest service in web project in single solution

I have  create a solution which have multiple class library project and a web application Like Web(UI),BL,DAL etc. I have also add a WCF REST starter kit Collection project in the same Solution.WCF Rest API is working fine if I host it on IIS but i want to consume this in my web project without using IIS. Is this possible? if yes then what will be the URI  for my WCF Rest services? Add service reference is also not working because WSDL is disable in rest.

Solution/project structure


Hello, I am working in a aspx web application that must be built in several separate "modules" with different functionality which will be partly developed by different teams.

However, I need the completed app to reside in ONE virtual directory. There will be a single startup page. I need session state to be preserved across pages in different modules.

I structured it as one solution with different Web Projects and one class library project with common functionalities.


1) is this the right approach to do this? Or which one would be better?

2) each time I add a new web project to the solution, a new web.config gets created. What do I do and where do I put them?

VS 2010 + framework 4.0 + TFS

Regarding TFS and source control, I have a single Team project, the solution and web projects are inside it.



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

Installed Visual Studio 2005 on new laptop - can't open C# web services project solution.

Installed Visual Studio 2005 on new laptop - can't open C# web services project solution - get the 'project not supported by this installation' error. Tried re-installing to no avail. Have run various flavors of devenv as recommended in various posts. Still the same message. I can open the solution fine on my old laptop.    Update: We re-installed service pack 1 for VS and the problem was resolved.

Trying to call an asmx web service from a test project

I am trying to create a proxy for an asmx web service. The only thing I find in Visual Studio 2008 is a service reference. How do I call an asmx web service with a service reference? Certified Geek. Professional Data dude.

Cannot get service reference for Net.tcp service hosted in IIS7

HiI've got a service that I want to host in IIS7. The service runs over net.tcp (currently without security), but I am unable to create a service reference to it, or call it, using the net.tcp protocol. My event log is populated with lots of errors related to ASP.NET and System.ServiceModel, relevant services are installed and running (net.tcp port sharing service and net.tcp listener adapter).O/S : Window7 RTMDevStudio: 2008I publish the webservice to IIS7 and I get a valid page when navigating to the published .svc file (which tells me to use svtutil.exe and point it at the net.tcp endpoint).For that, I get this error :    The message could not be dispatched because the service at the endpoint address 'net.tcp://gedm-desktop.profiledc01.appdevelop.local/ManageAVMEP/ManageAVMAgent.svc/mex' is unavailable for the protocol of the address.Googling the problem leads me down several blind alleys :(I cannot determine what is causing the net.tcp listener to keep stopping? Everything is fine if I use the wsHttpBinding.Any tips or pointers to a course of action would be appreciated.ThanksGed My event log is full of errors (here is a sample) :-------An error occurred while trying to listen for the URL '/LM/W3SVC/1/ROOT/ManageAVMEP'. This worker process will be terminated. Sender Information: net.tcp Exception: System.ServiceModel.WasHos

calling a web service on a remote server from a ASPX page (web site project VS2005)

HI,I am maintaining a web site project in VS2005 and have to call a new web service on a remote server. I've done add web reference, and created the .wsdl and .discomap files in the app_webReference folder.  When I try to create a object representing the web service in the code ( wsnamespace.serviceName ws = new wsnamespce.serviceName(); ) the code wouldn't compile.The web site project is already calling other web services. When I right click on the type representing the web service and "go to definition" it takes me to a proxy class (derived from of course SoapHttpClientProtocol) in the metadata. I think this is what's missing for  the new web service i'm trying to call. Have I missed any steps?Thanks in advance.-me

Workflow Service not calling workflow in another project

I have a windows workflow service 4.0 that calls a workflow located in another project (i.e. another assembly). I have created a project reference in my workflow service project to the workflow in the other assembly. I have set a breakpoint in the workflow service receive activity and this breakpoint is hit. Next I step into the next activity which is an activity located in another project and the debugger does not work. Also the other workflow is sending an email.  It appears that the other workflow is not being called because I never receive an email from the workflow in the other project.   Any help is greatly appreciated.

convert 2003 project to vistudio 2005 get solution is unavailable

I have  three  folders , which original is build by vistual 2003 , recent ly  I install vistuall 2005 on Win 7 and succesful covert one  folder from vistual 2003 t0 2005 ( I forget how , I am new on win 7) , when I deat with my second folder I always get Test2( unviable) under the Solution Exporer ( vistual 2005)  But I can access this folder  by brows ( when I try http://localhost/test2/) I get all the files under this folder , why I can see them on my vistual studio 2005 ???

Project dependency / reference and 3rd party dlls missing

hi,i'm having the same problem in multiple solutions and i asked for help in a couple of "forums" already.... here is an easy explaination about my problem.we have 3 projects:Project "A" - a web applicationproject "B" - class libraryproject "C" - class libraryProject C holds a reference to a 3rd party dll. let's say thirdparty.dll. the 3rd party dll is referenced in the C.csproj file with a relative path and private = true (copy local = true): <Reference Include="ThirdPartysNameSpace.BlaBla, Version=, Culture=neutral, PublicKeyToken=0912345678910123, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\_tools\thirdparty.dll</HintPath> <Private>True</Private> </Reference> Project B holds a project to project reference to Project C.Project A holds a project to project reference to Project B.when i compile project C the thirdparty.dll is copied to its bin directory. C's bin directory contains C.dll and thirdparty.dll - correct so far.however when i then compile project B the thirdparty.dll isn't copied to project B's bin directory! B's bin only contains C.dll and B.dll. why isn't project C's bin content copied to B's bin?(sure thirdparty.dll is also missing in project A's bin directory.

Error on VS 2008 Class Library project: are you missing an assembly reference?)

http://msdn.microsoft.com/en-us/library/bb153523(office.12).aspx Working with ASP.NET 2.0 Web Parts and Windows SharePoint Services 3.0 Based on the above MSDN Walkthrough, I created a Class Library VS 2008 project. When clicking the Build menu, 11 errors on System.Web.Security etc popped up.  What's wrong? *********************************************** using   System; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; Error 1 The type or namespace name 'Security' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Error 2 The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

Adding AJAX-enabled WCF Service to the Solution throws an error

Hi I am just trying to learn Ajax enabled WCF service, when I try to create a new web application and add new item "AJAX-enabled WCF Service" I get an error message that "The extension of type 'System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not registered in the extension collection 'behaviorExtensions'. I had .net2.0/VS2005 and then I installed VS2008. I thought it might be an issue with Machine.config. So I am attaching my machine.config info. <?xml version="1.0" encoding="UTF-8"?>    <!--    Please refer to machine.config.comments for a description and    the default values of each configuration section.     For a full documentation of the schema please refer to    http://go.microsoft.com/fwlink/?LinkId=42127     To improve performance, machine.config should contain only those    settings that differ from their defaults.    -->    <configuration>      <configSections>    <section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=, Culture=neutral, Publi

Can't Add Service Reference in VS 2010 to a net.tcp endpoint

I've got a service running (well, it doesn't crash), but when I try to add a Service Reference to it, I keep getting Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:55555/mex'. If the service is defined in the current solution, try building the solution and adding the service reference again. The pertinent parts of my config file are:   <netTcpBinding> <binding name="ReliableDuplexBinding" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:00:30" sendTimeout="00:00:15" maxBufferPoolSize="1048576" maxBufferSize="262144" maxReceivedMessageSize="262144"> <readerQuotas maxDepth="33" maxStringContentLength="100000" maxArrayLength="131072" maxBytesPerRead="262144" maxNameTableCharCount="54000" /> <reliableSession inactivityTimeout="05:00:00" enabled="true" /> <security mode="None"> <transport> <extendedProtectionPolicy policyEnforcement="Never" /> </transport> </security> </binding> </netTcpBinding> <behaviors> <serviceBehaviors> <behavior nam

Deploy XBAP application with WCF Service Reference into multiple environments

Hi, we have a multiple environment setup (local, Development servers, QA servers, prod servers, etc.) and we are building an XBAP application that uses WCF Services to connect to databases.  We code and unit test everything locally and then deploy to our Development servers for more thorough unit testing.  The issue that we are having is that we don't see how to update the deployed XBAP application to use the Development server deployed WCF Service.  The only way we've been able to do this is by having to change the reference on my local machine, complie, and redeploy the XBAP.Question:  How do we configure a deployed XBAP's Service Reference to point to the same service on a different server than what it was originally compiled/deployed with?  (Like in some configuration file...NOTE: but we also don't see a config file after deploying the XBAP.)  We don't want to have to update the Service Reference for QA, Prod, Training, Stage, etc. on our local machines, compile and redeploy every time we need to migrate the application to a new environment.Thanks!

How do I generate service reference activities in my rehosted designer

My desginer is used to create lots of xamlx workflows.  These are hosted in app fabric. From Visual Studio I can add a service reference that points to my workflows, and it generates activities in my toolbar that I can use to call my service from another workflow. I'd like to do the same thing from my rehosted designer.  I figured it would be something like calling svcutil.exe, but couldn't find any information on this. Does anybody know how to create xaml activities by pointing at a service for a workflow designer rehost?   CheersJason Bolstad

How to generate service reference for Workflow service from command line?

Is there a way to generate service reference for Workflow service from command line using just dll file (without metadata, without wsdl). I tried using svcutil but i didn't succeed. just error without any meaningful message. udione

solution for maxstringcontentlength in wcf service?

I have the same problem. Everywhere just tells me to change my MaxStringContentLength property. I changed it in the bindings, but it still seems to address 8192. Do I need to change something else?   <binding name="UIFEndpoint" closeTimeout="10:01:00" openTimeout="10:01:00" receiveTimeout="10:10:00" sendTimeout="10:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">                     <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>                     <reliableSession ordered="true" inactivityTimeout="10:10:00" enabled="false"/>                     <security mode="Message">  &n
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