'System.Net.WebPermission - InfoPath Dev
in

InfoPath Dev

'System.Net.WebPermission

Last post 06-30-2006 03:22 AM by K.Ramana Reddy. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-30-2006 02:21 AM

    • Nidhish
    • Not Ranked
    • Joined on 06-30-2006
    • India
    • Posts 2

    'System.Net.WebPermission

    I have an InfoPath form that contain a function (In .Net CodeForm- C#).
    In the function I'm creaing an object of WebService that get the form's value and enter them into database.
    When I run my form as a preview form, It's all work well. But when I publish the form into sharepoint portal and run it I get this Error:

    "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(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.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 NonProductReq.NPService.Service1.InsertNPReqMaster(String RequestID, String SuggestedVendor,

    String DateWritten, String DateRequest, String Resale, String ConfirmedTo, String ConfirmedDate,

    String PayExtra, String DeliverTO, String OriginatedBy, String PhoneNumber)
    at NonProductReq.NonProductReq.btnCreate_OnClick(DocActionEvent e)
    at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent

    pEvent)"



    It looks like a security issue.
    Why it's happen and how to fix it?
  • 06-30-2006 02:51 AM In reply to

    Re: 'System.Net.WebPermission

    Hi,

    When using managed code your form needs to be set to Full trust,
    Give Full Trust then try,

    I hope this will help for you,
    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 06-30-2006 02:57 AM In reply to

    • Nidhish
    • Not Ranked
    • Joined on 06-30-2006
    • India
    • Posts 2

    Re: 'System.Net.WebPermission

    Hi Ramana,

    Thanks for the information.Hope i need to sign the infopath form. am i right ?
  • 06-30-2006 03:22 AM In reply to

    Re: 'System.Net.WebPermission

    Hi Nidhish,

    yes, you have to sign the infopath form.

    Thanks.
    K.Ramana Reddy / http://www.ggktech.com
    India.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.