Click here to Skip to main content
14,971,296 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 projects under one solution, one project is my Application and send project i used as a data access layer(WebServices). I have passed session values from My Application Project to Data Access Layer(WebServices).
Posted

From the standpoint of the runtime, there are not "projects". There are modules, assemblies and processes (normally, a process is created when you load an application). If different assemblies are used in a single application, so they are loaded in one single process during runtime, the boundaries between those assemblies do not virtually exist: you can freely do the calls between them as they were in one assembly.

In contrast, if you are working with separate processes, which are well isolated, you cannot share any data and makes calls across them. You have to use IPC. It includes sockets, named pipes, classical .NET remoting and WFC (internally using communication channels based on sockets and named pipes, but also different messaging systems, in case of WCF), shared memory (better avoid it by all means) and a lot more.

Please see:
http://en.wikipedia.org/wiki/Assembly_%28CLI%29[^],
http://en.wikipedia.org/wiki/Process_%28computing%29[^],
http://en.wikipedia.org/wiki/Inter-process_communication[^].

—SA
   
If that is a WebService, then you need to add Add Service Reference and then invoke any Service function add pass your parameters by creating Service instances in code.

For Example :
If you have a Service MyService.svc and there is a function MyFunction(string helloParameter), then add that reference of service to your first project.

For that check the below posts.
1. How to: Add a Reference to a Web Service[^].
2. Adding WCF Service References[^].
3. Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer [^].

Now call the method and pass parameters, by creating the object of that reference. Refer the articles, you will be clarified.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900