Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all 1710 articles
Browse latest View live

Signtool exit code 3

$
0
0

hi all

On build server (with Visual Studio 2015), when this command runs

""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\Signtool.exe" sign /a /v /sha1 <sha data> /t http://timestamp.verisign.com/scripts/timstamp.dll "d:\Builds\Oresund\MeetingModule1.0\bin\Scanjour.MeetingModule.OutlookConnector.dll"" exited with code 3.

it exits with strange error, Sign tool page explains only codes 0,1 and 2. what does 3 mean?


How to install assemblies created in VS2013 in GAC?

$
0
0

Hi, 

We are migrating our application from VS2005 to VS2013.

As a part of it, a common assembly file which we used also we have migrated to VS2013. We tried to deploy the migrated assembly in GAC. We have used the existing gacutil.exe in older version and modified the gacutil.exe.config file with version number v4.0.30319. We kept both gacutil.exe and gacutil.exe.config files at C:\Windows\Microsoft.NET\Framework64\v4.0.30319. Also we have kept our common dll in the same location. now executed the gac command as below

C:\Program Files\Microsoft Visual Studio 12.0>gacutil -i "C:\Windows\Microsoft.N
ET\Framework64\v4.0.30319\SJI.Common.DbUtil.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.33440
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

C:\Program Files\Microsoft Visual Studio 12.0>

But when we checked at assembly the older version of DLL only listed. can't able to find the new one.

Please guide us to register the new DLL in gac.

October 2015 Windows Update KB3097966 corrupted many Windows 8.1 store app native images

$
0
0

After installing October 2015 Windows Updates on Windows 8.1 machine I found that all .NET applications (MSN Weather, HERE Maps, Lenovo Settings, VLC for Windows Store) starts slowly or crashes with allotted timeout error. I have also found numerous reports like that in Event Log:

App Microsoft.BingWeather_3.0.4.336_x64__8wekyb3d8bbwe prevented the load of generated binary \Device\HarddiskVolume3\Users\Petr\AppData\Local\Packages\Microsoft.BingWeather_8wekyb3d8bbwe\AC\Microsoft\CLR_v4.0\NativeImages\AppEx.Weath1591bf4e#\9a87d2f2d08bd8a78b9ff4981a26df8c\AppEx.WeatherApp.Services.ni.dll due to error 0xC000047F. This could be because the binary is unsigned, contains an untrusted signature, or has been corrupted or tampered with.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-AppModel-Runtime" Guid="{F1EF270A-0D32-4352-BA52-DBAB41E1D859}" />
    <EventID>11</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x2000000000000001</Keywords>
    <TimeCreated SystemTime="2015-10-13T20:46:11.274276000Z" />
    <EventRecordID>5407</EventRecordID>
    <Correlation />
    <Execution ProcessID="5656" ThreadID="5684" />
    <Channel>Microsoft-Windows-AppModel-Runtime/Admin</Channel>
  </System>
  <EventData>
    <Data Name="PackageFullName">Microsoft.BingWeather_3.0.4.336_x64__8wekyb3d8bbwe</Data>
    <Data Name="ErrorCode">3221226623</Data>
    <Data Name="FailedBinary">\Device\HarddiskVolume3\Users\Petr\AppData\Local\Packages\Microsoft.BingWeather_8wekyb3d8bbwe\AC\Microsoft\CLR_v4.0\NativeImages\AppEx.Weath1591bf4e#\9a87d2f2d08bd8a78b9ff4981a26df8c\AppEx.WeatherApp.Services.ni.dll</Data>
  </EventData>
</Event>

It looks like most of .NET native images are reported as corrupted now. Running SFC and CHKDSK havenot found any errors. The only way was to reinstall all affected applications. I studied the event log back and there were no such errors before.

Currently I can reproduce the issue on two different Windows 8.1 machines with different Microsoft accounts after October updates !

Petr



.NET CLR crashes applications after 1+ year in service on Windows 8.1 Pro

$
0
0

Hi,

After 1+ year we suddenly see that .NET based apps crashed on Windows 8.1 Pro.
The PC has NOT been updated for the past year and no new applications installed.

Both our custom .NET based Windows server and SSMS crashes with an access violation in clr.dll?

