Error debugging webservice (asmx) locally in Visual Studio

1

I'm trying to debug a webservice (asmx) locally from Visual Studio. When attempting to create the connection to the database, the following exception occurs:

  

Request for type permission failed   'System.Security.Permissions.FileIOPermission, mscorlib,   Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 '.

I have already changed in the class header, including the permission:

[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)]

And also added in Web.config:

<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>

Even so, the error remains. The same webservice is running seamlessly on the Production machine.

Does anyone know what to do to reverse this situation on the local machine with Visual Studio?

    
asked by anonymous 17.05.2018 / 19:37

1 answer

0

Just updating, I found the "problem". I opened the project remotely (networked). After I copied the project to local machine, I was able to debug without problems. This is the tip.

    
17.05.2018 / 19:46