How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service? [on hold] ...

What's called a person who works as someone who puts products on shelves in stores?

All ASCII characters with a given bit count

Bright yellow or light yellow?

What is the definining line between a helicopter and a drone a person can ride in?

What is /etc/mtab in Linux?

What does the black goddess statue do and what is it?

What is the term for extremely loose Latin word order?

How was Lagrange appointed professor of mathematics so early?

What was Apollo 13's "Little Jolt" after MECO?

France's Public Holidays' Puzzle

Suing a Police Officer Instead of the Police Department

What were wait-states, and why was it only an issue for PCs?

What helicopter has the most rotor blades?

Is Bran literally the world's memory?

using NDEigensystem to solve the Mathieu equation

How did Elite on the NES work?

Why aren't road bicycle wheels tiny?

In search of the origins of term censor, I hit a dead end stuck with the greek term, to censor, λογοκρίνω

Co-worker works way more than he should

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

What is the ongoing value of the Kanban board to the developers as opposed to management

Why isPrototypeOf() returns false?

Is it appropriate to mention a relatable company blog post when you're asked about the company?

When does Bran Stark remember Jamie pushing him?



How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service? [on hold]



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow do I troubleshoot a “Internal .NET runtime error” (related to VS 2010 crash)Error installing/uninstalling GeoMedia WebMap Professional_6 on Windows 7 (64 bit)PCI Express - Memory Addressing vs Physical Memory in Memory Read/Write TransactionsTheoretical behaviour of RAM if single read/write errorHandheld Terminal SD Card error: the file may be in read-only memory, on a write-protected disk or used by another applicationWhat software can write to Cache memory?How to Troubleshoot Cause of Memory ErrorsHow do I read RAM memory labels?Azure App Service Crashing After Exactly 1 Hour Uptime.NET Targeting Error on Server 2016





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service?
Hi ,
I have web service that needs legacy third-party API with very limited logging options.

Public Shared Function DoJob(
<In> ByVal FName As String,
<Out> ByRef directoryDN As IntPtr,
<Out> ByRef directoryPassword As IntPtr) As Int16
End Function



The API is 32bit compiled so I created my web service as 32bit application. The web service application target framework “.NET Framework 3.5” and it has been working for few years on server 2008 and server2012. We want to migrate to server 2016, but every time I call the service and I need to use some of the API functions I get “Attempted to read or write protected memory” error. I fallowed the same steps installing the application, as I did on the two old servers.
1) Created New ApplicationPool named “NET2” .NET CLR version v2.0.50727
2) “NET2”-> Advanced setting -> Enable 32-Bit Application -> True and Managed Pipeline Classic
3) Created new web site and assigned NET2 AppPool to it
4) Created new folder and Converted to Application
5) Installed the web service to it
6) WebSite -> Edit Permissions->Security->Add and I add “IIS AppPool NE2 “ Full Control ( just a test )
7) WebSite ->Authentication-> Anonymous Authentication -> Edit -> ApplicationPool identity
8) Added API dll path to Environment Variables Path
After two days of permission and policy comparison between server 2012 and the new server 2016
Every time a call the service I get “Attempted to read or write protected memory”.
Some steps I try to resolve the issue.
1) CasPol.exe -m -ag 1.2 -url file://path/path/* FullTrust
2) %windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe –i
%windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe –i
%windir%Microsoft.NETFrameworkv2.0.50727aspnet_regiis.exe –i %windir%Microsoft.NETFramework64v2.0.50727aspnet_regiis.exe –i



3) ICACLS "C:pathpath" /grant "IIS AppPoolNET2":F /t
ICACLS " C:pathpath" /grant "IIS AppPoolNET4":F /t
ICACLS " C:pathpath" /grant "IIS_IUSRS":F /t



4) Created console application using source code of the web service and ran it from the same folder as the web service using the same dllimport statements ( worked perfectly )
5) Used “Wireshark” ( request and responses are executed )
6) Used “Promon Application” to compare server 2012 and server 2016 processes , everything is similar but a call to w3wp.exe



FASTIO_NETWORK_QUERY_OPEN C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll FAST IO DISALLOWED
IRP_MJ_CREATE C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll NAME NOT FOUND
FASTIO_NETWORK_QUERY_OPEN C:WindowsSysWOW64inetsrvw3wp.exe FAST IO DISALLOWED
IRP_MJ_CREATE C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS
FASTIO_QUERY_INFORMATION C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS



…….



Followed by my web server log file with exception “System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt”



Any Ideas.










share|improve this question







New contributor




mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by DavidPostill 10 hours ago



  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.























    0















    How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service?
    Hi ,
    I have web service that needs legacy third-party API with very limited logging options.

    Public Shared Function DoJob(
    <In> ByVal FName As String,
    <Out> ByRef directoryDN As IntPtr,
    <Out> ByRef directoryPassword As IntPtr) As Int16
    End Function



    The API is 32bit compiled so I created my web service as 32bit application. The web service application target framework “.NET Framework 3.5” and it has been working for few years on server 2008 and server2012. We want to migrate to server 2016, but every time I call the service and I need to use some of the API functions I get “Attempted to read or write protected memory” error. I fallowed the same steps installing the application, as I did on the two old servers.
    1) Created New ApplicationPool named “NET2” .NET CLR version v2.0.50727
    2) “NET2”-> Advanced setting -> Enable 32-Bit Application -> True and Managed Pipeline Classic
    3) Created new web site and assigned NET2 AppPool to it
    4) Created new folder and Converted to Application
    5) Installed the web service to it
    6) WebSite -> Edit Permissions->Security->Add and I add “IIS AppPool NE2 “ Full Control ( just a test )
    7) WebSite ->Authentication-> Anonymous Authentication -> Edit -> ApplicationPool identity
    8) Added API dll path to Environment Variables Path
    After two days of permission and policy comparison between server 2012 and the new server 2016
    Every time a call the service I get “Attempted to read or write protected memory”.
    Some steps I try to resolve the issue.
    1) CasPol.exe -m -ag 1.2 -url file://path/path/* FullTrust
    2) %windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe –i
    %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe –i
    %windir%Microsoft.NETFrameworkv2.0.50727aspnet_regiis.exe –i %windir%Microsoft.NETFramework64v2.0.50727aspnet_regiis.exe –i



    3) ICACLS "C:pathpath" /grant "IIS AppPoolNET2":F /t
    ICACLS " C:pathpath" /grant "IIS AppPoolNET4":F /t
    ICACLS " C:pathpath" /grant "IIS_IUSRS":F /t



    4) Created console application using source code of the web service and ran it from the same folder as the web service using the same dllimport statements ( worked perfectly )
    5) Used “Wireshark” ( request and responses are executed )
    6) Used “Promon Application” to compare server 2012 and server 2016 processes , everything is similar but a call to w3wp.exe



    FASTIO_NETWORK_QUERY_OPEN C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll FAST IO DISALLOWED
    IRP_MJ_CREATE C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll NAME NOT FOUND
    FASTIO_NETWORK_QUERY_OPEN C:WindowsSysWOW64inetsrvw3wp.exe FAST IO DISALLOWED
    IRP_MJ_CREATE C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS
    FASTIO_QUERY_INFORMATION C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS



    …….



    Followed by my web server log file with exception “System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt”



    Any Ideas.










    share|improve this question







    New contributor




    mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.











    put on hold as off-topic by DavidPostill 10 hours ago



    • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.

    If this question can be reworded to fit the rules in the help center, please edit the question.



















      0












      0








      0








      How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service?
      Hi ,
      I have web service that needs legacy third-party API with very limited logging options.

      Public Shared Function DoJob(
      <In> ByVal FName As String,
      <Out> ByRef directoryDN As IntPtr,
      <Out> ByRef directoryPassword As IntPtr) As Int16
      End Function



      The API is 32bit compiled so I created my web service as 32bit application. The web service application target framework “.NET Framework 3.5” and it has been working for few years on server 2008 and server2012. We want to migrate to server 2016, but every time I call the service and I need to use some of the API functions I get “Attempted to read or write protected memory” error. I fallowed the same steps installing the application, as I did on the two old servers.
      1) Created New ApplicationPool named “NET2” .NET CLR version v2.0.50727
      2) “NET2”-> Advanced setting -> Enable 32-Bit Application -> True and Managed Pipeline Classic
      3) Created new web site and assigned NET2 AppPool to it
      4) Created new folder and Converted to Application
      5) Installed the web service to it
      6) WebSite -> Edit Permissions->Security->Add and I add “IIS AppPool NE2 “ Full Control ( just a test )
      7) WebSite ->Authentication-> Anonymous Authentication -> Edit -> ApplicationPool identity
      8) Added API dll path to Environment Variables Path
      After two days of permission and policy comparison between server 2012 and the new server 2016
      Every time a call the service I get “Attempted to read or write protected memory”.
      Some steps I try to resolve the issue.
      1) CasPol.exe -m -ag 1.2 -url file://path/path/* FullTrust
      2) %windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe –i
      %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe –i
      %windir%Microsoft.NETFrameworkv2.0.50727aspnet_regiis.exe –i %windir%Microsoft.NETFramework64v2.0.50727aspnet_regiis.exe –i



      3) ICACLS "C:pathpath" /grant "IIS AppPoolNET2":F /t
      ICACLS " C:pathpath" /grant "IIS AppPoolNET4":F /t
      ICACLS " C:pathpath" /grant "IIS_IUSRS":F /t



      4) Created console application using source code of the web service and ran it from the same folder as the web service using the same dllimport statements ( worked perfectly )
      5) Used “Wireshark” ( request and responses are executed )
      6) Used “Promon Application” to compare server 2012 and server 2016 processes , everything is similar but a call to w3wp.exe



      FASTIO_NETWORK_QUERY_OPEN C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll FAST IO DISALLOWED
      IRP_MJ_CREATE C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll NAME NOT FOUND
      FASTIO_NETWORK_QUERY_OPEN C:WindowsSysWOW64inetsrvw3wp.exe FAST IO DISALLOWED
      IRP_MJ_CREATE C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS
      FASTIO_QUERY_INFORMATION C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS



      …….



      Followed by my web server log file with exception “System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt”



      Any Ideas.










      share|improve this question







      New contributor




      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      How Can I troubleshoot “Attempted to read or write protected memory” error on a Web Service?
      Hi ,
      I have web service that needs legacy third-party API with very limited logging options.

      Public Shared Function DoJob(
      <In> ByVal FName As String,
      <Out> ByRef directoryDN As IntPtr,
      <Out> ByRef directoryPassword As IntPtr) As Int16
      End Function



      The API is 32bit compiled so I created my web service as 32bit application. The web service application target framework “.NET Framework 3.5” and it has been working for few years on server 2008 and server2012. We want to migrate to server 2016, but every time I call the service and I need to use some of the API functions I get “Attempted to read or write protected memory” error. I fallowed the same steps installing the application, as I did on the two old servers.
      1) Created New ApplicationPool named “NET2” .NET CLR version v2.0.50727
      2) “NET2”-> Advanced setting -> Enable 32-Bit Application -> True and Managed Pipeline Classic
      3) Created new web site and assigned NET2 AppPool to it
      4) Created new folder and Converted to Application
      5) Installed the web service to it
      6) WebSite -> Edit Permissions->Security->Add and I add “IIS AppPool NE2 “ Full Control ( just a test )
      7) WebSite ->Authentication-> Anonymous Authentication -> Edit -> ApplicationPool identity
      8) Added API dll path to Environment Variables Path
      After two days of permission and policy comparison between server 2012 and the new server 2016
      Every time a call the service I get “Attempted to read or write protected memory”.
      Some steps I try to resolve the issue.
      1) CasPol.exe -m -ag 1.2 -url file://path/path/* FullTrust
      2) %windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe –i
      %windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe –i
      %windir%Microsoft.NETFrameworkv2.0.50727aspnet_regiis.exe –i %windir%Microsoft.NETFramework64v2.0.50727aspnet_regiis.exe –i



      3) ICACLS "C:pathpath" /grant "IIS AppPoolNET2":F /t
      ICACLS " C:pathpath" /grant "IIS AppPoolNET4":F /t
      ICACLS " C:pathpath" /grant "IIS_IUSRS":F /t



      4) Created console application using source code of the web service and ran it from the same folder as the web service using the same dllimport statements ( worked perfectly )
      5) Used “Wireshark” ( request and responses are executed )
      6) Used “Promon Application” to compare server 2012 and server 2016 processes , everything is similar but a call to w3wp.exe



      FASTIO_NETWORK_QUERY_OPEN C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll FAST IO DISALLOWED
      IRP_MJ_CREATE C:WindowsMicrosoft.NETFrameworkv2.0.50727VERSION.dll NAME NOT FOUND
      FASTIO_NETWORK_QUERY_OPEN C:WindowsSysWOW64inetsrvw3wp.exe FAST IO DISALLOWED
      IRP_MJ_CREATE C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS
      FASTIO_QUERY_INFORMATION C:WindowsSysWOW64inetsrvw3wp.exe SUCCESS



      …….



      Followed by my web server log file with exception “System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt”



      Any Ideas.







      memory iis .net-framework






      share|improve this question







      New contributor




      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 12 hours ago









      mpopantonovmpopantonov

      1




      1




      New contributor




      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      mpopantonov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      put on hold as off-topic by DavidPostill 10 hours ago



      • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.

      If this question can be reworded to fit the rules in the help center, please edit the question.







      put on hold as off-topic by DavidPostill 10 hours ago



      • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.

      If this question can be reworded to fit the rules in the help center, please edit the question.






















          0






          active

          oldest

          votes

















          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

          Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

          looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...