Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have the following error when I try to insert data from a webservice Soap in C sharp, everything is OK when I just try to get data from the webservice by calling a function which normally delivers an XML, but when I call a WS Insert function to insert data This error appears to me



System.Security.SecurityException: Error de solicitud de permiso de tipo 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
en System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
en System.Security.CodeAccessPermission.Demand()
en System.Environment.get_MachineName()
en WebServiceSWGateway.Service1.ServiceIngresoCustomerCompany(String CustomerCompanyIDE, String CustomerCompanyName, String CustomerCompanyDir, String CustomerCompanyPhone, String CustomerCompanyCelPhone, String CustomerCompanyEmail, String CustomerCompanyFax, String CustomerCompanyWebSite, Int32 CiudadID, String CustomerCompanyDateIng, Int32 CustomerCompanyState, String CustomerCompanyShortName)

What I have tried:

<system.web>

      <trust level = "Full" />
        <compilation debug="true" >
          <assemblies>
            <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>
        </compilation>

</system.web>
Posted
Updated 6-Sep-17 8:48am
Comments
Thomas Nielsen - getCore 1-Sep-17 2:57am    
Are you running your visual studio in administrator mode? If not, give it a try
Preatorian (RightCom) 6-Sep-17 14:46pm    
already solve in problem that had, had corrupted the solution Visual studio and I solve it creating a new VS proyect solution and exporting all the functionalities of the previous solution

1 solution

already solve in problem that had, had corrupted the solution Visual studio and I solve it creating a new VS proyect solution and exporting all the functionalities of the previous solution
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900