chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I'm trying to stub database functionality of an ASP.NET application, and I've wrote an HttpModule for that using TypeMock 4.1 Enterprise.

Unfortunatelly when running the web site I've got into "TypeMock.NET is not enabled" problem, despite running mocking_on.bat and restarting IIS after that, so I've used the approach used by the CLRProfiler wich sets Enviroment properties for IISADMIN, W3SVC and WAS (properties regarding the profiler). Then restarted the IIS again and started the site.

Now I'm into a completly different problem:

Could not load file or assembly 'TypeMock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000' or one of its dependencies. The system cannot find the file specified.

and the end result is that aspnet_wp crahes. However the TypeMock tracing is working and recorded some calls and I also have the log file in place. LinkedProfilers-aspnet_wp.exe.out looks like

Logging program: c:windowsmicrosoft.netramework2.0.50727spnet_wp.exe
Cannot read EnvName0 => The system cannot find the file specified.

This all hapens on my development machine, where I'm sucessfully running TypeMock enabled tests. How to make this work ?
asked by dragosv (640 points)

3 Answers

0 votes
Hi,

The error you are getting usually means that you have a mismatching dll which are used. This can be caused by several reasons.

The scope of the mocking_on bat is only for the command window whichit was run in. so unless you ran the IIS server from that window it wont work for you.

:?: are you by any chance working on a 64 bit machine?
answered by lior (13.2k points)
0 votes
No 64 system. I'm on Windows XP Pro SP2 32 bit.

I also looked into the fussion log and surprise:
First the aplication loads succesfully TypeMock 4.1.0.0, then just in the next step tries to load TypeMock 0.0.0.0 and fails.
answered by dragosv (640 points)
0 votes
hi,

I suggest that we take it offline.
ill sent you a mail with some details. basically i would like to get the log file that you mention that you got.
i think they will have some useful info in them.
answered by lior (13.2k points)
...