B
Benjamin Kremer
Hello Everybody,
my project seems to be going to an end. But there is one little Problem :
I made al little Infopath- document which gets it´s data from .Net Code, the
date is pasted to the DOM with the XMLDocument.AppendChild() or
..insertBefore Method.
The .Net Code get´s it´s data from a XML Webservice, which gives it´s
results via a DataSet. The .Net- Code splits the dataset into XMLNodes and
adds them to the Document- DOM.
Everything works fine when I open the Form locally. But when I publish this
form to a Sharepoint Document Libary, I´ll get the following error by
calling the .Net Code in the form (Sorry, German):
Anforderung des Berechtigungstyps System.Net.WebPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ist
fehlgeschlagen.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
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 billy.Service1.GetWMIData(String strServername, String strUsername,
String strPassword, String strClass, String strProperty)
at CPP_Win_Server.CPP_Win_Server.FillServerData()
at CPP_Win_Server.CPP_Win_Server.btnGetData_OnClick(DocActionEvent e)
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent
pEvent)
Due to the line "at billy.Service1.GetWMIData(String strServername, String
strUsername, String strPassword, String strClass, String strProperty)
", it seemd that the Webservice- Call fails. But I´ve no idea why ...
Thanks for Support !
Benjamin
my project seems to be going to an end. But there is one little Problem :
I made al little Infopath- document which gets it´s data from .Net Code, the
date is pasted to the DOM with the XMLDocument.AppendChild() or
..insertBefore Method.
The .Net Code get´s it´s data from a XML Webservice, which gives it´s
results via a DataSet. The .Net- Code splits the dataset into XMLNodes and
adds them to the Document- DOM.
Everything works fine when I open the Form locally. But when I publish this
form to a Sharepoint Document Libary, I´ll get the following error by
calling the .Net Code in the form (Sorry, German):
Anforderung des Berechtigungstyps System.Net.WebPermission, System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ist
fehlgeschlagen.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
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 billy.Service1.GetWMIData(String strServername, String strUsername,
String strPassword, String strClass, String strProperty)
at CPP_Win_Server.CPP_Win_Server.FillServerData()
at CPP_Win_Server.CPP_Win_Server.btnGetData_OnClick(DocActionEvent e)
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent
pEvent)
Due to the line "at billy.Service1.GetWMIData(String strServername, String
strUsername, String strPassword, String strClass, String strProperty)
", it seemd that the Webservice- Call fails. But I´ve no idea why ...
Thanks for Support !
Benjamin