Re: DIME WSE 2.0 in .NET 2.0
- From: "Rich Fowler" <RJF@xxxxxxxxxxxxxxxx>
- Date: Wed, 16 Apr 2008 10:43:18 -0600
Steven,
Ok, I found the issue. When I originally implemented this (a couple of years ago), I included DATWebService in the type attribute for the securityTokenManager. This was the strong name from the sample code I was using. .NET 1.1 seemed to ignore this error and resolved to the local dll. ..NET 2.0+ did not ignore my error. By removing DATWebService from the type attribute, everything works fine.
Again, a simple error (or lack of knowledge) leads to a lot of headaches. Isn't programming wonderful!
Thanks for your help - Rich F.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message news:q4iBzN5nIHA.9016@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for your reply Rich,
Yes, WSE 2.0 SP3 is documented to be supported on .NET framework 2.0.
However, that means if you have an .NET 1.1 application that use WSE 2.0
SP3, you can move it to a machine that has only .NET 2.0 installed(also WSE
2.0 SP3 runtime components) and run it correctly. However, there is no
guranetee that if you continue to rebuild the application in VS 2008 and
there won't occur any problem since the WSE 2.0 SP3 may not be fully tested
when the framework is targeting to the .NET 2.0+
BTW, as for the custom SAML token manager, if you removed it or change to
use another token manager, will the entire application be running correctly
(after rebuild in VS 2008)? Maybe some code in the custom token manager
cause the problem. Also, in the configuration section, you used the private
assembly name as below:
======
IRSSaml.SamlTokenManager, IRSSaml
======
Have you tried strong-named the assembly(put into GAC) and reference
through fullname to see whehter it works?
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:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Rich Fowler" <RJF@xxxxxxxxxxxxxxxx>6750CA14E421@xxxxxxxxxxxxx>
<WYIALPrnIHA.4932@xxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <WYIALPrnIHA.4932@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: DIME WSE 2.0 in .NET 2.0
Date: Tue, 15 Apr 2008 23:56:59 -0600
Steven,
Ok, I've been doing some further research based on your reply. WSE 2.0 SP3
is supported and runs under .NET 2.0 (3.5). That is it is an (one or more)
NET 1.1 assemblies that will run under .NET 2.0. So the .NET 2.0 framework
is running the WSE 2.0 SP3 processes. That is, only one framework is
running. I was probably using the word 'target' incorrectly. I was
referring
to the VS.NET 2008 project target framework value. I have this set to 3.5
for all my projects referenced by the application.
The error seems to occur when trying to load the custom assembly for
SecurityTokenManager. Has the syntax changed for the references to the
assemblies. Note: The error is showing a null value for the name.
<security>
<securityTokenManager type="IRSSaml.SamlTokenManager, IRSSaml"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" qname="saml:Assertion"/>
<securityTokenManager type="IRSSaml.UserTokenManager, IRSSaml,
DATWebService"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"
qname="wsse:UsernameToken"/>
</security>
The inner exception I get is:
{"The given assembly name or codebase was invalid. (Exception from HRESULT:
0x80131047)":null} System.Exception {System.IO.FileLoadException}
This happens at:
at System.RuntimeTypeHandle._GetTypeByName(...)
at System.RuntimeTypeHandle.GetTypeByName(...)
at System.RuntimeType.PrivateGetType(...)
at System.Type.GetType(...)
at
Microsoft.Web.Services2.Security.Configuration.SecurityConfiguration.LoadSec
urityTokenManager(...)
..
Thanks - Rich F.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:WYIALPrnIHA.4932@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for your reply.http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
Yes, it is pity that WSE 3.0 no longer support DIME. Actually the reason
DIME is removed is because WSE is an .NET based implementation of the WS-*
secuirty specs. And according to the new version, binary attachment is
also
improved by the MTOM format which is more efficient and natural to
webservice/SOAP. DIME itself is not part of the SOAP envelope(added as an
additional part in SOAP/HTTP message).
So far, for running WSE 2.0 on .NET framework 1.1, you need to make the
entire client application(not only the WSE webservice proxy part)
configured to target .net framework 1.1. Thus, you actually do not need to
convert that project and use app.config to force it execute under .net
framework 1.1.
http://msdn2.microsoft.com/en-us/library/9w519wzk(VS.80).aspx
The fact that you need to make the entire application/project as .NET 1.1
is due to a given process can only load a single version of .net framework
runtime and system class libraries. In other words, in a single process,
you can not load two different version of .net runtime(and let one execute
under 1.1 while another part execute under 2.0).
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:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
ications.http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Rich Fowler" <RJF@xxxxxxxxxxxxxxxx>
References: <8B62735A-824A-404E-AAB0-86FE5BA1C028@xxxxxxxxxxxxx>
<6h5w5tumIHA.10116@xxxxxxxxxxxxxxxxxxxxxx>
<9978732B-6648-4410-A28C-87297110F0E3@xxxxxxxxxxxxx>
<TBQd8nfnIHA.8872@xxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <TBQd8nfnIHA.8872@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: DIME WSE 2.0 in .NET 2.0
Date: Mon, 14 Apr 2008 08:17:31 -0600
Yes, I installed the Full WSE 2.0 SP3 on the new development system. The
NET 1.1 application worked fine on the new development system. The .NET
3.5
version still receives the exception at runtime.
Yes, I found more information about the schema validation errors displayed
in VS.NET and that they can be ignored.
We prefer to move all our development environment.NET 3.5. Maintaining two
VS.NET development setups, one for .NET 3.5 and one for .NET 1.1, just for
a
couple of dlls, is a lot of wasted time and resources for several
developers. If we need only to maintain the custom security dlls in .NET
1.1
it may be workable. We do not have any control over the web services, they
are private (U.S. Government) and can change with little notice. They will
not be moving to MTOM attachments in the near future. Our dlls are
incorporated in three complex applications (one web, one windows form and
one windows service). At what point can the .NET 1.1 dlls be isolated from
the rest of the application to make the web services interface run
correctly; the custom security dlls, the proxies, the whole application
(not
acceptable), etc.?
Just a note of frustrastion on my part - Why did Microsoft choose not to
support DIME in WSE 3.0? Microsoft seems to believe that developers alway
have control over both sides (server and client) of web services. This is
not the case. To completely remove such functionality seems very short
sighted and self-centered.Then, they only document how to move to WSE 3.0,
they do not document how to smoothly integrate WSE 2.0 into the .NET 2.0
and
later environments. (There, thanks for letting me vent.)
Rich F.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:TBQd8nfnIHA.8872@xxxxxxxxxxxxxxxxxxxxxxxxx
Thanks for your reply Rich,
So you've installed the Full WSE 2.0 SP3 runtime on the new dev box but
still got the exception at runtime when try running the project?
The "schema validation error" just means the IDE can not find the
built-in
xml schema for the WSE 2 configurations, that doesn't quite matter for
runtime error. As you mentioned the custom security token, I would
suggest
you try starting from a very simple and typical WSE 2 application and
convert it to vs 2008 to see whether it can work correctly. If it works,
you can try adding more features into it to see at what point does it
break.
BTW, will you need to uitlize .NET 3.5 or .NET 3.0 for the client
application using WSE 2 SP3? If not, I think you can consider keep it
under
VS 2003/.NET 1.1 since that's the natural platform for WSE 2.0 SP3. And
you
can install .NET framework 1.1 on the target box so that it can still
keep
running under .NET 1.1. How do you think?
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:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
(D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\Dications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Rich Fowler" <RJF@xxxxxxxxxxxxxxxx>
References: <8B62735A-824A-404E-AAB0-86FE5BA1C028@xxxxxxxxxxxxx>
<6h5w5tumIHA.10116@xxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <6h5w5tumIHA.10116@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: DIME WSE 2.0 in .NET 2.0
Date: Thu, 10 Apr 2008 09:21:26 -0600
Hi Steven,
After installing the WSE 2.0 SP 3 runtime (full developer install), I
copied
the .NET 1.1 application over to the new development system and
everything
worked correctly (ie. WSE is installed correctly).
I was able to get more information wrt the error message.
InnerException {"An error occurred creating the configuration section
handler for microsoft.web.services2:
The given assembly name or codebase was invalid. (Exception from HRESULT:
0x80131047)
Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize()ebug\\FedStateBackend.vshost.exe.Config
line 14)"}
System.Exception {System.Configuration.ConfigurationErrorsException}
Part of the stack trace:
at
Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralCat
Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointReonfiguration()
at Microsoft.Web.Services2.Referral.ReferralCache.Initialize()
at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri)
at
D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginServiference
value)
at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String
value)
IRSProxies40.LoginService.LoginClass..ctor() in
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurice.cs:line
265
...
Line 14 is the start of the microsoft.web.services2 section. This error
happens when creating an instance of the proxy. If I comment out the
security section containing my custom SAML token managers, I get beyound
this point in the code. Here's the security section:
<security>
<securityTokenManager type="IRSSaml.SamlTokenManager, IRSSaml"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" qname="saml:Assertion"
/>
<securityTokenManager type="IRSSaml.UserTokenManager, IRSSaml,
DATWebService"
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifty-secext-1.0.xsd"
qname="wsse:UsernameToken" />
</security>
The IRSSam dll is targeted to .NET 3.5. Does this dll need to be .NET 1.1
(this is just a guess).
Thanks - Rich F.
"Steven Cheng [MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:6h5w5tumIHA.10116@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Rich,
From your description, you have a WSE 2.0 webservice client used in a
converted VS 2008 .NET 3.5 project(winform). When you try running the
application, it report an exception indicate that the configuration can
not
be loaded, correct?
Since the error indicate the configuration section can not be loaded. I
would suggest you first check whether WSE 2.0 runtime assmblies has been
correcctly installed into the GAC. When .net try parsing a custom
section,
it will first request the certain custom section type from the
assemblies
specified in configuration.
You can also try creating a very simple WSE 2.0 client application (in
vs
2003) and convert it to VS 2008 and run it to see whether it can run
correctly. If that also fails, there must be something incorrect with
the
WSE runtime. Otherwise, we may focus on the specific WSE client project.
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:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuriications.
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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Rich Fowler" <RJF@xxxxxxxxxxxxxxxx>
Subject: DIME WSE 2.0 in .NET 2.0
Date: Wed, 9 Apr 2008 14:48:36 -0600
I know this is an old question but I cannot find any of the previous
posting
wrt this issue.
We are finally upgrading to VS 2008 and .NET 3.5 from VS 2003 and .NET
1.1.
We have Windows forms, ASP.Net code and Windows services that interface
with
3rd party web services that require the DIME attachments. We developed
libraries that are used in all three environments. The proxies are all
setup
to use WSE 2.0 SP3. I also have the configuration settings from the .NET
1.1
implementation.
I'm getting the
WSE032: There was an error loading the microsoft.web.services2
configuration
section.
error in the Windows forms application.
I know it is stated that .NET 2.0 supports WSE 2.0 SP3 and that VS 2008
does
not provide the interface that VS 2003 does. However, I cannot find any
documentation on what is specifically necessary to implement WSE 2.0 SP3
in
NET 2.0. Or specifically what causes the above error.
Thanks for your help - Rich F.
Below are the relavent app.config sections:
-------------------------------
<configSections>
<section name="microsoft.web.services2"
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration,
Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</configSections>
<microsoft.web.services2>
<diagnostics>
<trace enabled="true" input="Trace/Response.xml"
output="Trace/Request.xml" />
<detailedErrors enabled="true" />
</diagnostics>
<security>
<securityTokenManager type="IRSSaml.SamlTokenManager, IRSSaml"
xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
qname="saml:Assertion"
/>
<securityTokenManager type="IRSSaml.UserTokenManager, IRSSaml,
DATWebService"
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.gty-secext-1.0.xsd"
qname="wsse:UsernameToken" />
</security>
<messaging>
<executionTimeout value="300" />
<maxRequestLength>-1</maxRequestLength>
</messaging>
</microsoft.web.services2>
-----------------------------------
Note: Same error if I change the version to 2.0.3.0.
Below is sample code from the proxies:
-----------------------------------
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="InitialLogin",
Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices")]
public class InitialLoginClass :
Microsoft.Web.Services2.WebServicesClientProtocol
{
public MeFHeaderType MeF;
/// <remarks/>
public InitialLoginClass()
{
this.Url = ConfigurationSettings.AppSettings.Get("WebServiceURL") +
"/a2a/mef/InitialLogin";
this.Timeout =
int.Parse(ConfigurationSettings.AppSettings.Get("WebServiceTimeout"));
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("MeF",
Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)]
InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/ov/a2a/mef/InitialLogin",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return:
System.Xml.Serialization.XmlElementAttribute("InitialLoginResponse",
Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices.xsd")]
public InitialLoginResponseType
/www.irs.gov/a2a/mef/MeFMSIServices.xsd")]
InitialLoginRequestType InitialLoginRequest)
{
object[] results = this.Invoke("InitialLogin", new object[]
{InitialLoginRequest});
return ((InitialLoginResponseType)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginInitialLogin(InitialLoginRequestType
InitialLoginRequest, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("InitialLogin", new object[]
{InitialLoginRequest}, callback, asyncState);
}
/// <remarks/>
public InitialLoginResponseType EndInitialLogin(System.IAsyncResult
asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((InitialLoginResponseType)(results[0]));
}
}
.
- Follow-Ups:
- Re: DIME WSE 2.0 in .NET 2.0
- From: Steven Cheng [MSFT]
- Re: DIME WSE 2.0 in .NET 2.0
- References:
- DIME WSE 2.0 in .NET 2.0
- From: Rich Fowler
- RE: DIME WSE 2.0 in .NET 2.0
- From: Steven Cheng [MSFT]
- Re: DIME WSE 2.0 in .NET 2.0
- From: Rich Fowler
- Re: DIME WSE 2.0 in .NET 2.0
- From: Steven Cheng [MSFT]
- Re: DIME WSE 2.0 in .NET 2.0
- From: Rich Fowler
- Re: DIME WSE 2.0 in .NET 2.0
- From: Steven Cheng [MSFT]
- Re: DIME WSE 2.0 in .NET 2.0
- From: Rich Fowler
- Re: DIME WSE 2.0 in .NET 2.0
- From: Steven Cheng [MSFT]
- DIME WSE 2.0 in .NET 2.0
- Prev by Date: Re: DIME WSE 2.0 in .NET 2.0
- Next by Date: Re: DIME WSE 2.0 in .NET 2.0
- Previous by thread: Re: DIME WSE 2.0 in .NET 2.0
- Next by thread: Re: DIME WSE 2.0 in .NET 2.0
- Index(es):
Relevant Pages
|
Loading