Error debugging webservice (asmx) locally in Visual Studio

Asked

Viewed 40 times

1

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

Failure to request type permission 'System.Security.Permissions.Fileiopermission, mscorlib, Version=2.0.0.0, Culture=neutral, Publickeytoken=b77a5c561934e089'.

I’ve already changed the class header, including the permission:

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

And I also added it on Web.config:

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

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

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

1 answer

0

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.