Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gunjanhshah
Starting Member
2 Posts |
Posted - 2008-11-19 : 10:17:42
|
Hi I am trying to call the WCF service from SQL CLR Stored procedure. I am able to create the procedure. but when I am executing the stored proc. it is showing the following error Msg 6522, Level 16, State 1, Procedure SubmitFaxRequest, Line 0A .NET Framework error occurred during execution of user-defined routine or aggregate "SubmitFaxRequest": System.TypeInitializationException: The type initializer for 'System.ServiceModel.ClientBase`1' threw an exception. ---> System.Security.HostProtectionException: Attempted to perform an operation that was forbidden by the CLR host.The protected resources (only available with full trust) were: AllThe demanded resources were: Synchronization, ExternalThreadingSystem.Security.HostProtectionException: at System.ServiceModel.DiagnosticUtility.GetUtility()at System.ServiceModel.DiagnosticUtility.get_Utility()at System.ServiceModel.ClientBase`1..cctor()System.TypeInitializationException: at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()at System.ServiceModel.ClientBase`1..ctor()at OutboundFaxClient..ctor()at StoredProcedures.SubmitFaxRequest() What could be problem? Gunjan |
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
gunjanhshah
Starting Member
2 Posts |
Posted - 2008-11-19 : 11:39:35
|
Yes it seems it should work. I need to generate xmlserializer file using sgen. I am trying to run the sgen.exe "MYproject.dll" from my project location but it's showing this error and not able to create the xmlserializer.dllError: The top XML element 'PharmaFaxResponse' from namespace '' references distinct types SqlServerWCFService.Service1.PharmaFaxResponse and PharmaFax.PharmaFaxResponse. Use XML attributes to specify another XML name or namespace for the element or types.If you would like more help, please type "sgen /?".I have Service1 as a WCF. Gunjan |
 |
|
|
|
|