.NET Forum / ASP.NET / Web Services / April 2008
DIME WSE 2.0 in .NET 2.0
|
|
Thread rating:  |
Rich Fowler - 09 Apr 2008 21:48 GMT 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" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-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)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.gov/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 InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http://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])); } }
Steven Cheng [MSFT] - 10 Apr 2008 10:15 GMT 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@microsoft.com.
================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
-------------------- From: "Rich Fowler" <RJF@newsgroup.nospam> 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" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri ty-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)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.g 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 InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/ /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])); } }
Rich Fowler - 10 Apr 2008 16:21 GMT 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) (D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\Debug\\FedStateBackend.vshost.exe.Config line 14)"} System.Exception {System.Configuration.ConfigurationErrorsException}
Part of the stack trace:
at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize() at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralConfiguration() at Microsoft.Web.Services2.Referral.ReferralCache.Initialize() at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri) at Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointReference value) at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String value) IRSProxies40.LoginService.LoginClass..ctor() in D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginService.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" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-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.
> Hi Rich, > [quoted text clipped - 176 lines] > } > } Steven Cheng [MSFT] - 14 Apr 2008 07:36 GMT 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@microsoft.com.
================================================== 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@newsgroup.nospam> References: <8B62735A-824A-404E-AAB0-86FE5BA1C028@microsoft.com> <6h5w5tumIHA.10116@TK2MSFTNGHUB02.phx.gbl> In-Reply-To: <6h5w5tumIHA.10116@TK2MSFTNGHUB02.phx.gbl> 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) (D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\D ebug\\FedStateBackend.vshost.exe.Config line 14)"} System.Exception {System.Configuration.ConfigurationErrorsException}
Part of the stack trace:
at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize() at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralC onfiguration() at Microsoft.Web.Services2.Referral.ReferralCache.Initialize() at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri) at Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointRe ference value) at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String value) IRSProxies40.LoginService.LoginClass..ctor() in D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginServi ce.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" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri ty-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.
> Hi Rich, > [quoted text clipped - 29 lines] > ================================================== > Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. > [quoted text clipped - 71 lines] > <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" /> [quoted text clipped - 32 lines] > [System.Web.Services.Protocols.SoapHeaderAttribute("MeF", > Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.g
> ov/a2a/mef/InitialLogin", > Use=System.Web.Services.Description.SoapBindingUse.Literal, [quoted text clipped - 3 lines] > Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices.xsd")] > public InitialLoginResponseType InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/
> /www.irs.gov/a2a/mef/MeFMSIServices.xsd")] > InitialLoginRequestType InitialLoginRequest) [quoted text clipped - 20 lines] > } > } Rich Fowler - 14 Apr 2008 15:17 GMT 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.
> Thanks for your reply Rich, > [quoted text clipped - 293 lines] >> } >> } Steven Cheng [MSFT] - 15 Apr 2008 05:47 GMT Thanks for your reply.
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@microsoft.com.
================================================== 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@newsgroup.nospam> References: <8B62735A-824A-404E-AAB0-86FE5BA1C028@microsoft.com> <6h5w5tumIHA.10116@TK2MSFTNGHUB02.phx.gbl> <9978732B-6648-4410-A28C-87297110F0E3@microsoft.com> <TBQd8nfnIHA.8872@TK2MSFTNGHUB02.phx.gbl> In-Reply-To: <TBQd8nfnIHA.8872@TK2MSFTNGHUB02.phx.gbl> 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.
> Thanks for your reply Rich, > [quoted text clipped - 31 lines] > ================================================== > Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. > [quoted text clipped - 23 lines] > The given assembly name or codebase was invalid. (Exception from HRESULT: > 0x80131047) (D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\D
> ebug\\FedStateBackend.vshost.exe.Config > line 14)"} [quoted text clipped - 3 lines] > > at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize()
> at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralC
> onfiguration() > at Microsoft.Web.Services2.Referral.ReferralCache.Initialize() > at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri) > at Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointRe
> ference > value) > at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String value) > IRSProxies40.LoginService.LoginClass..ctor() in D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginServi
> ce.cs:line > 265 [quoted text clipped - 11 lines] > <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" /> [quoted text clipped - 42 lines] >> ================================================== >> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications. >> [quoted text clipped - 73 lines] >> <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" /> [quoted text clipped - 32 lines] >> [System.Web.Services.Protocols.SoapHeaderAttribute("MeF", >> Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.g
>> ov/a2a/mef/InitialLogin", >> Use=System.Web.Services.Description.SoapBindingUse.Literal, [quoted text clipped - 3 lines] >> Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >> public InitialLoginResponseType InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/
>> /www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >> InitialLoginRequestType InitialLoginRequest) [quoted text clipped - 20 lines] >> } >> } Rich Fowler - 16 Apr 2008 03:31 GMT Steven,
I guess I'm a little confused. It is documented that WSE 2.0 SP3 works in .NET 2.0. I've seen posts (on other sites that this works). This implies that the WSE 2.0 SP3 .NET 1.1 assemblies can be referenced with a .NET 2.0 application. I can understand that a single assembly (project) needs to run under a single framework. The web service calls are just a small part (1% or less) of a very complex web application we are moving to .NET 3.5 to take advantage of all the new stuff. It sound like you are telling me that we cannot do this. I can understand isolating the web services into a single .NET 1.1 project and reference these objects from the .NET 3.5 application.
Can you further clarify.
Thanks - Rich F.
> Thanks for your reply. > [quoted text clipped - 406 lines] >>> } >>> } Rich Fowler - 16 Apr 2008 06:56 GMT 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-wssecurity-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.LoadSecurityTokenManager(...) ...
Thanks - Rich F.
> Thanks for your reply. > [quoted text clipped - 406 lines] >>> } >>> } Steven Cheng [MSFT] - 16 Apr 2008 08:28 GMT 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@microsoft.com.
================================================== 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@newsgroup.nospam>6750CA14E421@microsoft.com> <WYIALPrnIHA.4932@TK2MSFTNGHUB02.phx.gbl> In-Reply-To: <WYIALPrnIHA.4932@TK2MSFTNGHUB02.phx.gbl> 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.
> Thanks for your reply. > [quoted text clipped - 34 lines] > ================================================== > Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. > [quoted text clipped - 88 lines] >> ================================================== >> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications. >> [quoted text clipped - 24 lines] >> The given assembly name or codebase was invalid. (Exception from HRESULT: >> 0x80131047) (D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\D
>> ebug\\FedStateBackend.vshost.exe.Config >> line 14)"} [quoted text clipped - 3 lines] >> >> at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize()
>> at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralC
>> onfiguration() >> at Microsoft.Web.Services2.Referral.ReferralCache.Initialize() >> at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri) >> at Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointRe
>> ference >> value) >> at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String >> value) >> IRSProxies40.LoginService.LoginClass..ctor() in D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginServi
>> ce.cs:line >> 265 [quoted text clipped - 11 lines] >> <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" /> [quoted text clipped - 44 lines] >>> ================================================== >>> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>> ications. >>> [quoted text clipped - 78 lines] >>> <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" /> [quoted text clipped - 32 lines] >>> [System.Web.Services.Protocols.SoapHeaderAttribute("MeF", >>> Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.g
>>> ov/a2a/mef/InitialLogin", >>> Use=System.Web.Services.Description.SoapBindingUse.Literal, [quoted text clipped - 3 lines] >>> Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >>> public InitialLoginResponseType InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/
>>> /www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >>> InitialLoginRequestType InitialLoginRequest) [quoted text clipped - 20 lines] >>> } >>> } Rich Fowler - 16 Apr 2008 16:59 GMT I'll work on this some more to see if I can get the process to recognize the assembly.
The specific question at this time is why is the error identifying a null for the assembly name. I believe that is what the inner exception message is stating:
{"The given assembly name or codebase was invalid. (Exception from HRESULT:
> 0x80131047)":null} I've included the complete stack to help identify where the problem may exist.
----- at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Microsoft.Web.Services2.Security.Configuration.SecurityConfiguration.LoadSecurityTokenManager(String typeName, String configSection, XmlNodeList configData)
at Microsoft.Web.Services2.Security.Configuration.SecurityConfiguration.ParseSecurityTokenManager(XmlElement child)
at Microsoft.Web.Services2.Security.Configuration.SecurityConfiguration.Load(XmlNode section)
at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.System.Configuration.IConfigurationSectionHandler.Create(Object parent, Object configContext, XmlNode section)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
at System.Configuration.RuntimeConfigurationRecord.CreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader)
at System.Configuration.BaseConfigurationRecord.CallCreateSection(Boolean inputIsTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentConfig, ConfigXmlReader reader, String filename, Int32 line) ------
Is there something different in how
System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.CreateSectionImpl
may be working that does not provide the correct information to
Microsoft.Web.Services2.Configuration.WebServicesConfiguration.System.Configuration.IConfigurationSectionHandler.Create
Or maybe how
System.Type.GetType
works such that the typeName is being resolved differently than in .NET 1.1.
I prefer not using the GAC for several reasons.
Thanks - Rich F.
> Thanks for your reply Rich, > [quoted text clipped - 526 lines] >>>> } >>>> } Rich Fowler - 16 Apr 2008 17:43 GMT 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.
> Thanks for your reply Rich, > [quoted text clipped - 526 lines] >>>> } >>>> } Steven Cheng [MSFT] - 17 Apr 2008 07:23 GMT Thanks for your followup Rich,
Yes, it's really a tiny issue but raised large effort of troubleshooting. Anyway, I'm glad that you've got the issue resolved.
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: msdnmg@microsoft.com.
================================================== 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@newsgroup.nospam> In-Reply-To: <q4iBzN5nIHA.9016@TK2MSFTNGHUB02.phx.gbl> Subject: Re: DIME WSE 2.0 in .NET 2.0 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.
> Thanks for your reply Rich, > [quoted text clipped - 37 lines] > ================================================== > Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications. > [quoted text clipped - 30 lines] > <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"/> [quoted text clipped - 11 lines] > at System.Type.GetType(...) > at Microsoft.Web.Services2.Security.Configuration.SecurityConfiguration.LoadSec
> urityTokenManager(...) > .. [quoted text clipped - 47 lines] >> ================================================== >> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications. >> [quoted text clipped - 94 lines] >>> ================================================== >>> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>> ications. >>> [quoted text clipped - 25 lines] >>> HRESULT: >>> 0x80131047) (D:\\Form990Development\\Form990DevelopmentSoftware\\FedStateBackend\\bin\\D
>>> ebug\\FedStateBackend.vshost.exe.Config >>> line 14)"} [quoted text clipped - 3 lines] >>> >>> at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.Initialize()
>>> at Microsoft.Web.Services2.Configuration.WebServicesConfiguration.get_ReferralC
>>> onfiguration() >>> at Microsoft.Web.Services2.Referral.ReferralCache.Initialize() >>> at Microsoft.Web.Services2.Referral.ReferralCache.ResolvePath(Uri uri) >>> at Microsoft.Web.Services2.WebServicesClientProtocol.set_Destination(EndpointRe
>>> ference >>> value) >>> at Microsoft.Web.Services2.WebServicesClientProtocol.set_Url(String >>> value) >>> IRSProxies40.LoginService.LoginClass..ctor() in D:\\Form990Development\\Form990DevelopmentSoftware\\IRSProxies40\\LoginServi
>>> ce.cs:line >>> 265 [quoted text clipped - 12 lines] >>> <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" /> [quoted text clipped - 49 lines] >>>> ================================================== >>>> Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>>> ications. >>>> [quoted text clipped - 80 lines] >>>> <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" /> [quoted text clipped - 32 lines] >>>> [System.Web.Services.Protocols.SoapHeaderAttribute("MeF", >>>> Direction=System.Web.Services.Protocols.SoapHeaderDirection.InOut)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.irs.g
>>>> ov/a2a/mef/InitialLogin", >>>> Use=System.Web.Services.Description.SoapBindingUse.Literal, [quoted text clipped - 3 lines] >>>> Namespace="http://www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >>>> public InitialLoginResponseType InitialLogin([System.Xml.Serialization.XmlElementAttribute(Namespace="http:/
>>>> /www.irs.gov/a2a/mef/MeFMSIServices.xsd")] >>>> InitialLoginRequestType InitialLoginRequest) [quoted text clipped - 20 lines] >>>> } >>>> } Rich Fowler - 10 Apr 2008 18:47 GMT Steven,
One further piece of information that may be helpful. When compiling, I get a message (not error or warning):
Message 6 Could not find schema information for the element 'microsoft.web.services2'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 14 4 FedStateBackend Message 7 Could not find schema information for the element 'diagnostics'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 15 6 FedStateBackend Message 8 Could not find schema information for the element 'trace'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 16 8 FedStateBackend Message 9 Could not find schema information for the attribute 'enabled'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 16 14 FedStateBackend Message 10 Could not find schema information for the attribute 'input'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 16 29 FedStateBackend Message 11 Could not find schema information for the attribute 'output'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 16 56 FedStateBackend Message 12 Could not find schema information for the element 'detailedErrors'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 17 8 FedStateBackend Message 13 Could not find schema information for the attribute 'enabled'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 17 23 FedStateBackend Message 14 Could not find schema information for the element 'security'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 19 6 FedStateBackend Message 15 Could not find schema information for the element 'securityTokenManager'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 20 8 FedStateBackend Message 16 Could not find schema information for the attribute 'type'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 20 29 FedStateBackend Message 17 Could not find schema information for the attribute 'qname'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 20 121 FedStateBackend Message 18 Could not find schema information for the element 'securityTokenManager'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 21 8 FedStateBackend Message 19 Could not find schema information for the attribute 'type'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 21 29 FedStateBackend Message 20 Could not find schema information for the attribute 'qname'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 21 180 FedStateBackend Message 21 Could not find schema information for the element 'messaging'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 23 6 FedStateBackend Message 22 Could not find schema information for the element 'executionTimeout'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 24 8 FedStateBackend Message 23 Could not find schema information for the attribute 'value'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 24 25 FedStateBackend Message 24 Could not find schema information for the element 'maxRequestLength'. D:\Form990Development\Form990DevelopmentSoftware\FedStateBackend\App.config 25 8 FedStateBackend
Thanks - Rich F.
> Hi Rich, > [quoted text clipped - 176 lines] > } > }
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|