473,765 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF hosted in a webservice

I have a web service hosting a WCF library, which works fine but produced a
strange signature when interacting with vs 2005/2.0 clients. My method takes
3 strings and returns a bool as below.

bool CanRun(string appName, string userName, string function);

However the auto generated proxy in 2005 looks like this

void CanRun(string appName, string userName, string function, out bool
result, out bool resultSpecified );

I unserstand the new result parameter, but what is the resultSpecified
parameter that was created? It looks like it is always the same as the result
parameter, although admittedly I haven't tested this very thouroughly yet?
I'm pushing for WCF in our organization and don't want to get caught not
haveing an explanation of what is occurring here.

Thanks,
Bill
Apr 10 '08 #1
1 2467
That's fine. Thanks for your response.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?d2R1ZGVr?= <wd****@newsgro up.nospam>
References: <32************ *************** *******@microso ft.com>
<FU************ **@TK2MSFTNGHUB 02.phx.gbl>
Subject: RE: WCF hosted in a webservice
Date: Fri, 11 Apr 2008 07:42:01 -0700
Steven,

Thanks, I don't need to get rid of the parameter, just wanted to
understand what it was so I can explain to the people writing the client
apps
why they got it.

Thanks again.

"Steven Cheng [MSFT]" wrote:
Hi Bill,

As for the additional "xxxSpecifi ed" parameter, I think it is a
webservice
specific behavior for value type parameter/return value. For value type
parameter in webservice, it support marking it as "nullable". However,
since value type always contains a value, the .NET proxy generation will
add an additional parameter for you to indicate whether this value has
been
set or not. You can try replace the "bool" type with another reference
type such as string or a custom class .e .g.

=============== ==
[OperationContra ct]

MyResult CanRunRef(strin g AppName, string Username, string Function);
............... ......
}
[DataContract]
public class MyResult
{
[DataMember]
public bool CanRun;
}
=============== =

Then, the generated proxy method won't have that additional output
parameter. For your scenario, I think you do not quite need to use it if
the return value is always a valid/expected value. For more information
about Nullable types in webservice, here is another form thread mentioned
this:

#Consuming WebService which returns NULL-values
http://bytes.com/forum/thread375805.html

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent
issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
--------------------
Thread-Topic: WCF hosted in a webservice
thread-index: AcibJIPR/116RF3rRpymhXG0 8ZjkVQ==
X-WBNR-Posting-Host: 199.106.94.142
From: =?Utf-8?B?d2R1ZGVr?= <wd****@newsgro up.nospam>
Subject: WCF hosted in a webservice
Date: Thu, 10 Apr 2008 09:04:11 -0700

I have a web service hosting a WCF library, which works fine but produced
a
strange signature when interacting with vs 2005/2.0 clients. My method
takes
3 strings and returns a bool as below.

bool CanRun(string appName, string userName, string function);

However the auto generated proxy in 2005 looks like this

void CanRun(string appName, string userName, string function, out bool
result, out bool resultSpecified );

I unserstand the new result parameter, but what is the resultSpecified
parameter that was created? It looks like it is always the same as the
result
parameter, although admittedly I haven't tested this very thouroughly
yet?
I'm pushing for WCF in our organization and don't want to get caught not
haveing an explanation of what is occurring here.

Thanks,
Bill
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2052
by: Dennis C. Drumm | last post by:
I would like to be able to update an xml file located on my hosted server from my local computer. The server requires a user name and password to access the web site for writing or updating files. Could someone refer me to a doc that explains this or provide some sample code? Thanks,
5
12525
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error (that appears in plain text), and causes the client to crash. This C# code has been deployed both as an ASP.NET application and a WinForms app, each of which produced the same result. Further, moving the clients from a Windows XP machine to Windows...
5
1313
by: James | last post by:
Hi, I have built a Windows Form Control which is hosted in IE (for our Intranet). The form logs into a Web Service and retrieves information for display. However, because the web service is on a different internal server, we get the error message: "Error in document service. "Request for the permission of type 'System.Net.WebPermission' failed". We have got this to work on development machines by raising the trust level of the machine...
0
1087
by: Jon Pope | last post by:
I'm using VS2005. Within a C# project, I'm attempting to add a web reference that points to a webservice that I'm hosting on my local development machine. I'm able to add the reference, and see its entry within the Solution Explorer. However, when I try to Rebuild the project, I get the following error: Custom tool error: Unable to import WebService/Schema. Object reference not set to an instance of an object.
3
1609
by: Gary H | last post by:
Hi, If I were to write an application hosted webservice (ie a webservice that is contained wholly within the application) what sort of .NET technology would I use? I am writing an application that has a GUI and allows an remote application to send messages to it via web service methods. I currently have it working but using an ASP.NET webservice that communicates with the GUI application via .NET remoting. It works OK I would rather...
6
1658
by: scott | last post by:
what is the best way to send data to and query SQL 2005 server express edition db hosted on a dedicated server with ISP ? i need to query it directly from an application on my LAN (asp site on same machine as sql db also needs to query db) i can obviously use port 1433 but what other option do i have ? i.e ssl port, xml web service ? Any information is helpful
3
8703
by: Arild Bakken | last post by:
Hi, I have written a webservice using WCF. Everything works fine and I can consume the webservice using wsdl, svcutil or visual studio as long as the application pool is running under network_service or an account that is a member of the local administrators group. This webservice needs to run as a different user. When I change the identity, the request http://server/myservice.svc?xsd=xsd0 fails (IIS Log indicated an HTTP/200 (OK) -...
1
3995
by: aparna1212 | last post by:
We have developed a client for webservice in c++ using gSOAP. The client runs on AIX unix system. Webservice is SSL enabled & is hosted on windows IIs. We are using OpenSSL on AIX. While invoking the service we get an error (403 Forbidden Access). If we change the settings of IIS to ignore client certificate then the service responds but if it s set to require client certificate or accept client certificate then the same error is observed. The...
4
1394
by: James | last post by:
Hi, I have just upgraded a user machine to Vista (our first) as a test. Unfortunately a couple of our apps are failing due to Vista... 1. One app that loads an assembly from an Intranet website now fails with FileNotFound on a call to Assembly.LoadFrom(url). This still works fine on all XP SP2 systems in the company. 2. Maybe related... Our Intranet hosts a couple of csharp user controls in
0
9568
marktang
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...
0
10161
Oralloy
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...
1
9955
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,...
0
9833
tracyyun
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...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
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();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.