Below from Windows Event Viewer.

SSMS

Faulting application name: Ssms.exe, version: 2011.110.5058.0, time stamp: 0x537406e3
Faulting module name: clr.dll, version: 4.0.30319.34014, time stamp: 0x52e0b784
Exception code: 0xc0000005
Fault offset: 0x00100d7a
Faulting process id: 0xb74
Faulting application start time: 0x01d12b6ac3f1f26b
Faulting application path: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: 030caa7e-975e-11e5-8285-3417eb975419
Faulting package full name: 
Faulting package-relative application ID: 

Custom Windows Service, .NET framework target = 4.5

Faulting application name: SC.DataTransfer.App.exe, version: 1.0.0.1119, time stamp: 0x54086f52
Faulting module name: clr.dll, version: 4.0.30319.34014, time stamp: 0x52e0b784
Exception code: 0xc0000005
Fault offset: 0x00100d7a
Faulting process id: 0xf0c
Faulting application start time: 0x01d12b6abc0d5cb0
Faulting application path: C:\Program Files\XXXX\SC DataTransfer App\SC.DataTransfer.App.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report Id: f9fcf647-975d-11e5-8285-3417eb975419
Faulting package full name: 
Faulting package-relative application ID: 


App loads in .Net 4.5 but not in 4.6

$
0
0

I get the following event log error when loading my app in a machine with .Net 4.6 (either Win 2008 R2 or Win 10).

The app is targeted to .Net 4.5, and loads fine in that version.

Event source: .Net Runtime

Application: foo.exe

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
   at System.ModuleHandle.ResolveType(System.Reflection.RuntimeModule, Int32, IntPtr*, Int32, IntPtr*, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack)
   at System.ModuleHandle.ResolveType(System.Reflection.RuntimeModule, Int32, IntPtr*, Int32, IntPtr*, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack)
   at System.ModuleHandle.ResolveTypeHandleInternal(System.Reflection.RuntimeModule, Int32, System.RuntimeTypeHandle[], System.RuntimeTypeHandle[])
   at System.Reflection.RuntimeModule.ResolveType(Int32, System.Type[], System.Type[])
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(System.Reflection.CustomAttributeRecord, System.Reflection.MetadataImport, System.Reflection.Assembly ByRef, System.Reflection.RuntimeModule, System.Reflection.MetadataToken, System.RuntimeType, Boolean, System.Object[], System.Collections.IList, System.RuntimeType ByRef, System.IRuntimeMethodInfo ByRef, Boolean ByRef, Boolean ByRef)
   at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeModule, Int32, Int32, System.RuntimeType, Boolean, System.Collections.IList, Boolean)
   at System.Reflection.CustomAttribute.GetCustomAttributes(System.Reflection.RuntimeAssembly, System.RuntimeType)
   at System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, Boolean)
   at System.AppDomain.GetTargetFrameworkName()


.Net profiler - Tag and Follow the exit calls

$
0
0

Hi,

I am able to profile the simple .Net applications which does not have a exit calls such as HttpWebRequests etc. 

If i have a .Net application that calls another application from same or another AppDomain using HttpWebRequests, how can i assign same GUID string to that webrequest also (Tag and Follow).

