467,888 Members | 1,373 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

Apply WSE client policy to class library instead of appliation

I want to call my web service from a class library and have that library
handle all the wse stuff, so that applications using that library don't have
to worry about it.

Is that possible?

I've tried by creating and applying the correct policy to a class library
that I created. The application project doesn't have any wse settings (no
policy,etc) on it. Then I try calling the class library method from the
application.

When the code steps into the client library and tries to set the policy on
the service, it complains that it can't find the policy. Even though the
policy is clearly in the wse3policyCache.config file.

If I then go add the same policy to the application itself, then it works.
It's like the wse client stuff has to be applied to the calling application
itself and not some component it might be using.

Any ideas?
Nov 11 '06 #1
  • viewed: 1509
Share:
2 Replies
Is the wse3 config located with the client? I understand what you want to
achieve, and think it would be novel if you get it working. I'm assuming
that when you made the class library, a wse3policyCache.config was generated
in the project.

Ron

"Steve" <St***@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.com...
>I want to call my web service from a class library and have that library
handle all the wse stuff, so that applications using that library don't
have
to worry about it.

Is that possible?

I've tried by creating and applying the correct policy to a class library
that I created. The application project doesn't have any wse settings (no
policy,etc) on it. Then I try calling the class library method from the
application.

When the code steps into the client library and tries to set the policy on
the service, it complains that it can't find the policy. Even though the
policy is clearly in the wse3policyCache.config file.

If I then go add the same policy to the application itself, then it works.
It's like the wse client stuff has to be applied to the calling
application
itself and not some component it might be using.

Any ideas?

Nov 11 '06 #2
Yeah, the class library generated a nice wse3policyCache.config. I tried
copying that and the MyLibrary.dll.config file into the folder with the
client but no luck.

It looks like the actual client exe is the one that parses the config files
and loads policies, so if that app doesn't have wse set on it, it won't parse
and wse3 config files.

I guess if what I'm trying to do is novel, then it's not an ordinary
request. I was thinking maybe I was just missing something simple.

We're building a library that will be used by another application as a "plug
in". Meaning we don't have control over the client exe and can't apply wse
to it. So I guess we'll have to create a console app that has wse on it and
then have our library shell out and call that and then..........ugh.
"RYoung" wrote:
Is the wse3 config located with the client? I understand what you want to
achieve, and think it would be novel if you get it working. I'm assuming
that when you made the class library, a wse3policyCache.config was generated
in the project.

Ron

"Steve" <St***@discussions.microsoft.comwrote in message
news:FB**********************************@microsof t.com...
I want to call my web service from a class library and have that library
handle all the wse stuff, so that applications using that library don't
have
to worry about it.

Is that possible?

I've tried by creating and applying the correct policy to a class library
that I created. The application project doesn't have any wse settings (no
policy,etc) on it. Then I try calling the class library method from the
application.

When the code steps into the client library and tries to set the policy on
the service, it complains that it can't find the policy. Even though the
policy is clearly in the wse3policyCache.config file.

If I then go add the same policy to the application itself, then it works.
It's like the wse client stuff has to be applied to the calling
application
itself and not some component it might be using.

Any ideas?


Nov 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Martin Vorbrodt | last post: by
4 posts views Thread by Matt Frame | last post: by
reply views Thread by aaragon | last post: by
3 posts views Thread by =?Utf-8?B?R3JlZyBN?= | last post: by
2 posts views Thread by Wimpie van Lingen | last post: by
3 posts views Thread by =?Utf-8?B?SmFtZXMgV29uZw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.