S
swatch
Hi,
My problem deals with Web Service & System.Net.WebPermission
I created an InfoPath Visual C# projet with Visual Studio 2k3 and added a
form (called toto).
When the form is load a Web Service is called to retreive data stored in a
DB (this is not the issue).
In design mode I can preview the form. The Web Service return the desired
informations.
Everything work fine.
Then I published the form on a shared directory
(\\SERVER\SHARE$\DIRECTORY\toto.xsn)
When I double click on \\SERVER\SHARE$\DIRECTORY\toto.xsn I obtain the
hereunder error
System.Security.SecurityException
Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at ventesAuxPersonnels.WS_Workflow.WebServicesSGF.getUserId(String loginNT)
at ventesAuxPersonnels.ventesAuxPersonnels.initChamp()
at ventesAuxPersonnels.ventesAuxPersonnels.OnLoad(DocReturnEvent e)
at
Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)
Any ideas ?
My problem deals with Web Service & System.Net.WebPermission
I created an InfoPath Visual C# projet with Visual Studio 2k3 and added a
form (called toto).
When the form is load a Web Service is called to retreive data stored in a
DB (this is not the issue).
In design mode I can preview the form. The Web Service return the desired
informations.
Everything work fine.
Then I published the form on a shared directory
(\\SERVER\SHARE$\DIRECTORY\toto.xsn)
When I double click on \\SERVER\SHARE$\DIRECTORY\toto.xsn I obtain the
hereunder error
System.Security.SecurityException
Request for the permission of type 'System.Net.WebPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri
uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at ventesAuxPersonnels.WS_Workflow.WebServicesSGF.getUserId(String loginNT)
at ventesAuxPersonnels.ventesAuxPersonnels.initChamp()
at ventesAuxPersonnels.ventesAuxPersonnels.OnLoad(DocReturnEvent e)
at
Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)
Any ideas ?