I am trying to deploy my .NET Instrumentation profiler into Azure web apps. Using COR_PROFILER_32 and *_64 and COR_PROFILING_ENABLED i am enabling my profiler in Azure web app.
My profiler will instrument codes into all the modules including .NET Framework modules. (such as System.dll , System.Core.dll.. etc.) and even in user modules too. The instrumented code will call functions that are defined in a separate assembly "CAssemblyHelper.dll" which is "Any CPU" built.
The issue here is , when my instrumented code is getting called there is a "FileNotFoundException" happening with error message.
The blacked out is the assembly name CAssemblyHelper.dll that i am referring to. The assembly is not having any dependencies. I have probed the location of the dll in the web config file.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;PrivateFolder"/>
</assemblyBinding>
</runtime>
How to resolve this error..! I am using DefineAssemblyRef in IMetaDataAssemblyEmit to define the assembly in the Modules. In the normal IIS server machine , the CAssembly helper will be installed in GAC, and everything was working perfectly. While trying in Azure the problem comes.!
Update 1:
I tried by giving code base to the web config file.. and still dint work
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;PrivateFolder"/>
<dependentAssembly>
<assemblyIdentity name="CAssemblyHelper"
publicKeyToken="XXXXXXX"
culture="neutral" />
<codeBase version="1.0.0.0"
href="https://XXXX.scm.azurewebsites.net/api/vfs/SystemDrive/home/site/wwwroot/PrivateFolder/CAssemblyHelper.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Additional Error:
Exception: System.IO.FileLoadException
Message: The specified user does not have a valid profile.
This exception and message comes when i am trying to instrument only System.Configuration.dll module.