I tried the following (inside my injected C# helper function)

string rGuid = (string)CallContext.LogicalGetData("guid");

if(rGuid == null)

{

CallContext.LogicalSetData("guid",Guid.NewGuid().ToString());

}

But the rGuid is not same in the called web request. How can i achieve this Tag and follow concept..?

./Selva

Getting the Method's argument types and Return type from Profiler dll

$
0
0

Hi,

I am able to get the method name and the method's type using GetMethodProps(..) and GetTypeDefProps(..)

How can i get the method's argument types and return type during JIT compilation from the Profiler Dll.?

What is the IMetaDataImport function for it and how to get that.?

Thanks 

./Selva




Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web

$
0
0

Trying to run simple webapi application on docker (deployed to Ubuntu Linux) i face strange exception when attempting to run container:
Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web.

What ive done so far.. I have uploaded my aspnet5 solution to Linux machine and run to publish it: dnu publish --framework dnxcore50 --configuration Release --wwwroot "wwwroot" --wwwroot-out "wwwroot" --iis-command "web"

Next ive done docker build to create an image and then try to run it with: sudo docker run -t -d -p 8000:8000 myimagename

Looking at the docker logs i see an exception shown above.

Ive logged into the container to see folders structure and all look good. Verifyid dnx in container and the one i used to build solution are the same.

Using latest available microsoft/aspnet image - rc1-update1

Any ideas??

Managed to make it running by:

1. I have removed ENTRYPOINT from my Dockerfile to be able to run container.

2. I have connected to the container with "sudo docker exec -t -i mycontainer /bin/bash"

3. Then i did "dnu restore" inside the image

4. I was able to run a command with "dnx web"

So, it looks like the problem is with the binaries versions difference. How is this possible? How can i avoid this issue?


SECURITY ISSUE: The "Fall Update" (i.e. version 1511) for Windows 10 is disabling StrongName Verification!

$
0
0

Is anyone else seeing this?  I've verified on several machines now.

The "fall update" (i.e. version 1511) for Windows 10 enters the following registry key on the computer system where it is installed which disables .Net StrongName checking on the system. 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,*
This is a security issue!  The patch should not add this registry entry.

Steps to reproduce:

  1. Install the original release (July 2015) of Windows 10
  2. Check the registry and note that the registry key listed above is NOT there.
  3. Go to Windows Updates and install the latest updates include the fall update (i.e. version 1511)
  4. Check the registry and note that the registry key listed above IS there.
Note that this does not happen with the "Windows 10 Enterprise, Version 1511" ISO image from MSDN.  It only happens when it comes through Windows Updates.


Thanks in advance, LM

Simple question newbie to .net

$
0
0

I am creating an application in vb.net for a manufacturing test.  At the end of the test, I am using a windows form to display either PASS on a green background or FAIL on a red background.  Everything is working, but when I call the second form to show the label always appears as no text with a white background.   Feel stupid that I can't figure out what is going on.  The problem I have is that I had done a lot of programming in VB6, but have gotten away from development altogether until recently.

If blnPassFail = True

      me.lblpassfail.text = "PASS"

     me.lblpassfail.backcolor=color.green

     me.backcolor=color.green

Else

     me.lblpassfail.text = "FAIL"

     me.lblpassfail.backcolor = color.red

     me.backcolor = color.red

Endif

The label always just shows as a white box on the form.  The forecolor is black, the text is arial 72.  Can't figure it out.

ECMA-335 forbids null as a managed pointer, but ECMA-372 allows nullptr as an interior pointer

$
0
0

Related to the how can a function return an lvalue thread, there seems to be an inconsistency between ECMA-335 and ECMA-372:

  • In ECMA-335 (Common Language Infrastructure (CLI)), 6th Edition, §II.14.4.2 (Managed Pointers) says: "Managed pointers cannot be null, and they shall be reported to the garbage collector even if they do not point to managed memory."
  • In ECMA-335, §III.1.1 (Data types) says: "Pointer types (native unsigned int and &) […] Note that object references and pointer types can be assigned the value null."
  • In ECMA-335, §III.1.1.5.2 (Managed pointers (type &)) says: "Managed pointers cannot be null."
  • In ECMA-372 (C++/CLI Language Specification), 1st Edition, §12.3.6.1 (Definitions) says: "The default initial value for an interior pointer shall be nullptr."
  • In ECMA-372, §34.2.2 (Interior pointers) says: "An interior pointer to a type shall be emitted into metadata as a managed pointer to that type with the modopt IsExplicitlyDereferenced (§33.1.5.4)."

The value of an interior pointer defaults to nullptr, but it is emitted as a managed pointer, which cannot be null – or can it?

Does this just mean that an implementation of ECMA-335 does not have to support null managed pointers, but if it implements ECMA-372 as well, then it has to support them?

Is there a list of errata for these standards?


PInvoking ReadFileEx

$
0
0

I'm trying to use PInvoke to call ReadEx, but I haven't been able to figure out exactly how to do it.

The signature for ReadFileEx contains a callback delegate, which is provided as System.Threading.IOCompletionCallback. However, ALL the pack routines also require a completion callback. I've tried every combination, and nothing works.

Microsoft Corporation has caused a stack overflow exception (0xC00000FD) when trying to write to memory location 0x2cc55ca8

$
0
0

Hi,

App pool crashes intermittently and the below mesage is logged in the event log.

Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835
Faulting module name: clr.dll, version: 4.0.30319.18449, time stamp: 0x528fdca2
Exception code: 0xc00000fd
Fault offset: 0x000000000024aa1d
Faulting process id: 0x1b64
Faulting application start time: 0x01d137e3e466c062
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: f7e958e5-a3d7-11e5-9425-005056a415b8
Faulting package full name: 
Faulting package-relative application ID: 

Analyzed the dumps from "C:\ProgramData\Microsoft\Windows\WER\ReportQueue" folder and the issue with clr.dll

"In WERC3F2.tmp.dmp the assembly instruction at clr!AdjustContextForWriteBarrier+3d inclr.dll from Microsoft Corporation has caused astack overflow exception (0xC00000FD) when trying to write to memory location0x2cc55ca8 on thread"

How to analyze further?

Thanks in advance

What is JIT Compiler location ?

$
0
0

How and which application is JIT Compiler in windows 10 Latest version of .Net Framework? 

C#, VB.Net or Compiled to MSCIL  then when app runs JIT ( JUST IN TIME ) Compiler compiles and Convert that MSCIL to Native Code ( APP ). What is JIT PE Executable and what it's location in windows 10 .Net Framework. When an IL App runs how JIT Works is this API or SYS OR EXE ?? 

Thanks 

https://support.microsoft.com/en-us/kb/2640103 .

$
0
0

My application is not opening in Threshold TP4 and giving error mentioned in KB article.

And getting the installtion issue on Server 2012R2. I

Do we have any fix for these platforms?  

https://support.microsoft.com/en-us/kb/2640103  . 


BindingRedirect not working as I thought

$
0
0

I know it has to be something stupid...

I have a dll - let's call it foo.dll, which references BAR.DLL - and has for years - an in foo.dll.config we have

 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="bar" culture="neutral" publicKeyToken="9816a6fb814b0b7d" />
        <bindingRedirect oldVersion="8.0.0.85" newVersion="8.0.0.85" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

which works fine when BAR.DLL is installed (it is in the GAC).  My problem is now that BAR.DLL is up a 8.0.1.327

When I run the application, I get an error that says that BAR.DLL culture neutral, key.. version 8.0.0.85 is missing

and when I try changing the config to:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="bar" culture="neutral" publicKeyToken="9816a6fb814b0b7d" />
        <bindingRedirect oldVersion="8.0.0.85" newVersion="8.0.1.327" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

I get the SAME error.  I have even tried putting foo.dll.config in the framework redirect locations.  Any clue what I'm doing wrong?

How to Pass unmanaged struct C++ object to C# delegates. And how to return that object from C# through C++ function pointer using delegates

$
0
0

I have Managed.dll written in C# and Unmaanaged.exe written in C++.

Trying to pass C++ function pointer and C++ obect to C#(com dll), 

Invoke / call this funtion pointer in C# and pass C++ object after  populating from C#.

Regards,

Lokesh





Tagging GUID in .Net Profiler - in Classic Mode Pipeline

$
0
0

Hi,

I use HttpRequest.headers property to tag and follow the exit web request calls .

While using the same code for profiling a web site that uses "Classic Mode" pipeline in IIS then the code crashes with exception PlatformNotSupported ..

In Classic mode pipeline what is alternate to achieve this tagging for the exit calls..?

Thanks

./Selva

How to call Managed C++ from UnManaged C++

$
0
0

I created Managed C++/CLI application(DLL application) and created Unmanaged C++EXE. I want to call Managed C++ method from unmanaged C++.How to do it?

Regards,

Lokesh

Fast capture stack trace on windows / 64-bit / mixed mode

$
0
0

Asking same question as in here:

http://stackoverflow.com/questions/34501602/fast-capture-stack-trace-on-windows-64-bit-mixed-mode

You can reply either here or on stackoverflow - no matter where.

Viewing all 1710 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>