I'm trying to use a Web Service to be a Remoting client of an existing
..NET 2.0 server. But I get the following error when I try to use
System.Runtime. Remoting.Channe ls.Http in my WebService. The same code
works fine in a standalone app. I have inspected
System.Runtime. Remoting.dll with ildasm, and I can see the
....Channels.Ht tp namespace there. I verified that the virtual
directory is configured to use v2.0.50727 (the error message confirms
this). Am I missing something?
Thanks,
Kirk
Server Error in '/WS1' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'Http' does
not exist in the namespace 'System.Runtime .Remoting.Chann els' (are you
missing an assembly reference?)
Source Error:
Line 5: using System.Runtime. Remoting;
Line 6: using System.Runtime. Remoting.Channe ls;
Line 7: using System.Runtime. Remoting.Channe ls.Http;
Line 8: using SimpleRemotingA sm;
Line 9:
Source File: d:\web_services \mystuff\WS1\Ap p_Code\Service. cs Line: 7
Show Detailed Compiler Output:
c:\windows\syst em32\inetsrv>
"C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\csc.exe" /t:library
/utf8output
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Config uration\2.0.0.0 __b03f5f7f11d50 a3a\System.Conf iguration.dll"
/R:"C:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\Temporary ASP.NET
Files\ws1\423f2 9b4\cc2e710\ass embly\dl3\9bd5a ebf\00a8f36d_1a 37c601\SimpleRe motingAsm.DLL"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Drawin g\2.0.0.0__b03f 5f7f11d50a3a\Sy stem.Drawing.dl l"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Data\2.0 .0.0__b77a5c561 934e089\System. Data.dll"
/R:"C:\WINDOWS\M icrosoft.NET\Fr amework\v2.0.50 727\mscorlib.dl l"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Se rvices\2.0.0.0_ _b03f5f7f11d50a 3a\System.Web.S ervices.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Enterpri seServices\2.0. 0.0__b03f5f7f11 d50a3a\System.E nterpriseServic es.dll"
/R:"C:\WINDOWS\a ssembly\GAC_32\ System.Web\2.0. 0.0__b03f5f7f11 d50a3a\System.W eb.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Xml\2. 0.0.0__b77a5c56 1934e089\System .Xml.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System.Web.Mo bile\2.0.0.0__b 03f5f7f11d50a3a \System.Web.Mob ile.dll"
/R:"C:\WINDOWS\a ssembly\GAC_MSI L\System\2.0.0. 0__b77a5c561934 e089\System.dll "
/out:"C:\WINDOWS \Microsoft.NET\ Framework\v2.0. 50727\Temporary ASP.NET
Files\ws1\423f2 9b4\cc2e710\App _Code.6f30um4y. dll" /debug- /optimize+
/w:4 /nowarn:1659;169 9
"C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\ws1\423f2 9b4\cc2e710\App _Code.6f30um4y. 0.cs"
"C:\WINDOWS\Mic rosoft.NET\Fram ework\v2.0.5072 7\Temporary ASP.NET
Files\ws1\423f2 9b4\cc2e710\App _Code.6f30um4y. 1.cs"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
d:\web_services \mystuff\WS1\Ap p_Code\Service. cs(7,40): error CS0234:
The type or namespace name 'Http' does not exist in the namespace
'System.Runtime .Remoting.Chann els' (are you missing an assembly
reference?)
Show Complete Compilation Source:
Line 1: using System;
Line 2: using System.Web;
Line 3: using System.Web.Serv ices;
Line 4: using System.Web.Serv ices.Protocols;
Line 5: using System.Runtime. Remoting;
Line 6: using System.Runtime. Remoting.Channe ls;
Line 7: using System.Runtime. Remoting.Channe ls.Http;
Line 8: using SimpleRemotingA sm;
Line 9:
Line 10: [WebService(Name space = "http://tempuri.org/")]
Line 11: [WebServiceBindi ng(ConformsTo =
WsiProfiles.Bas icProfile1_1)]
Line 12: public class Service : System.Web.Serv ices.WebService
Line 13: {
Line 14: public Service () {
Line 15:
Line 16: //Uncomment the following line if using designed
components
Line 17: //InitializeCompo nent();
Line 18: }
Line 19:
Line 20: [WebMethod]
Line 21: public string HelloWorld()
Line 22: {
Line 23: return "Hello World";
Line 24: }
Line 25:
Line 26: [WebMethod]
Line 27: public void Main(string[] args)
Line 28: {
Line 29: // Create a new HttpChannel
Line 30: HttpChannel c = new HttpChannel();
Line 31: ChannelServices .RegisterChanne l(c);
Line 32:
Line 33: // Get a proxy to remote object.
Line 34: object remoteObj = Activator.GetOb ject(
Line 35: typeof(SimpleRe motingAsm.Remot eMessageObject) ,
Line 36: "http://localhost:32469/RemoteMsgObj.so ap");
Line 37:
Line 38: RemoteMessageOb ject simple =
(RemoteMessageO bject)remoteObj ;
Line 39: simple.DisplayM essage("Hello from the client!");
Line 40: return simple.ReturnMe ssage();
Line 41: }
Line 42: }
Line 43: 2 3708
I noticed that on my web server, all my file associations for aspx,
asax, ascx, etc. all point to v1.1 of the framework. I installed the
2.0 framework on that machine, but it apparently didn't update all the
file associations. Is there something I can run to update them? Is it
possible this is the source of my problem?
Thanks,
Kirk
Well, I figured out my original problem. I needed to add a reference
to the assembly System.Runtime. Remoting in my Web.Config as follows:
<assemblies>
<add assembly="Syste m.Runtime.Remot ing, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= B77A5C561934E08 9"/>
</assemblies>
Visual Studio 2005 can do this for you if you right click in the
Solution Explorer and select Add Reference... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jabailo |
last post by:
I have the config file below.
Is there anyway for the value of MachineName to be populated,
automatically, with the IP address that the application is running on?
So, I would say something like machineName=@IPAddress or some such thing...
|
by: Ken Durden |
last post by:
I'm getting the following exception coming out of a block of unmanaged
C++ code.
Thread executed for 1.03 sec and died with the following exception:
External component has thrown an exception.
==== Primary Call Stack ====
at ?Setup@EdgeTopImageProcessor@Edge@InspectionAlgorithm@August@@$$FQAEXHHHHW4eBayerFormatType@BayerImage@234@ABUEdgeTopParam@1234@PAVErrorTraveler@Unmanaged@Infrastructure@4@@Z(EdgeTopImageProcessor*
, Int32 , Int32...
|
by: Jeff Green |
last post by:
Hello all,
Can anyone explain why I keep getting the following error?
C:\Project\CalcServer\CalcServer.cs(4): The type or namespace name
'Http' does not exist in the class or namespace
'System.Runtime.Remoting.Channels' (are you missing an assembly
reference?)
I have the following using statements at the begining of the file.
|
by: Knut Vonheim |
last post by:
For some reason I cannot access this in CSharp - neither with using or
directly in the code?
System.Runtime.Remoting.Channels on the other hand is fine, but no
Http.anything works.
Any thoughts, helps, guidance, hints, or pointers are greatly appreciated!!
Regards,
|
by: web1110 |
last post by:
Hi y'all,
I'm playing with C# again, trying to implement a remoted calculator
exercise.
If I include:
using System.Runtime.Remoting.Channels.Http;
I get the error:
| |
by: Samuel R. Neff |
last post by:
We just started getting NullReferenceException in one of our
applications on our demo server.
This is occuring in a .NET Windows Service that is using binary
remoting over TCP to talk to another .NET Windows Service on the same
machine.
..NET 1.1 SP1
Any suggestions?
|
by: marcelino |
last post by:
Hi,
I have c# express beta
I try to write the following using clause:
System.Runtime.Remoting.Channels.Http;
because I want to create a http channel.
HttpChannel aJobChannel = new HttpChannel(4000);
|
by: Kirk |
last post by:
I'm trying to use a Web Service to be a Remoting client of an existing
..NET 2.0 server. But I get the following error when I try to use
System.Runtime.Remoting.Channels.Http in my WebService. The same code
works fine in a standalone app. I have inspected
System.Runtime.Remoting.dll with ildasm, and I can see the
....Channels.Http namespace there. I verified that the virtual
directory is configured to use v2.0.50727 (the error message...
|
by: SenthilVel |
last post by:
Hi All
i am getting an error in remoting proxies like the below :
Exception rethrown at :
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
|
by: =?Utf-8?B?c2FtMDFt?= |
last post by:
I have a remoting application that was developed on a Windows XP SP2 machine
with VS2005 SP1. I finally got everything deployed using Wix 3.0, and it
works great. Problem is, when I install the msi on a W23 server SP2, I get
the following error:
System.Runtime.Remoting.RemotingException: Remoting configuration failed
with the exception 'System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |